Trouble with _socket on Solaris installation

Tom Loredo loredo at astro.cornell.edu
Tue Jan 22 18:21:54 EST 2002


Hi folks-

I'm installing Python2.2 on a Sun Sparcstation running Solaris 5.7
and using GCC 3.0.1.  Python2.1 builds fine on this machine, with
no tests failing (I had to modify the Setup file to get sunaudiodev
and nis to work).  Python2.2 mostly builds fine, but 3 tests
fail:  test_socket test_sundry test_urllib2.  urllib2 appears to
be new with 2.2, so I don't suppose I should have any expectations
about that.  sundry fails because there is no bsddb module (but it
fails with 2.1 as well when I run the test by hand---somehow it
didn't show up in "make test").

The one that bothers me is test_socket.  This runs fine under 2.1,
but under 2.2 _socket gets deleted during the build:

   WARNING: removing "_socket" since importing it failed

socketmodule.c compiles, and _socket.so gets linked, apparently
successfully, but then the message appears.

I compared the build with 2.1, and found that socketmodule.c
was compiled without the NDEBUG flag set (it's set in 2.2) 
and at O2 (rather than O3 in 2.2).  But changing this doesn't
affect the results.  Otherwise, the two builds use the same
flags and include files.  If I build _socket by hand (copying
the commands from the makefile log) and import it, I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ld.so.1: python: fatal: libssl.so.0.9.6: open failed: No such file or directory

But there is no such error importing _socket with 2.1.

During compilation there is a ton of "function declaration isn't 
a prototype" warnings under both 2.1 and 2.2.  There is also

   getaddrinfo.c:231: warning: subscript has type `char'

but only with 2.2.  A "diff" shows *many* changes in the module
source code from 2.1 to 2.2.  Not knowing anything about socket
programming, I have no clue if any of the changes are behind
the problem.

I don't use _socket directly, but I do use other libraries that
use it (ftplib, for example), so I need this to work.  Any help
will be much appreciated.

Thanks,
Tom Loredo



More information about the Python-list mailing list