[mod_python] Trouble loading mod_python Mac Os X

Florian Leitner florian.leitner at cnio.es
Mon Sep 8 14:21:00 EDT 2008

I, too, have the same problem as Alex Lurthu loading mod_python. I am  
using an OSX Server (10.5.3), ppc64 architecture. After solving the  
architecture problem, I get these error messages:

[Mon Sep 08 19:42:55 2008] [error] (9)Bad file descriptor:  
apr_pollset_poll: (listen)
httpd: Syntax error on line 164 of /private/etc/apache2/httpd.conf:  
Can't locate API module structure `pyhton25_module' in file /usr/ 
libexec/apache2/mod_python.so: dlsym(0x100206d00, pyhton25_module):  
symbol not found

(pyhton25_module is the name I gave mod_python in the OSX server  
Apache configuration)
I then followed Graham's advice to get the latest SVN version. This  
helps solving the architecture problem without any manual  
interventions (i.e., I just configure/make/install, and the can go  
"directly" to the "symbol not found" error), but the symbol error does  
not get resolved. Then, I found a blog describing this "symbol not  
found" error because OSX Server is calling /usr/bin/envvars when  
executing apachectl, which contains these lines:


I commented out those as advised, but obviously without help - the  
symbol error also persists after recompiling mod_python with those  
line commented and/or calling /usr/sbin/httpd directly. Also launching  
httpd with different architecture flags (using

/usr/bin/arch -arch <some arch> /usr/sbin/httpd -D FOREGROUND

) does not help. Also, the output of otool looks nice:

	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current  
version 111.1.1)
(compatibility version 2.5.0, current version 2.5.1)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current  
version 1.0.0)

Just as the file output:

/usr/libexec/apache2/mod_python.so: Mach-O universal binary with 4  
/usr/libexec/apache2/mod_python.so (for architecture ppc7400):	Mach-O  
bundle ppc
/usr/libexec/apache2/mod_python.so (for architecture ppc64):	Mach-O 64- 
bit bundle ppc64
/usr/libexec/apache2/mod_python.so (for architecture i386):	Mach-O  
bundle i386
/usr/libexec/apache2/mod_python.so (for architecture x86_64):	Mach-O  
64-bit bundle x86_64

So I am quite clueless now. Any ideas? Thanks!


ppc64 (G5)
OSX Server 10.5.4
SVN version, and 3.3.1
2.5.1 (OSX 10.5.4 default version)

Florian Leitner
fleitner at cnio.es

BioCreative MetaServer:

Spanish National Cancer Research Centre
Structural and Computational Biology Unit
C/ Melchor Fernandez Almagro, 3
E-28029 Madrid

**NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
**CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies.

More information about the Mod_python mailing list