I'm trying to compile mod_wsgi (version 3.3), Python 2.6, on a CentOS server - but under virtualenv
, with no success. I'm getting the error:
/usr/bin/ld:/home/python26/lib/libpython2.6.a(node.o):relocation R_X86_64_32 against `alocal symbol' can not be used whenmaking a shared object; recompile with-fPIC
/home/python26/lib/libpython2.6.a:could not read symbols: Bad value
According to the mod_wsgi Installation Issues docs, it could be that the libpython2.6.a file:
- isn't there
- wasn't generated with shared
- was generated for a 32-bit machine, not 64-bit.
Well, the file is in the right place, and readable. I tried to recompile Python 2.6 with the --enable-shared
option, but the entire compilation blew up, with roughly every file giving the same error, that libpython2.6.a was hosed.
I don't know that Python was compiling for 64-bit, but when I ran it, and did:
import platform
print platform.platform()
>>>Linux-2.6.18-028stab070.4-x86_64-with-redhat-5.6-Final
Since Python thinks it's on a x86_64, I would hope that it compiled for 64-bit - if anyone has any way of confirming that, I'd appreciate it.
I tried configuring the mod_wsgi Makefile with both with and without --python=/home/[...]/python2.6, both ways blew up.
I also tried compiling mod_wsgi outside of virtualenv
, using Python 2.4, and it worked fine. Unfortunately, that doesn't help me if I'm going to be using virtualenv
:)
Anyone know how I can get mod_wsgi to compile under virtualenv
?