[Pythonmac-SIG] Using Python 2.5 on Snow Leopard
Bill Janssen
janssen at parc.com
Fri Sep 11 23:41:46 CEST 2009
Brad Howes <howes at ll.mit.edu> wrote:
> On Sep 11, 2009, at 1:50 PM, Bill Janssen wrote:
>
> > I was happy to see that Python 2.5 still shipped with SL, but now I'm
> > less happy. I can't seem to compile PIL for Python 2.5 on Snow
> > Leopard.
> >
> > The problem is that when I build and install libjpeg or libpng, it
> > builds 64-bit libraries, but Python 2.5 is 32-bit, so the libraries
> > don't work when PIL tries to use them. You get an error message
> > something like this:
>
>
> Can you try recompiling with "-arch i386 -arch x86_64" options in the
> CFLAGS? I think I had gotten this to work for some other libraries
> when I ran into the dreaded linking problem. You might instead need to
> do CC="gcc -arch..." if the configure tool munges the CFLAGS too much.
>
> % CFLAGS="-arch i386 -arch x86_64" ./configure ...
>
> or
>
> % CC="gcc -arch..." ./configure ...
>
> Brad
Thanks, Brad, I've tried this. It does build the .a files multi-platform,
but not the dylib files. And some libraries, like libpng, use -M switches
which conflict with multiple architecture flags on the compile line.
Bill
More information about the Pythonmac-SIG
mailing list