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.3c1, Solaris 2.7: socketmodule does not compile
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fsm2761, georg.brandl, nnorwitz, sfiedler
Priority: normal Keywords:

Created on 2003-12-05 16:01 by fsm2761, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (8)
msg19282 - (view) Author: Falko Sauermann (fsm2761) Date: 2003-12-05 16:01
Compiling Python-2.3.3c1 on Solaris 2.7 with gcc 2.95.3
gave me two errors:

socketmodule.c:2975: `AF_INET6' undeclared (first use
in this function)

socketmodule.c:3019: `INET_ADDRSTRLEN' undeclared
(first use in this function)

The first problem was already reported for Solaris 2.7
with SunPro cc (see item 814613) but is also true for
Solaris 2.7 with gcc.

The real problem is that AF_INET6 is used when
ENABLE_IPV6 is undefined. I believe this must fail for
any system where IPV6 is not avalilable.

The second problem was already reported for Irix (see
item 818490) but is also true for Solaris 2.7. The
solution for Irix is also valid for Solaris. If I
change socketmodule.c line 204 to:

#if (defined(__sgi) || defined(sun)) &&
!defined(INET_ADDRSTRLEN)

the error is gone.
msg19283 - (view) Author: Stephan A. Terre (sfiedler) Date: 2004-02-26 17:23
Logged In: YES 
user_id=246063

I think it's worth noting that the preprocessor directive
near line 2975 is #ifndef , whereas all other preprocessor
directives in the file that refer to the IPV6 symbol are
#ifdef . In other words, it looks like just that one
directive is a typo. Changing #ifndef to #ifdef fixes it for me.
msg19284 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2004-10-18 02:37
Logged In: YES 
user_id=33168

Does this problem still exist in 2.3.4 or 2.4b1?  Can this
be closed?
msg19285 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2004-10-19 01:29
Logged In: YES 
user_id=33168

Does this problem still exist in 2.3.4 or 2.4b1?  Can this
be closed?
msg19286 - (view) Author: Stephan A. Terre (sfiedler) Date: 2004-10-20 01:11
Logged In: YES 
user_id=246063

I built and installed both 2.3.3 and 2.3.4, and I get the
same error that I was before. It actually occurs in the
install phase, when building socketmodule.c. This is on
Solaris 2.7 with gcc 2.95.2.

I've run out of time tonight to finish building 2.4b1, but
I'll do that tomorrow and see what happens.

I'm happy to provide the complete or partial build logs if
that would help.
msg19287 - (view) Author: Stephan A. Terre (sfiedler) Date: 2004-10-20 17:52
Logged In: YES 
user_id=246063

Okay, here are my results:

Python 2.3.3 and 2.3.4 both give errors about both AF_INET6
and INET_ADDRSTRLEN being undeclared. The line numbers are
different, but everything else is the same. The specific
errors from the 2.3.4 install are:

socketmodule.c:2979: `AF_INET6' undeclared (first use in
this function)
socketmodule.c:3023: `INET_ADDRSTRLEN' undeclared (first use
in this function)


Python 2.4b1 only gives an error about INET_ADDRSTRLEN:

socketmodule.c:3350: `INET_ADDRSTRLEN' undeclared (first use
in this function)


The string INET_ADDRSTRLEN did not appear anywhere in the
files under /usr/include on this system.

In the 2.4b1 tree, if I just #define INET_ADDRSTRLEN to 16,
as hinted by Lib/plat-sunos5/IN.py, then socketmodule.c
compiles with only minor warnings. I don't know the right
way to get this information into the source file though,
sorry. Also, I'm not sure what a good test would be to
determine whether this value is actually correct.

Because a fresh build of both 2.3.4 and 2.4b1 does not
create the _socket module, I believe this bug should not yet
be closed.
msg19288 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 09:44
Logged In: YES 
user_id=1188172

Fixed in revisions 42509, 42510.
msg19289 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 09:46
Logged In: YES 
user_id=1188172

Fixed in revisions 42509, 42510.
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39669
2003-12-05 16:01:53fsm2761create