[mod_python] 64bit Architecture

Jasper Koehorst jasperkoehorst at gmail.com
Sat Apr 25 10:16:01 EDT 2009


Hello,
Trying to get mod_python installed on leopard server..
This is what i have done so far:

downloaded mod_python-3.3.1.tgz 13-Feb-2007 21:29 437K HTTP Server project

Then i did:
$ cd mod_python-3.3.1
$ ./configure --with-apxs=/usr/sbin/apxs

in the src/makefile

LDFLAGS= -Wl,-framework,Python -u _PyMac_Error -framework Python -Wl,-F.
changed to
LDFLAGS= -Wl,-framework,Python -u _PyMac_Error -framework Python -Wl,-F
-arch x86_64. ( of dit juist is weet ik niet )

$(APXS) $(INCLUDES) -c $(SRCS) $(LDFLAGS) $(LIBS)

replaced by
$(APXS) $(INCLUDES) -c -Wc,"-arch x86_64" $(SRCS) $(LDFLAGS) $(LIBS)

make
and sudo make install uitgevoerd

in /usr/libexec/apache2 the file mod_python.so has been made

then in server admin
> web > Modules
.so file is loaded and checked
settings saved
web service restart

Then i get the following error

A service has encountered an error.
Try to refresh the view (server.local/Web). Report the problem to the
administrator if it persists. (Could not start web service - details in
error log.) 100002

Log file

2009-04-25 00:42:47+0200 [-] Received SIGTERM, shutting down.
2009-04-25 00:42:47+0200 [-] userPrefsFlushLooper stopped looping, doing
final flush
2009-04-25 00:42:47+0200 [-] (Port 8087 Closed)
2009-04-25 00:42:47+0200 [-] Stopping factory
<twisted.web2.channel.http.HTTPFactory instance at 0x2eb3670>
2009-04-25 00:42:47+0200 [-] (Port 8086 Closed)
2009-04-25 00:42:47+0200 [-] Stopping factory <twisted.web.server.Site
instance at 0x2eb3a08>
2009-04-25 00:42:47+0200 [-] Main loop terminated.
2009-04-25 00:42:47+0200 [-] Warning: No permission to delete pid file
2009-04-25 00:42:47+0200 [-] Server Shut Down.
2009-04-25 00:42:49+0200 [-] Log opened.
2009-04-25 00:42:49+0200 [-] twistd 2.5.0
(/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
2.5.1) starting up
2009-04-25 00:42:49+0200 [-] reactor class: <class
'twisted.internet.selectreactor.SelectReactor'>
2009-04-25 00:42:49+0200 [-] twisted.web.server.Site starting on 8086
2009-04-25 00:42:49+0200 [-] Starting factory <twisted.web.server.Site
instance at 0x2eb3a08>
2009-04-25 00:42:49+0200 [-] twisted.web2.channel.http.HTTPFactory starting
on 8087
2009-04-25 00:42:49+0200 [-] Starting factory
<twisted.web2.channel.http.HTTPFactory instance at 0x2eb3670>
2009-04-25 00:42:49+0200 [-] set uid/gid 94/94
2009-04-25 00:42:55+0200 [-] Received SIGTERM, shutting down.
2009-04-25 00:42:55+0200 [-] userPrefsFlushLooper stopped looping, doing
final flush
2009-04-25 00:42:55+0200 [-] (Port 8087 Closed)
2009-04-25 00:42:55+0200 [-] Stopping factory
<twisted.web2.channel.http.HTTPFactory instance at 0x2eb3670>
2009-04-25 00:42:55+0200 [-] (Port 8086 Closed)
2009-04-25 00:42:55+0200 [-] Stopping factory <twisted.web.server.Site
instance at 0x2eb3a08>
2009-04-25 00:42:55+0200 [-] Main loop terminated.
2009-04-25 00:42:55+0200 [-] Warning: No permission to delete pid file
2009-04-25 00:42:55+0200 [-] Server Shut Down.
2009-04-25 00:43:10+0200 [-] Log opened.
2009-04-25 00:43:10+0200 [-] twistd 2.5.0
(/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
2.5.1) starting up
2009-04-25 00:43:10+0200 [-] reactor class: <class
'twisted.internet.selectreactor.SelectReactor'>
2009-04-25 00:43:10+0200 [-] twisted.web.server.Site starting on 8086
2009-04-25 00:43:10+0200 [-] Starting factory <twisted.web.server.Site
instance at 0x2eb3a08>
2009-04-25 00:43:10+0200 [-] twisted.web2.channel.http.HTTPFactory starting
on 8087
2009-04-25 00:43:10+0200 [-] Starting factory
<twisted.web2.channel.http.HTTPFactory instance at 0x2eb3670>
2009-04-25 00:43:10+0200 [-] set uid/gid 94/94


This is the error in the apache log.

httpd: Syntax error on line 160 of /private/etc/apache2/httpd.conf: Cannot
load /usr/libexec/apache2/mod_python.so into server:
dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable image found. Did
find:\n\t/usr/libexec/apache2/mod_python.so: no matching architecture in
universal wrapper

For what i can see the architecture is wrong so the problem should be in:

LDFLAGS= -Wl,-framework,Python -u _PyMac_Error -framework Python -Wl,-F.
changed to

LDFLAGS= -Wl,-framework,Python -u _PyMac_Error -framework Python -Wl,-F
-arch x86_64. ( of dit juist is weet ik niet )

$(APXS) $(INCLUDES) -c $(SRCS) $(LDFLAGS) $(LIBS)

replaced by:
$(APXS) $(INCLUDES) -c -Wc,"-arch x86_64" $(SRCS) $(LDFLAGS) $(LIBS)

Anyone has an idea to solve this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20090425/d94b3a09/attachment.html


More information about the Mod_python mailing list