[Python-bugs-list] [ python-Bugs-486099 ] socketmodule won't compile on BSDI 4.0

noreply@sourceforge.net noreply@sourceforge.net
Wed, 28 Nov 2001 01:30:44 -0800


Bugs item #486099, was opened at 2001-11-27 10:19
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=486099&group_id=5470

Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason R. Mastaler (jasonrm)
Assigned to: Martin v. Löwis (loewis)
Summary: socketmodule won't compile on BSDI 4.0

Initial Comment:
Trying to build 2.2b2 on  BSDI BSD/OS 4.0 with gcc
2.7.2.1 and gcc 2.95.2, and the socket module won't
build.  No problems building socket for Python 2.1.1
on this same machine.

% ./configure  --with-threads=no

# for socket(2), without SSL support.
_socket socketmodule.c

% gmake
gcc -D_HAVE_BSDI -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DHAVE_CONFIG_H   -c
./Modules/socketmodule.c -o Modules/socketmodule.o
In file included from ./Modules/socketmodule.c:187:
/usr/local/packages/gcc-2.95.2/lib/gcc-lib/i386-pc-bsdi4.0/2.95.2/include/stddef.h:280:
conflicting types for `wint_t'
/usr/include/wchar.h:7: previous declaration of
`wint_t'
In file included from ./Modules/socketmodule.c:236:
Modules/getaddrinfo.c: In function `gai_strerror':
Modules/getaddrinfo.c:205: `EAI_MAX' undeclared (first
use in this function)
Modules/getaddrinfo.c:205: (Each undeclared identifier
is reported only once
Modules/getaddrinfo.c:205: for each function it appears
in.)
Modules/getaddrinfo.c: In function `getaddrinfo':
Modules/getaddrinfo.c:285: `EAI_BADHINTS' undeclared
(first use in this function)
Modules/getaddrinfo.c:286: `AI_MASK' undeclared (first
use in this function)
Modules/getaddrinfo.c:376: `EAI_PROTOCOL' undeclared
(first use in this function)
Modules/getaddrinfo.c:464: `AI_NUMERICHOST' undeclared
(first use in this function)
./Modules/socketmodule.c: In function
`PySocketSock_init':
./Modules/socketmodule.c:1818: warning: function
declaration isn't a prototype
./Modules/socketmodule.c: In function
`PySocket_fromfd':
./Modules/socketmodule.c:2304: warning: function
declaration isn't a prototype
gmake: *** [Modules/socketmodule.o] Error 1


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-11-28 01:30

Message:
Logged In: YES 
user_id=21627

Ok, then we need to investigate the configure results. Can
you please attach pyconfig.h and config.log to this report?
Also, can you please confirm that you build Python from
scratch with 2.7.2.1 (i.e untarring a fresh source tree, to
avoid using a config.cache left over from gcc 2.95.2)?

Furthermore, can you please report details of the
getaddrinfo implementation on your system? Does it provide
one? In the C library? If not, can you confirm that
EAI_ADDRFAMILY is defined in your system headers, but
EAI_MAX is not? If yes, can you speculate as to why
configure thinks your system does not have getaddrinfo?

----------------------------------------------------------------------

Comment By: Jason R. Mastaler (jasonrm)
Date: 2001-11-27 15:21

Message:
Logged In: YES 
user_id=85984

I probably should have included the output from gcc 2.7.2.1
instead which I know is properly installed.  The results are
similar, although there is no mention of `wint_t':

% gmake
gcc -D_HAVE_BSDI -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DHAVE_CONFIG_H   -c ./Modules/socketmodule.c -o
Modules/socketmodule.o
In file included from Include/pyport.h:93,
                 from Include/Python.h:60,
                 from ./Modules/socketmodule.c:78:
/usr/include/math.h:177: warning: function declaration isn't
a prototype
/usr/include/math.h:257: warning: function declaration isn't
a prototype
In file included from Include/unicodeobject.h:118,
                 from Include/Python.h:69,
                 from ./Modules/socketmodule.c:78:
/usr/include/wchar.h:15: warning: function declaration isn't
a prototype
In file included from /usr/include/signal.h:46,
                 from ./Modules/socketmodule.c:140:
/usr/include/sys/signal.h:121: warning: function declaration
isn't a prototype
/usr/include/sys/signal.h:164: warning: function declaration
isn't a prototype
Modules/getaddrinfo.c: In function `gai_strerror':
In file included from ./Modules/socketmodule.c:236:
Modules/getaddrinfo.c:205: `EAI_MAX' undeclared (first use
this function)
Modules/getaddrinfo.c:205: (Each undeclared identifier is
reported only once
Modules/getaddrinfo.c:205: for each function it appears in.)
Modules/getaddrinfo.c: In function `getaddrinfo':
Modules/getaddrinfo.c:285: `EAI_BADHINTS' undeclared (first
use this function)
Modules/getaddrinfo.c:286: `AI_MASK' undeclared (first use
this function)
Modules/getaddrinfo.c:376: `EAI_PROTOCOL' undeclared (first
use this function)
Modules/getaddrinfo.c:464: `AI_NUMERICHOST' undeclared
(first use this function)
./Modules/socketmodule.c: In function `PySocketSock_init':
./Modules/socketmodule.c:1818: warning: function declaration
isn't a prototype
./Modules/socketmodule.c: In function `PySocket_fromfd':
./Modules/socketmodule.c:2304: warning: function declaration
isn't a prototype
gmake: *** [Modules/socketmodule.o] Error 1


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-11-27 15:08

Message:
Logged In: YES 
user_id=21627

Are you sure the compiler is properly installed? That you
have wint_t definition both in wchar.h and stddef.h (as
fixincluded by gcc) is not Python's doing; either the header
files of your operating system are corrupt, or the compiler
is broken.

If you cannot figure out the details, please attach both
header files to this report.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-11-27 12:07

Message:
Logged In: YES 
user_id=31435

Assigned to Martin.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=486099&group_id=5470