[Pythonmac-SIG] PIL and Snow Leopard

Jerry LeVan Jerry.Levan at EKU.EDU
Sun Oct 4 00:32:45 CEST 2009


On Oct 2, 2009, at 7:40 PM, Bill Janssen wrote:

> Jerry LeVan <jerry.levan at eku.edu> wrote:
>
>> Is building PIL on Snow Leopard 'easy' I have the apple python  
>> (32/64)
>> installed and the python.org 2.6.2 (32 bit) version installed.
>
> Yes, I just build it with /usr/bin/python, and it works fine.   
> Assuming
> you have Xcode 3.2 installed.
>
> Bill

Ugh, this is getting messy...

I think that I have built libfreetype.dylib and libjpeg.dylib as
i386 and x86_64 libs...at least that is what the file command asserts.

I then built the PIL package using the system python in 64 bit mode and
installed the rascal in the Apple python. All of the libs appear to be
multi-architecture ppc, i386 and x86_64

When I run apple python in 64 bit mode I can run the PIL demos...

If I restrict apple python to 32 bit mode all of the programs fail
with a bus error.

*********

I then tried to build PIL using the 2.6.2 python from python.org.
1) It would not build under gcc-4.2 I had to define CC=gcc-4.0
     the build appeared to succeed and I installed the PIL system.
2) All of the demos failed...

I noticed that _imagingtk.so was dynamically linked against
the ActiveState Tcl/Tk that is installed in /Library/Frameworks/ 
Tcl.framework

[mbp:/Library/Python/2.6/site-packages/PIL]$ otool -L _imagingtk.so
_imagingtk.so:
	/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility  
version 8.5.0, current version 8.5.4)
	/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility  
version 8.5.0, current version 8.5.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current  
version 124.1.1)

I suppose that I could hide the ActiveState versions by renaming the  
Frameworks...

But even if I did that, how could I force setup.py to use the apple  
8.4 tcl/tk system instead
of the 'current' 8.5 system?

Any suggestions as to how I can get PIL to work when apple python is  
in 32 bit mode?

Any suggestions as to how I can build PIL using the 2.6.2 version of  
Python from python.org?

This is getting ugly...too many impedance mismatches.

Jerry




More information about the Pythonmac-SIG mailing list