On Nov 4, 3:17 pm, Alex da Franca <[EMAIL PROTECTED]> wrote:
> Am 04.11.2007 um 04:43 schrieb Graham Dumpleton:
>
>
>
> >> $: file /usr/libexec/apache2/mod_wsgi.so
> >> $: /usr/libexec/apache2/mod_wsgi.so: Mach-O bundle i386
>
> > For good measure, do a 'make distclean', rerun configure, and then
> > only modify Makefile and rebuild/install, it should work.
>
> I acted on a fresh download, so I don't know, where make distclean
> would help.
>
>
>
> > It should be obvious from the output of the build whether the options
> > are being included with the compilation.
>
> all -arch options appear in the output for apxs and in the first
> output of libtool, the second libtool call doesn't have any -arch
> options.
>
> --------------------
>
> /usr/sbin/apxs -c -I/System/Library/Frameworks/Python.framework/
> Versions/2.5/include/python2.5 -DNDEBUG -DMACOSX -DENABLE_DTRACE -Wc,"-
> arch ppc" -Wc,"-arch ppc64" -Wc,"-arch i386" -Wc,"-arch x86_64"
> mod_wsgi.c -framework Python -u _PyMac_Error -framework Python -ldl
> /usr/share/apr-1/build-1/libtool --silent --mode=compile gcc    -
> DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/
> apache2  -I/usr/include/apr-1   -I/usr/include/apr-1  -arch ppc -arch
> ppc64 -arch i386 -arch x86_64 -I/System/Library/Frameworks/
> Python.framework/Versions/2.5/include/python2.5 -DNDEBUG -DMACOSX -
> DENABLE_DTRACE  -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
> /usr/share/apr-1/build-1/libtool --silent --mode=link gcc -o
> mod_wsgi.la  -rpath /usr/libexec/apache2 -module -avoid-version
> mod_wsgi.lo -framework Python -u _PyMac_Error -framework Python -ldl
>
> --------------------
>
>
>
> > Run file on .libs/mod_wsgi.so to work out what it was built for before
> > installing.
>
> file .libs/mod_wsgi.so
> .libs/mod_wsgi.so: Mach-O bundle i386
>
> :-(

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.

> > Another problem which has come up is MySQL. You can't use the
> > precompiled MySQL distribution which is available as it was built on
> > Tiger, which didn't produce x86_64 compatible binaries.
>
> I installed the precompiled tiger binaries of mysql (mysql-5.1.22-rc-
> osx10.4-i686) and it works so far on leopard.
> A little change was required in order to compile the mysql-python egg,
> but it seems to work so far.
> I thought, that python on leopard is 32 bit and therefore the 32 bit
> mysql-python egg and the 32 bit mysql distribution play happily
> together?

The issue is that if you are using standard OS version of Apache 2.2
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.

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

Graham


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to