[mod_python] Installation problems on x86_64 machines and a solution

Thomas Crawley thomas.crawley at beacon-cs.com
Tue Jun 13 18:43:20 EDT 2006


Hi,

I was installing modpython on an AMD64 or X86_64 based machine today and
I ran into a problem which I solved but which might be of interest to
the list.

I had installed python 2.4.3 from source and then proceeded to install
modpython

I received the following error during the make phase of modpython
installation

"""""
/usr/include/features.h:150:1: warning: this is the location of the
previous definition
/bin/sh /usr/lib64/apr/build/libtool --silent --mode=link gcc -o
mod_python.la -I/tmp/modpython/mod_python-3.2.8/src/include
-I/usr/include/httpd -I/usr/local/include/python2.4  -rpath
/usr/lib64/httpd/modules -module -avoid-version    hlistobject.lo
hlist.lo filterobject.lo connobject.lo serverobject.lo util.lo
tableobject.lo requestobject.lo _apachemodule.lo mod_python.lo
-L/usr/local/lib/python2.4/config -Xlinker -export-dynamic -lm
-lpython2.4 -lpthread -ldl -lutil -lm
/usr/bin/ld: /usr/local/lib/python2.4/config/libpython2.4.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/local/lib/python2.4/config/libpython2.4.a: could not read symbols:
Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make: *** [do_dso] Error 2
"""""

The reason for this is that I had not installed python using the correct
options to the configure command.

You need to specify --enabled-shared option when running the configure
command which you use to generate the Python install files.

I reinstalled Python using this option and things went better with one
minor issue. I had to explicitly specify LD_LIBRARY_PATH in my bash
shell or Python would not load.

Modpython then installed fine.

This is not really a modpython problem but other people may have the
same issue so I hope this is useful.

Tom







More information about the Mod_python mailing list