Logged In: YES
user_id=21627
It's actually not a bug in the Python configure, but a
limitation of AMD64 (or, rather, the linker/dynamic loader
toolchain).
It complains that some object file of Python wasn't compiled
with -fPIC (position-independent code). This is a problem
only if
a) you are linking a static library into a shared one
(mod_python, in this case), and
b) the object files in the static library weren't compiled
with -fPIC, and
c) the system doesn't support position-dependent code in a
shared library
As you may have guessed by now, it is really c) which I
blame. On all other modern systems, linking non-PIC objects
into a shared library is supported (albeit sometimes with a
performance loss on startup).
So your options are
a) don't build a static libpython, instead, build Python
with --enable-shared. This will give you libpython24.so
which can then be linked "into" mod_python
b) manually add -fPIC to the list of compiler options when
building Python, by editing the Makefile after configure has run
c) find a way to overcome the platform limitation. E.g. on
Solaris, the linker supports an impure-text option which
instructs it to accept relocations in a shared library.
You might wish that the Python build process supported
option b), i.e. automatically adds -fPIC on Linux/AMD64.
IMO, this would be a bad choice, since -fPIC itself usually
causes a performance loss, and isn't needed when we link
libpython24.a into the interpreter (which is an executable,
not a shared library).
Therefore, I'll close this as "won't fix", and recommend to
go with solution a).
|