Bugs item #854823, was opened at 2003-12-05 17:01 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=854823&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build Group: Python 2.3 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Falko Sauermann (fsm2761) Assigned to: Nobody/Anonymous (nobody) Summary: Python-2.3.3c1, Solaris 2.7: socketmodule does not compile Initial Comment: 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. ---------------------------------------------------------------------- >Comment By: Georg Brandl (birkenfeld) Date: 2006-02-20 10:44 Message: Logged In: YES user_id=1188172 Fixed in revisions 42509, 42510. ---------------------------------------------------------------------- Comment By: Stephan A. Terre (sfiedler) Date: 2004-10-20 19:52 Message: 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. ---------------------------------------------------------------------- Comment By: Stephan A. Terre (sfiedler) Date: 2004-10-20 03:11 Message: 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. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2004-10-19 03:29 Message: Logged In: YES user_id=33168 Does this problem still exist in 2.3.4 or 2.4b1? Can this be closed? ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2004-10-18 04:37 Message: Logged In: YES user_id=33168 Does this problem still exist in 2.3.4 or 2.4b1? Can this be closed? ---------------------------------------------------------------------- Comment By: Stephan A. Terre (sfiedler) Date: 2004-02-26 18:23 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=854823&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com