On Sep 11, 2009, at 11:31 AM, Brad Howes 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
--
Brad Howes
Group 42
MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173
Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420
It sounds like the core issue here is that the compiler now builds
x86_64 binaries by default on SL. Everything that builds directly
through distutils should know to build all the correct architectures,
but dependent projects that use standard Makefiles may need to be told
to compile 32-bit.
Though I haven't tried to build PIL myself, I have built libjpeg and
libpng before, and setting CC while running configure as suggested by
Brad did work for me.
This is an unfortunate side-effect of the transition to full 64-bit
computing in Mac OS X, and trying to maintain 32-bit compatibility at
the same time.
--------------------------------------------------------------------------
Edward Moy
Apple Inc.
e...@apple.com
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig