[Image-SIG] Help building PIL on OS X

Itai Tavor itai@optusnet.com.au
Tue, 10 Jul 2001 17:47:16 +1000


>itai wrote:
>>  has anyone managed to compile Imaging on OS X? Using Imaging 1.1.2
>>  and Python 2.0, I get this when I do make:
>>
>>  ./_imaging.c:2479: illegal function definition, found `init_imaging'
>
>did ./configure run successfully?

Yes. ./configure and make in libImaging worked, as well as make -f 
Makefile.pre.in boot in the main directory.

>is DL_EXPORT correctly defined?  if you cannot figure that out (or
>fix it), try replacing the "DL_EXPORT(void)" around line 2478 with a
>plain "void"):
>
>     void
>     init_imaging(void)
>     {
>         ...
>     }

Starting at line 2476 I had:

#ifdef WIN32
__declspec(dllexport)
#endif

I removed it, and now make succeeds. However, now when I try to 
import _imaging in Python, I get:

dyld: python Undefined symbols:
_deflate
_deflateEnd
_deflateInit2_
_deflateSetDictionary
_inflate
_inflateEnd
_inflateInit_


>alternatively, you could grab Tony Lownds prebuilt OS X kit, which
>includes PIL 1.2:
>
>     http://tony.lownds.com/macosx/
>

This would be very helpful when I am able to use Python 2.1. At the 
moment I'm forced to use 2.0. However, I copied PIL from this kit 
into my python2.0/site-packages, and it seems to work, after 
complaining about a Python C API version mismatch. So in fact, it did 
turn out to be helpful!

Now I got to get JPEG support working... libjpeg also fails to build 
on this system, and the only precompiled package I can find requires 
installing XFree86. Oh well...

Anyway, thanks a lot for the info!
-- 
--
Itai Tavor                      -- "Je sautille, donc je suis."    --
itai@optusnet.com.au            --               - Kermit the Frog --
--                                                                 --
-- "If you haven't got your health, you haven't got anything"      --