This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.3.4, Solaris 7, socketmodule.c does not compile
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: anthonybaxter, brucedray
Priority: normal Keywords:

Created on 2004-06-14 18:36 by brucedray, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg21185 - (view) Author: Bruce D. Ray (brucedray) Date: 2004-06-14 18:36
Build of Python 2.3.4 on Solaris 7 with SUN WorkshopPro
compilers
fails to compiile socketmodule.c with the following
error messages on the build:

"/export/home/bruce/python/Python-2.Modules/socketmodule.c",
line 2979: undefined symbol: AF_INET6
"/export/home/bruce/python/Python-2.Modules/socketmodule.c",
line 3023: undefined symbol: INET_ADDRSTRLEN
"/export/home/bruce/python/Python-2.Modules/socketmodule.c",
line 3023: integral constant expression expected
"/export/home/bruce/python/Python-2.Modules/socketmodule.c",
line 3053: warning: improper pointer/integer
combination: op "="
"/export/home/bruce/python/Python-2.Modules/socketmodule.c",
line 3062: warning: statement not reached
cc: acomp failed for
/export/home/bruce/python/Python-2.Modules/socketmodule.c


As a consequence of the above, make test gave errors
for every
test that attempted to import _socket



Other error messages in the build not related to the
socketmodule.c issue were:

"Objects/frameobject.c", line 301: warning:
non-constant initializer: op "--"
"Objects/frameobject.c", line 303: warning:
non-constant initializer: op "--"
"Objects/stringobject.c", line 1765: warning: statement
not reached
"Python/ceval.c", line 3427: warning: non-constant
initializer: op "--"
"Python/ceval.c", line 3550: warning: non-constant
initializer: op "--"
"Python/ceval.c", line 3551: warning: non-constant
initializer: op "--"
"/export/home/bruce/python/Python-2.Modules/pypcre.c",
line 995: warning: non-constant initializer: op "++"
"/export/home/bruce/python/Python-2.Modules/pypcre.c",
line 2574: warning: non-constant initializer: op "--"
"/export/home/bruce/python/Python-2.Modules/unicodedata.c",
line 313: warning: non-constant initializer: op "--"
"/export/home/bruce/python/Python-2.Modules/parsermodule.c",
line 2493: warning: non-constant initializer: op "++"

"/export/home/bruce/python/Python-2.Modules/expat/xmlparse.c",
line 3942: warning: non-constant initializer: op "<<="




Configuration output was:

checking MACHDEP... sunos5
checking EXTRAPLATDIR... 
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... no
checking for g++... no
checking for gcc... no
checking for CC... CC
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for gcc... no
checking for cc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for egrep... egrep
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for --with-suffix... 
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION).a
checking LINKCC... $(PURIFY) $(CC)
checking for --enable-shared... no
checking LDLIBRARY... libpython$(VERSION).a
checking for ranlib... ranlib
checking for ar... ar
checking for a BSD-compatible install... ./install-sh -c
checking for --with-pydebug... no
checking whether cc accepts -OPT:Olimit=0... no
checking whether cc accepts -Olimit 1500... no
checking whether pthreads are available without
options... no
checking whether cc accepts -Kpthread... no
checking whether cc accepts -Kthread... no
checking whether cc accepts -pthread... no
checking whether CC also accepts flags for thread
support... no
checking for ANSI C header files... (cached) yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking thread.h usability... yes
checking thread.h presence... yes
checking for thread.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking sys/audioio.h usability... yes
checking sys/audioio.h presence... yes
checking for sys/audioio.h... yes
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/lock.h usability... yes
checking sys/lock.h presence... yes
checking for sys/lock.h... yes
checking sys/mkdev.h usability... yes
checking sys/mkdev.h presence... yes
checking for sys/mkdev.h... yes
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking pty.h usability... no
checking pty.h presence... no
checking for pty.h... no
checking term.h usability... no
checking term.h presence... yes
configure: WARNING: term.h: present but cannot be compiled
configure: WARNING: term.h: check for missing
prerequisite headers?
configure: WARNING: term.h: proceeding with the
preprocessor's result
configure: WARNING:     ##
------------------------------------ ##
configure: WARNING:     ## Report this to
bug-autoconf@gnu.org. ##
configure: WARNING:     ##
------------------------------------ ##
checking for term.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netpacket/packet.h usability... no
checking netpacket/packet.h presence... no
checking for netpacket/packet.h... no
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether sys/types.h defines makedev... no
checking for sys/mkdev.h... (cached) yes
checking for clock_t in time.h... yes
checking for makedev... no
checking Solaris LFS bug... no
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for void *... yes
checking size of void *... 4
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for float... yes
checking size of float... 4
checking for double... yes
checking size of double... 8
checking for fpos_t... yes
checking size of fpos_t... 8
checking for long long support... yes
checking for long long... yes
checking size of long long... 8
checking for uintptr_t support... no
checking size of off_t... 8
checking whether to enable large file support... yes
checking size of time_t... 4
checking for pthread_t... yes
checking size of pthread_t... 4
checking for --enable-toolbox-glue... no
checking for --enable-framework... no
checking for dyld... no
checking SO... .so
checking LDSHARED... $(CC) -G
checking CCSHARED... 
checking LINKFORSHARED... 
checking CFLAGSFORSHARED... 
checking SHLIBS... $(LIBS)
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for library containing sem_init... -lrt
checking for textdomain in -lintl... yes
checking for t_open in -lnsl... yes
checking for socket in -lsocket... yes
checking for --with-libs... no
checking for --with-signal-module... yes
checking for --with-dec-threads... no
checking for --with-threads... yes
checking for _POSIX_THREADS in unistd.h... yes
checking cthreads.h usability... no
checking cthreads.h presence... no
checking for cthreads.h... no
checking mach/cthreads.h usability... no
checking mach/cthreads.h presence... no
checking for mach/cthreads.h... no
checking for --with-pth... no
checking for pthread_create in -lpthread... yes
checking for usconfig in -lmpc... no
checking if PTHREAD_SCOPE_SYSTEM is supported... yes
checking for pthread_sigmask... yes
checking if --enable-ipv6 is specified... no
checking for --with-universal-newlines... yes
checking for --with-doc-strings... yes
checking for --with-pymalloc... yes
checking for --with-wctype-functions... no
checking for --with-sgi-dl... no
checking for --with-dl-dld... no
checking for dlopen... yes
checking DYNLOADFILE... dynload_shlib.o
checking MACHDEP_OBJS... MACHDEP_OBJS
checking for alarm... yes
checking for chown... yes
checking for clock... yes
checking for confstr... yes
checking for ctermid... yes
checking for execv... yes
checking for fork... yes
checking for fpathconf... yes
checking for ftime... yes
checking for ftruncate... yes
checking for gai_strerror... no
checking for getgroups... yes
checking for getlogin... yes
checking for getloadavg... yes
checking for getpeername... yes
checking for getpgid... yes
checking for getpid... yes
checking for getpriority... yes
checking for getpwent... yes
checking for getwd... yes
checking for kill... yes
checking for killpg... yes
checking for lchown... yes
checking for lstat... yes
checking for mkfifo... yes
checking for mknod... yes
checking for mktime... yes
checking for mremap... no
checking for nice... yes
checking for pathconf... yes
checking for pause... yes
checking for plock... yes
checking for poll... yes
checking for pthread_init... no
checking for putenv... yes
checking for readlink... yes
checking for realpath... yes
checking for select... yes
checking for setegid... yes
checking for seteuid... yes
checking for setgid... yes
checking for setlocale... yes
checking for setregid... yes
checking for setreuid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setuid... yes
checking for setvbuf... yes
checking for snprintf... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sigrelse... yes
checking for strftime... yes
checking for strptime... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for tempnam... yes
checking for timegm... no
checking for times... yes
checking for tmpfile... yes
checking for tmpnam... yes
checking for tmpnam_r... yes
checking for truncate... yes
checking for uname... yes
checking for unsetenv... no
checking for utimes... yes
checking for waitpid... yes
checking for wcscoll... yes
checking for _getpty... no
checking for chroot... yes
checking for link... yes
checking for symlink... yes
checking for fchdir... yes
checking for fsync... yes
checking for fdatasync... yes
checking for ctermid_r... no
checking for flock... no
checking for getpagesize... yes
checking for true... true
checking for inet_aton in -lc... no
checking for inet_aton in -lresolv... yes
checking for hstrerror... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for setgroups... yes
checking for openpty... no
checking for openpty in -lutil... no
checking for forkpty... no
checking for forkpty in -lutil... no
checking for fseek64... no
checking for fseeko... yes
checking for fstatvfs... yes
checking for ftell64... no
checking for ftello... yes
checking for statvfs... yes
checking for dup2... yes
checking for getcwd... yes
checking for strdup... yes
checking for strerror... yes
checking for memmove... yes
checking for getpgrp... yes
checking for setpgrp... (cached) yes
checking for gettimeofday... yes
checking for major... yes
checking for getaddrinfo... no
checking for getnameinfo... no
checking whether time.h and sys/time.h may both be
included... yes
checking whether struct tm is in sys/time.h or
time.h... time.h
checking for struct tm.tm_zone... no
checking for tzname... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both
be included... yes
checking for addrinfo... no
checking for sockaddr_storage... no
checking whether char is unsigned... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for bad exec* prototypes... no
checking if sockaddr has sa_len member... no
checking whether va_list is an array... no
checking for gethostbyname_r... yes
checking gethostbyname_r with 6 args... no
checking gethostbyname_r with 5 args... yes
checking for __fpu_control... no
checking for __fpu_control in -lieee... no
checking for --with-fpectl... no
checking for --with-libm=STRING... default LIBM="-lm"
checking for --with-libc=STRING... default LIBC=""
checking for hypot... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for wchar_t... yes
checking size of wchar_t... 4
checking for UCS-4 tcl... no
checking what type to use for unicode... unsigned short
checking whether byte ordering is bigendian... yes
checking whether right shift extends the sign bit... yes
checking for getc_unlocked() and friends... yes
checking for rl_pre_input_hook in -lreadline... no
checking for rl_completion_matches in -lreadline... no
checking for broken nice()... no
checking for broken poll()... no
checking for working tzset()... no
checking for tv_nsec in struct stat... yes
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for socklen_t... yes
checking for build directories... done
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating pyconfig.h
creating Setup
creating Setup.local
creating Makefile
msg21186 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-06-18 11:36
Logged In: YES 
user_id=29957

Hm. I don't get this on Solaris 7 using GCC. Can you try
with gcc, and see if the problem is in Sun's headers on your
system, or with the Sun compiler?

msg21187 - (view) Author: Bruce D. Ray (brucedray) Date: 2004-06-29 21:30
Logged In: YES 
user_id=1063363

I've checked further, and there is a problem in Sun's headers as
supplied with Solaris 7 Server 5/99 edition that the
standard set of
free patches apparently does not address.  For this edition
of Solaris 7,
sys/socket.h does not have either AF_INET6 or INET_ADDRSTRLEN
defined (seen on multiple systems).  socketmodule.c will compile
correctly with SunWorkshopPro 5.0 compilers and passes test
if the
following lines are added prior to the first function in
socketmodule.c:

#ifndef AF_INET6            /* not present in some Solaris 7
versions */
#define AF_INET6 26       /* use the Solaris 8 sys/socket.h
definition */
#endif

#ifndef INET_ADDRSTRLEN     /* not present in some Solaris 7
versions */
#define INET_ADDRSTRLEN 16   /* use the definition given for
SGI above */
#endif


History
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40398
2004-06-14 18:36:54brucedraycreate