[issue17216] sparc linux build fails with "could not import runpy module"

Ned Deily report at bugs.python.org
Sun Feb 17 22:27:54 CET 2013


Ned Deily added the comment:

I'm glad you got a little further.  Now it seems the build is failing when trying to build the _ssl and _hashlib extension modules.

building '_ssl' extension
gcc -pthread -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -I/c/backup/fes-a120d19nas/Python-3.3.0/Include -I/c/backup/fes-a120d19nas/Python-3.3.0 -c /c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.c -o build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.o
gcc -pthread -shared build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-padre-3.3/_ssl.cpython-33m.so
*** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-padre-3.3/_ssl.cpython-33m.so: undefined symbol: time, version key
building '_hashlib' extension
gcc -pthread -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -I/c/backup/fes-a120d19nas/Python-3.3.0/Include -I/c/backup/fes-a120d19nas/Python-3.3.0 -c /c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.c -o build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o
gcc -pthread -shared build/temp.linux-padre-3.3/c/backup/fes-a120d19nas/Python-3.3.0/Modules/_hashopenssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-padre-3.3/_hashlib.cpython-33m.so
make: *** [sharedmods] Error 138

Both of these modules are dependent on libssl and libcrypto, both normally supplied by openssl.  In the main setup.py file which is used to build the interpreter's extension modules, there are tests for the presence of these libs and their corresponding include files (setup.py line 759).  There are a list of locations that are searched including the standard system locations and /usr/local/ssl and /usr/contrib/ssl.  Apparently, setup.py is finding both includes and libs in one of those directories because otherwise it would skip attempting to build _ssl altogether.  But for some reason the link step fails with the undefined symbol message.  And then it seems that the _hashlib step fails altogether.  I have no personal experience with sparc linux installs, much less with the ReadyNAS (and I doubt anyone else here does either), so I can only speculate that the most likely cause of this failure is a broken openssl installation.  I'd check the above locations as well as under /usr/lib and /usr/include.  If you are using a package manager to install openssl, make sure it is a dev version with headers, like libssl-dev.  Good luck!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17216>
_______________________________________


More information about the Python-bugs-list mailing list