Am 04.11.2007 um 11:47 schrieb Graham Dumpleton: > > Hmmm, very odd. I may have misinterpreted what I was told by person > who got it working. They said: > > """mod_wsgi was easier. I actually built it as a "universal binary": > CPPFLAGS = -Wc,"-arch ppc" -Wc,"-arch i386" -Wc,"-arch x86_64" -I/ > System/Library/Frameworks/Python.framework/Versions/2.5/include/ > python2.5 -DNDEBUG -DMACOSX -DENABLE_DTRACE > CFLAGS = -Wc,"-arch ppc" -Wc,"-arch i386" -Wc,"-arch x86_64" > LDFLAGS = -arch ppc -arch i386 -arch x86_64 -framework Python -u > _PyMac_Error -framework Python""" > > Since the build line was: > > mod_wsgi.la : mod_wsgi.c > $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) $ > (LDLIBS) > > I saw the multiple listing of the options as redundant. What you may > actually have to do is change CFLAGS as explained before, but also add > '-arch ppc -arch ppc64 -arch i386 -arch x86_64' into LDFLAGS as well. > > Let me know if that works instead.
Yay! you're a star! look at this now: file /usr/libexec/apache2/mod_wsgi.so /usr/libexec/apache2/mod_wsgi.so: Mach-O universal binary with 3 architectures /usr/libexec/apache2/mod_wsgi.so (for architecture ppc7400): Mach-O bundle ppc /usr/libexec/apache2/mod_wsgi.so (for architecture i386): Mach-O bundle i386 /usr/libexec/apache2/mod_wsgi.so (for architecture x86_64): Mach-O 64- bit bundle x86_64 beautyful! So only changing the CFLAGS, like suggested in the google article is not enough. Either CPPFLAGS or LDFLAGS must also be set (or both, which is what I tried to get the above result) Not, that it wouldn't make sense, but I am a totally noob (until now!) when it comes to compiling binaries. If it works out of the box, all is well, bit troubleshooting is another story. So I went on to compile mod_python with the same tweaks (CPPFLAGS + LDFLAGS + CFLAGS) and lo and behold: file /usr/libexec/apache2/mod_python.so /usr/libexec/apache2/mod_python.so: Mach-O universal binary with 3 architectures /usr/libexec/apache2/mod_python.so (for architecture ppc): Mach-O bundle ppc /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 just for the reference I'll post a steps to reproduce on my website and send a link here as soon as I made sure, that everything works. for now I only see, that it compiled for all platforms. I'll set up trac with mod_python now to check, whether it works. Thank you so much! >> >> > > The issue is that if you are using standard OS version of Apache 2.2 which is what I do. > > it is a full fat binary and if you have 64 bit CPU will run up as > x86_64 and thus expect to have available x86_64 versions of all Apache > modules and indirectly the Python framework, plus Python modules and > libraries required by those modules. that's the reason it works for me: I am running it on a MBP, which is not a 64-bit architecture, is it? that may also be the reason for the trickery required to compile for 64-bit, is it? > > > Python Framework on Leopard should be a full fat binary. See below > example someone else sent me previously: > >> [Macintosh:Library/Frameworks/Python.framework] benha% file >> Python >> Python: Mach-O universal binary with 4 architectures >> Python (for architecture ppc7400): Mach-O dynamically linked shared >> library >> ppc >> Python (for architecture ppc64): Mach-O 64-bit dynamically linked >> shared >> library ppc64 >> Python (for architecture i386): Mach-O dynamically linked shared >> library >> i386 >> Python (for architecture x86_64): Mach-O 64-bit dynamically linked >> shared >> library x86_64 my python is the same, but my MBP may run the 32-bit version and therefore the mysql binaries for tiger work for me. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
