Python-2.2.1, Solaris7, make test fails...

Hugh Sasse Staff Elec Eng hgs at dmu.ac.uk
Thu Apr 18 12:12:12 EDT 2002


On 18 Apr 2002, Martin v. [iso-8859-1] Löwis wrote:

> Hugh Sasse Staff Elec Eng <hgs at dmu.ac.uk> writes:
>
> > It is worse
> >
> > Traceback (most recent call last):
> >   File "./Lib/test/test_socket.py", line 12, in ?
> >     import socket
> >   File "/home/hgs/Python-2.2.1/Lib/socket.py", line 41, in ?
> >     from _socket import *
> > ImportError: No module named _socket
>
> Here is the procedure to analyse this in detail:

Just to be clear, this is the CC=cc CXX=CC Forte6 compiler case:

 CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
 cc: WorkShop Compilers 5.0 98/12/15 C 5.0
>
> Theory 1: during building of _socket with setup.py, setup notices that
> building of _socket went wrong, and deletes it.

OK, analysing the make output I see 2 cc cmmands relating to building
the socket module.  These are now in a script, with -# added for verbose
output:

#!/bin/ksh -vx

# Script to rebuild the socket module
cc -# -DNDEBUG -O -DUSE_SSL=1 -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -c /home/hgs/Python-2.2.1/Modules/socketmodule.c -o build/temp.solaris-2.7-sun4u-2.2/socketmodule.o
cc -# -G build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.7-sun4u-2.2/_socket.so

Results in:


Script started on Thu 18 Apr 2002 17:04:40 BST
neelix hgs 11 %> ./do_build_socket
#!/bin/ksh -vx

# Script to rebuild the socket module
cc -# -DNDEBUG -O -DUSE_SSL=1 -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -c /home/hgs/Python-2.2.1/Modules/socketmodule.c -o build/temp.solaris-2.7-sun4u-2.2/socketmodule.o
+ cc -# -DNDEBUG -O -DUSE_SSL=1 -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -c /home/hgs/Python-2.2.1/Modules/socketmodule.c -o build/temp.solaris-2.7-sun4u-2.2/socketmodule.o
### Note: LM_LICENSE_FILE = /micro_stripes_4.0/license.dat:/workshop_license/licenses_combined
### Note: NLSPATH = /progs/forte6/SUNWspro/bin/../WS6U2/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/progs/forte6/SUNWspro/bin/../WS6U2/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
###     command line files and options (expanded):
### -c -DNDEBUG -DUSE_SSL=1 -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -xO2 /home/hgs/Python-2.2.1/Modules/socketmodule.c -o build/temp.solaris-2.7-sun4u-2.2/socketmodule.o
/progs/forte6/SUNWspro/bin/../WS6U2/bin/acomp -i /home/hgs/Python-2.2.1/Modules/socketmodule.c -o /tmp/acompAAAWmaiMG -r /tmp/acompBAAXmaiMG -DNDEBUG -DUSE_SSL=1 -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -O2 -Qy -D__SunOS_5_7 -D__SUNPRO_C=0x530 -D__SVR4 -D__unix -D__sun -D__sparc -D__BUILTIN_VA_ARG_INCR -Xa -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Dsparc -D__RESTRICT -I/progs/forte6/SUNWspro/WS6U2/include/cc "-g/progs/forte6/SUNWspro/bin/../WS6U2/bin/cc -DNDEBUG -O -DUSE_SSL='1' -I/usr/local/ssl/include -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude/ -c -o build/temp.solaris-2.7-sun4u-2.2/socketmodule.o " -D__SUN_PREFETCH
/progs/forte6/SUNWspro/bin/../WS6U2/bin/iropt -F -o /tmp/iroptCAAYmaiMG /tmp/acompBAAXmaiMG -xarch=generic -xcache=generic -xchip=generic -xprefetch=no -xvector=no -xbuiltin=%none -O2 -I
/progs/forte6/SUNWspro/bin/../WS6U2/bin/cg -xcode=abs32 -O2 -Qy -xmemalign=4s -xprefetch=no -xvector=no -xarch=generic -xcache=generic -xchip=generic -oo build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -is /tmp/acompAAAWmaiMG -ir /tmp/iroptCAAYmaiMG -xbuiltin=%none
cc -# -G build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.7-sun4u-2.2/_socket.so
+ cc -# -G build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.7-sun4u-2.2/_socket.so
### Note: LM_LICENSE_FILE = /micro_stripes_4.0/license.dat:/workshop_license/licenses_combined
### Note: NLSPATH = /progs/forte6/SUNWspro/bin/../WS6U2/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/progs/forte6/SUNWspro/bin/../WS6U2/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
###     command line files and options (expanded):
### -G build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.7-sun4u-2.2/_socket.so
### Note: LD_LIBRARY_PATH = /progs/forte6/SUNWspro/lib:/ansys50/SC2.0.1:/usr/openwin/lib:/opt/panorama/lib
### Note: LD_RUN_PATH = <null>
/usr/ccs/bin/ld /progs/forte6/SUNWspro/WS6U2/lib/crti.o /progs/forte6/SUNWspro/WS6U2/lib/values-xa.o -o build/lib.solaris-2.7-sun4u-2.2/_socket.so -G build/temp.solaris-2.7-sun4u-2.2/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -Y "P,/progs/forte6/SUNWspro/WS6U2/lib:/usr/ccs/lib:/usr/lib" -Qy /progs/forte6/SUNWspro/WS6U2/lib/crtn.o
neelix hgs 12 %> exit
neelix hgs 13 %>
script done on Thu 18 Apr 2002 17:05:17 BST
End of Results.
>
>   If that is the case (analyse setup.py output): Invoke the commands
>   to build _socket, and report whether this succeeds. If it does,
>   start ./python, and 'import socket'; report any errors that this

I can't tell if that worked:

Script started on Thu 18 Apr 2002 17:06:22 BST
neelix hgs 11 %> ./python
Python 2.2.1 (#1, Apr 18 2002, 16:33:40) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/hgs/Python-2.2.1/Lib/socket.py", line 41, in ?
    from _socket import *
ImportError: ld.so.1: ./python: fatal: relocation error: file /home/hgs/Python-2.2.1/build/lib.solaris-2.7-sun4u-2.2/_socket.so: symbol __eprintf: referenced symbol not found
>>>
neelix hgs 12 %> exit
neelix hgs 13 %>
script done on Thu 18 Apr 2002 17:07:01 BST
>   gives.
>
> To work around this, we need
>
> Theory 2: building the socket module fails because setup.py detects
> presence of OpenSSL, yet the OpenSSL versions is to old for the socket
> module.

How old is acceptable ( before I disclose the version number publicly!!
:-) )
>
>   If that is the case, you'll need to edit Modules/Setup, and build
>   the socket module explicitly without SSL support (either shared or
>   static).
>
> Regards,
> Martin
> --
> http://mail.python.org/mailman/listinfo/python-list
>
        Thank you,
        Hugh







More information about the Python-list mailing list