Problem building python 2.7 with --enable-shared

Marten Lehmann lehmannmapson at cnm.de
Thu Sep 16 13:40:02 EDT 2010


Hello,
I've build python 2.7 successfully by just calling configure, make and 
make install. But to use python within PostgreSQL, I need to built 
python with --enable-shared.
I tried to do so (configure --enable-shared), but I see these lines 
several times in the log (but compiling continues):
/usr/bin/ld: /test/python/lib/libpython2.7.a(abstract.o): relocation 
R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC
/test/python/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Later, the compiling process ends completely:
PYTHONPATH=/var/tmp/vrmd-python2-root/test/python/lib/python2.7 
LD_LIBRARY_PATH=/usr/src/redhat/BUILD/Python-2.7: \
 ./python -Wi -tt 
/var/tmp/vrmd-python2-root/test/python/lib/python2.7/compileall.py \
 -d /test/python/lib/python2.7 -f \
 -x 
'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
 /var/tmp/vrmd-python2-root/test/python/lib/python2.7
Traceback (most recent call last):
 File 
"/var/tmp/vrmd-python2-root/test/python/lib/python2.7/compileall.py", 
line 17, in <module>
 import struct
 File 
"/var/tmp/vrmd-python2-root/test/python/lib/python2.7/struct.py", line 
1, in <module>
 from _struct import *
ImportError: No module named _struct
make: *** [libinstall] Error 1
Any ideas, what I have done wrong?
Kind regards
Marten


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /