[Python-bugs-list] [ python-Bugs-814613 ] socketmodule.c fails
build, INET_ADDRSTRLEN not defined
SourceForge.net
noreply at sourceforge.net
Sat Oct 4 03:39:48 EDT 2003
Bugs item #814613, was opened at 2003-09-30 04:22
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=814613&group_id=5470
Category: Build
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Randy Davis (randydavis1)
Assigned to: Nobody/Anonymous (nobody)
Summary: socketmodule.c fails build, INET_ADDRSTRLEN not defined
Initial Comment:
Modules/socketmodule.c fails to built on IRIX 6.3 gcc
3.2.2 due to INET_ADDRSTRLEN not being defined.
Adding an additional "#define INET_ADDRSTRLEN 16"
outside of the #ifdef's fixes it (so the #ifdefs would
seem to not be taking into account IRIX 6.3).
Here's the error:
building '_socket' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
shared -fno-strict-aliasing -I. -
I/usr2/admin/src/dev/python-2.3.1/./Include -
I/usr/local/include -I/usr2/admin/src/dev/python-
2.3.1/Include -I/usr2/admin/src/dev/python-2.3.1 -
c /usr2/admin/src/dev/pyth
on-2.3.1/Modules/socketmodule.c -o build/temp.irix-6.3-
2.3/socketmodule.o
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c: In function
`socket_gethostname':
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c:2319: warning: implicit
declaration of function `gethostname'
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c: In function
`socket_inet_ntop':
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c:3016:
`INET_ADDRSTRLEN' undeclared (first use in this
function)
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c:3016: (Each undeclared
identifier is reported only once
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c:3016: for each function it
appears in.)
/usr2/admin/src/dev/python-
2.3.1/Modules/socketmodule.c:3016: warning: unused
variable `ip'
----------------------------------------------------------------------
>Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-04 17:39
Message:
Logged In: YES
user_id=29957
Fixed in socketmodule.c - the fix will be in 2.3.3 (and
2.4). For now, there's a patch available from
www.python.org/2.3.2/bugs.html
----------------------------------------------------------------------
Comment By: Randy Davis (randydavis1)
Date: 2003-10-02 05:44
Message:
Logged In: YES
user_id=876412
Testing for INET_ADDRSTRLEN defined in the header files:
-----
$ find /usr/include /usr/local/include -type f -exec
INET_ADDRSTRLEN {} /dev/null \;
$
-----
Nope, INET_ADDRSTRLEN isn't defined anywhere under IRIX
6.3, nor in any of the gcc (etc) installed header files
under /usr/local/include. (Thus, configuring with --disable-
ipv6 didn't help, either).
Concerning whether the SGI compiler does it also, I don't
know - the SGI compiler is a licensed product and isn't
licensed on this system (hence the use of gcc - but, gcc has
successfully compiled over 44 open source packages so far,
including samba and other network-related applications).
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-02 01:51
Message:
Logged In: YES
user_id=29957
With my brain screwed on correctly, I can see that my
previous comments weren't correct. I'm attaching a (brutal)
patch that "fixes" the problem, but before I apply it, I'd
like to know if the problem is just with gcc on Irix, or
does it also break with the SGI compiler? This looks like a
gcc bug, maybe...
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-10-01 19:03
Message:
Logged In: YES
user_id=29957
Hm. It looks we define INET_ADDRSTRLEN only if ENABLE_IPV6 is
false. Looking on my Linux machine, if IPV6 is enabled,
INET_ADDRSTRLEN is defined in netinet/in.h - can you see if
it's
available in any Irix header files? Alternately, try rerunning
configure with --disable-ipv6.
We could probably put an
#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
#endif
in socketmodule.c, but this seems to me like the problem might
be in the SGI headers...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=814613&group_id=5470
More information about the Python-bugs-list
mailing list