Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
On Fri, Sep 11, 2009 at 08:02:10PM +0100, Thijs Triemstra | Collab wrote: On 11 Sep 2009, at 18:50, 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. Hm, haven't upgraded to snow leopard yet but i'd expect 2.6 to be in there.. heard they also removed twisted :( 2.5 and 2.6 both ship with SL, just built differently - Python 2.5 is obviously there for compatibility with Leopard, which I really appreciate. % lipo -info /usr/bin/python2.[56] Architectures in the fat file: /usr/bin/python2.5 are: i386 ppc7400 Architectures in the fat file: /usr/bin/python2.6 are: x86_64 i386 ppc7400 and Twisted is there still too: % find /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted | wc -l 1675 % find /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted | wc -l 1675 -- Nicholas Riley njri...@illinois.edu ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Using Python 2.5 on Snow Leopard
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: import _imaging ImportError: dlopen(/Library/Python/2.5/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart Referenced from: /Library/Python/2.5/site-packages/PIL/_imaging.so Expected in: dynamic lookup Bill ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
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 ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
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
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
Brad Howes ho...@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 ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
Brad Howes wrote: Can you try recompiling with -arch i386 -arch x86_64 options in the CFLAGS? wouldn't you want: -arch i386 -arch PPC To be compatible with the python2.5 build? Adding the 64 bit lib wouldn't hurt, but it wouldn't' help, either, unless you want to use it with other things that need it. You may also simply be able to use a binary of PIL. There is this one here: http://pythonmac.org/packages/py25-fat/index.html Which is for the python.org 2.5, but you may be able hand-copy some stuff over. I did set up a build to PIL, using macports to build libjpeg and libpng. They build well using the universal variant on a 10.5 Intel system. I'm not sure what macports is building on SL, but it's worth checking out. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
On 11 Sep 2009, at 18:50, 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. Hm, haven't upgraded to snow leopard yet but i'd expect 2.6 to be in there.. heard they also removed twisted :( Thijs PGP.sig Description: This is a digitally signed message part ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
On Sep 11, 2009, at 12:02 PM, Thijs Triemstra | Collab wrote: On 11 Sep 2009, at 18:50, 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. Hm, haven't upgraded to snow leopard yet but i'd expect 2.6 to be in there.. heard they also removed twisted :( Thijs Yes, both 2.5 and 2.6 are available on SL (as well as enough of 2.3 to provide embedded support). Twisted seems to be there: /System/Library/Frameworks/Python.framework/Versions/2.{5,6}/Extras/ lib/python/twisted --- Edward Moy Apple ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Using Python 2.5 on Snow Leopard
Yes, 2.6 is there, but I thought I'd try building with 2.5. Now, given the issues with 32/64 bit, I think I'm just going to upgrade the OS X UpLib installation to 64 bits, and just use 2.6. Still haven't got the JPEG support in PIL 1.1.6 working that way, but most of the rest seems to work. Bill Thijs Triemstra | Collab li...@collab.nl wrote: On 11 Sep 2009, at 18:50, 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. Hm, haven't upgraded to snow leopard yet but i'd expect 2.6 to be in there.. heard they also removed twisted :( Thijs ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig