[mod_python] Build troubles on Solaris

Davin McCall davmac at deakin.edu.au
Tue Jun 28 00:30:09 EDT 2005

I was having trouble building mod_python on Solaris 9, using gcc 3.4.4 
and apache 2.0.54.

I got:

/usr/local/apache2/build/libtool --silent --mode=link gcc -o 
mod_python.la  -rpath /usr/local/apache2/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 
-lm -lpython2.4 -lresolv -lsocket -lnsl -lrt
-ldl -lpthread -lm _eprintf.o _floatdidf.o _muldi3.o

*** Warning: Linking the shared library mod_python.la against the 
*** objects  _eprintf.o _floatdidf.o _muldi3.o is not portable!
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x1030      
<unknown>                           0x1034      
<unknown>                           0x1038      
<unknown>                           0x103c      

... and eventually:

ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
make[1]: *** [mod_python.so] Error 1
make[1]: Leaving directory `/usr/local/src/mod_python-3.1.4/src'
make: *** [do_dso] Error 2

 From browsing list archives I see that one or two other people have had 
a similar problem.  I resolved it by re-building python with 
--enable-shared. It doesn't mention in the mod_python docs that you need 
to do this, but apparently so.


Davin McCall, Research Programmer
Deakin University, Burwood, Australia.
Phone: 03 9251 7045 International: +61 3 9251 7045
Email: Davin.McCall at deakin.edu.au
Website: http://www.deakin.edu.au
Deakin University CRICOS Provider Code 00113B (Vic)

More information about the Mod_python mailing list