|
Graham Dumpleton
graham.dumpleton at gmail.com
Tue Oct 30 01:47:02 EDT 2007
The one with mod_wsgi looks like it isn't linking Python Framework any more. So, keep also checking with otool -L as well to make sure Python library dependency is there. Let me know what you work out. Graham On 30/10/2007, Ben Mitchell <ben at mitchellfamily.com> wrote: > Hrmmm... > > Not working. I had to add the same flags to both CFLAGS and LDFLAGS to get > it to make a 64-bit version (not sure that was the right move). But now I > get this: > > > sh-3.2# file /usr/libexec/apache2/mod_python.so > /usr/libexec/apache2/mod_python.so: Mach-O 64-bit bundle > x86_64 > sh-3.2# apachectl configtest > httpd: Syntax error on line 116 of > /private/etc/apache2/httpd.conf: Can't locate API module > structure `python_module' in file > /usr/libexec/apache2/mod_python.so: dlsym(0x1002179c0, > python_module): symbol not found > > Got something similar for mod_wsgi: > > > sh-3.2# apachectl configtest > httpd: Syntax error on line 117 of > /private/etc/apache2/httpd.conf: Cannot load > /usr/libexec/apache2/mod_wsgi.so into server: > dlopen(/usr/libexec/apache2/mod_wsgi.so, 10): Symbol not > found: _PyExc_RuntimeError\n Referenced from: > /usr/libexec/apache2/mod_wsgi.so\n Expected in: dynamic > lookup\n > > > Anyway, I don't want to consume your evening with this :-) I'll keep > plugging away at it. I really appreciate the help. I think I'm at least on > the right track now. > > -Ben > > On Oct 29, 2007, at 10:23 PM, Graham Dumpleton wrote: > Try editing Makefile and adding option to CFLAGS: > > CFLAGS = -Wc,-m64 > > At least I think that -m64 is the option. The -Wc, bit is to get it > past apxs/libtool build tool. > > Graham > > On 30/10/2007, Ben Mitchell <ben at mitchellfamily.com> wrote: > You're on the right track, but off by a hair ;-) > > Turns out httpd is an Intel (64 bit) process > > Sooo... I need to figure out how to get a 64-bit version of the .so > built, when it's building only the 32-bit version by default. > > Any thoughts on that? > > And thanks. I _never_ would've figured this one out on my own. > > -Ben > > On Oct 29, 2007, at 10:05 PM, Graham Dumpleton wrote: > > Okay, might now what the issue is now. > > What may be happening is that Apache server is running up in Rosetta > (ie., PPC), and because the mod_wsgi/mod_python .so files are Intel > only it isn't working. > > First step is to determine what Apache is running as. Think you can do > this by running 'Activity Viewer' or whatever they now call it. Ensure > that 'Kind' column is viewable and see what is against httpd > processes. Will be PowerPC or Intel. If it shows PowerPC, that will be > the problem. > > To fix I think you run Finder, select Go->Go To Folder and enter > '/usr/sbin'. Then find 'httpd' and go File->GetInfo. From memory in > there somewhere is a way of marking the process to run as Intel rather > than PowerPC. > > The question is that if this is necessary, why it is running as > PowerPC by default. > > Graham > > On 30/10/2007, Ben Mitchell <ben at mitchellfamily.com> wrote: > > Sorry. Missed what you were asking for. Looks like most of them > > have all > > the architectures, but the Mach-O bundle i386 seems to be the same > > for the > > wsgi one and the others. > > > > > > > > [Macintosh:~/Documents/Development] benha% file > > /usr/libexec/apache2/*.so > > /usr/libexec/apache2/libphp5.so: Mach-O > > universal binary with 4 architectures > > /usr/libexec/apache2/libphp5.so (for architecture ppc7400): Mach-O > > bundle > > ppc > > /usr/libexec/apache2/libphp5.so (for architecture ppc64): Mach-O 64- > > bit > > bundle ppc64 > > /usr/libexec/apache2/libphp5.so (for architecture i386): Mach-O > > bundle i386 > > /usr/libexec/apache2/libphp5.so (for architecture x86_64): Mach-O 64- > > bit > > bundle x86_64 > > /usr/libexec/apache2/mod_actions.so: Mach-O > > universal binary with 4 architectures > > /usr/libexec/apache2/mod_actions.so (for architecture > > ppc7400): Mach-O bundle ppc > > /usr/libexec/apache2/mod_actions.so (for architecture > > ppc64): Mach-O 64-bit bundle ppc64 > > /usr/libexec/apache2/mod_actions.so (for architecture > > i386): Mach-O bundle i386 > > /usr/libexec/apache2/mod_actions.so (for architecture > > x86_64): Mach-O 64-bit bundle x86_64 > > ... > > > > > |