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

Martin v. Löwis loewis at informatik.hu-berlin.de
Thu Apr 18 12:46:05 EDT 2002


Hugh Sasse Staff Elec Eng <hgs at dmu.ac.uk> writes:

> 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

Alright, so it does link SSL (and SSL is likely in a useful version, also).

> I can't tell if that worked:
> 
> >>> 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

That is the problem: The SSL libraries refer to a symbol __eprintf,
which originates from compiling the SSL libraries with GCC. GCC
defines this symbol in libgcc.a, which is implicitly linked always.

Now, when you link _socket.so with SunPRO, libgcc.a is not implicitly
linked, hence the error.


> How old is acceptable ( before I disclose the version number publicly!!
> :-) )

It turns out that this theory was only partially true; the SSL version
is fine, but the compiler the wrong one. You have the following
options (all alternative):

1. Build Python with GCC.
2. Rebuild OpenSSL with SunPRO.
3. Explicitly link libgcc.a to _socket.so, by editing Modules/Setup
4. Build without SSL support, by editing Modules/Setup.

HTH,
Martin





More information about the Python-list mailing list