I am trying to compile mod_wsgi (version 3.3), Python 2.6, on a CentOS server, but in virtualenv , without success. I get an error message:
/USR/ ben / ld: / home / python 26 / lib / libpython2.6.a (node.o): moving R_X86_64_32 against `a local character" cannot be used when creating a shared object; recompile -fPIC
/home/python26/lib/libpython2.6.a: unable to read characters: Bad value
According to mod_wsgi Installation Issues docs it could be that the file libpython2.6.a:
- does not exist
- was not created in conjunction with
- was created for a 32-bit machine, not a 64-bit version.
Well, the file is in the right place and is readable. I tried to recompile Python 2.6 with the --enable-shared option, but the whole compilation exploded, with approximately every file giving the same error as libpython2.6.a was closed.
I don't know that Python compiled 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 about this on x86_64, I hope it compiled for 64-bit - if anyone could confirm this, I would appreciate it.
I tried to configure the make_file mod_wsgi file with and without --python = / home /[...†/ python2.6, both paths exploded.
I also tried compiling mod_wsgi outside of virtualenv using Python 2.4 and it worked fine. Unfortunately, this will not help me if I use virtualenv :)
Does anyone know how I can get mod_wsgi to compile under virtualenv ?