[mod_python] Compiling mod_python on 64bit RHEL 4

Posey, Jake E Jake.E.Posey at boeing.com
Thu Mar 8 15:09:27 EST 2007


I have a couple of issues.

 

One is I have Apache 1.3.31 and Python 2.3.4 and I'm trying to compile
mod_python 2.7.10 on 64bit RHEL 4 but after running configure
-with-apxs=/ots/apache_1.3.31/bin/apxs the make dso fails with the
following error.

 

/usr/bin/ld: mod_python.o: relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with
-fPIC

mod_python.o: could not read symbols: Bad value

collect2: ld returned 1 exit status

apxs:Break: Command failed with rc=1

make[1]: *** [mod_python.so] Error 1

make[1]: Leaving directory `/tmp/mod_python-2.7.10/src'

make: *** [do_dso] Error 2

 

I've tried several version of  apache, python, and mod_python and I get
the same error.

 

Second when I do just a plain ./configure
-with-apache=/tmp/apache_1.3.31 (which is the source code) 

 

[root at lcas204 mod_python-2.7.10]# make

make[1]: Entering directory `/tmp/mod_python-2.7.10/src'

 

Making static version of mod_python. For DSO, do "make dso".

 

rm -f libpython.a

ar cr libpython.a mod_python.o _apachemodule.o requestobject.o
tableobject.o util.o serverobject.o connobject.o

ranlib libpython.a

 

Now su and make install

  (or, if you only want to perform a partial install,

   you can use make install_static and make install_py_lib)

 

make[1]: Leaving directory `/tmp/mod_python-2.7.10/src'

 

 make install

 

After running make install it ask me to do this

 

Now cd into /tmp/apache_1.3.31 and reconfigure and rebuild apache with

    ./configure --activate-module=src/modules/python/libpython.a

    make

 

or, if you use the old Configure method, add to your src/Configuration
file

    AddModule modules/python/libpython.a

then, in src directory:

    ./Configure

    make

 

I perform the steps above but it doesn't create the mod_python.so file.
Am I missing a step here?

 

I've searched to no avail on finding a answer much less a fix.  I have
this same configuration on other machines however they are running 32bit
RHEL 4.  I tried this configuration on another machine same 64bit RHEL 4
os and it fails. So is there a problem with compiling and installing
mod_python on RHEL 64bit os?  Apache and Python installs find.  Have I
missed setting a flag in Apache and/or Python?

 

Need a solution, I don't have much hair left to pull out, beside my head
is getting sore.

 

Thanks,

 

Jake E. Posey

Email: jake.e.posey at boeing.com <mailto:jake.e.posey at boeing.com> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070308/0b719103/attachment.html


More information about the Mod_python mailing list