Re: 64bit Architecture

Geert Dekkers <[email protected]>
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
Try doing a file /usr/libexec/apache2/mod_python.so

My experience with mod_python on leopard is limited though -- I  
quickly switched to mod_wsgi, which works perfectly on leopard.

Geert


On Apr 25, 2009, at 4:16 PM, Jasper Koehorst wrote:

> 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?
> _______________________________________________
> Mod_python mailing list
> [email protected]
> http://mailman.modpython.org/mailman/listinfo/mod_python

_______________________________________________
Mod_python mailing list
[email protected]
http://mailman.modpython.org/mailman/listinfo/mod_python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.