From: Jerry LeVan <jerry.le...@eku.edu>
Date: October 3, 2009 6:32:45 PM EDT
To: Bill Janssen <jans...@parc.com>
Cc: "pythonmac-sig@python.org" <pythonmac-sig@python.org>
Subject: Re: [Pythonmac-SIG] PIL and Snow Leopard



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

Jerry LeVan <jerry.le...@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


A little more success to report. ..

I hid the activestate tcl/tk frameworks in /Library/Frameworks and set CC to gcc-4.0 and rebuilt PIL and otool showed that _imagingtk.so was linked against the apple 8.4
Tcl/Tk system.

So I installed the build and "tada" Imaging appears to be working in python.org version
of python (2.6.2).

So this leaves only the "why does apple python (2.6.1) not work when run in 32 bit mode
but does in 64 bit mode"  question open...

Has anyone had success with PIL in this case?

Thanks

Jerry
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to