Re: Getting PIL to work on OSX Snow Leopard

Simon Mosk-Aoyama <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Chris,

Thanks so much for the suggestion!

I ran the otool command and noted that the _imaging.so is linked to the
wrong (newer) libjpeg:

simon@/Users/simon/: otool -L PIL/_imaging.so
PIL/_imaging.so:
        /opt/local/lib/libjpeg.8.dylib (compatibility version 9.0.0, current
version 9.1.0)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.0.1)

so seems like I may have misconfigured setup.py.

Can anyone confirm this would be the right syntax:

JPEG_ROOT = libinclude("/usr/local")

for linking to:

simon@/Users/simon/: ls -al /usr/local/lib/*jpeg*
-rw-r--r--  1 root  wheel  201336 Jun  4 15:56 /usr/local/lib/libjpeg.a
-rwxr-xr-x  1 root  wheel     433 Jun  4 15:56 /usr/local/lib/libjpeg.la

Hmmm I'm noticing I don't have an equivalent libjpeg.dylib for the 6b
version - should I have that, and could that be the cause of the linking
being broken?

thanks!

-Simon

On Sat, Jun 5, 2010 at 10:15 AM, Christopher Barker
<[email protected]>wrote:

> Simon Mosk-Aoyama wrote:
>
>  I've seemingly re-built libjpeg correctly from source and
>> have re-built PIL to point at this newly built libjpeg, but it's still
>> failing.
>>
>
> It sure looks like you've done the right thing...
>
>
>
>  Does anyone else have any idea how to solve this?
>>
>
> NO, but something that might give a hint. Try:
>
> $ otool -L PIL/_imaging.so
>
> That will tell you what PIL is linked against.
>
> Once you see that, you may want to run otool on the libs it's linked
> against, too.
>
> What python are you using? If you use the one from python.org, you can use
> the binary I posted a little bit ago:
>
>
> http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.6-macosx10.5.mpkg.zip
>
> I built those by building libjpeg, etc. with macports, then the usual
> setup.py build -- it "just worked" for me I got lucky, I suppose!
>
> -Chris
>
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
>

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.