[Image-SIG] Re: Web page
Dan Grassi
dan@grassi.org
Sun, 12 May 2002 16:28:03 -0400
Jack Jansen asked me to convey this issue with PIL.
I am trying to build PIL on macho (Mac OS X - Free BSD based version)
but getting the following error:
I have the macho "pygames) framework of python installed:
Python 2.2 (#11, Jan 6 2002, 01:00:42)
[GCC 2.95.2 19991024 (release)] on darwin
Here are all the commands I ran other than installing ijg (jpeg lib)
I installed this way this way so I could build without tk.
I commented out the tk bindings in Setup.in
cd /Downloads/Imaging-1.1.3
gunzip Imaging-1.1.3.tar.gz
tar xvf Imaging-1.1.3.tar
cd Imaging-1.1.3/libImaging
./configure
make
cd ..
make -f Makefile.pre.in boot
make
# Error occurs here
cc -Wl,-F. -Wl,-flat_namespace,-U,_environ -bundle -framework
./_imaging.o ./decode.o ./encode.o ./map.o ./display.o ./outline.o
./path.o libImaging/libImaging.a -L/usr/local/lib -ljpeg
-L/usr/local/lib -lz -o ./_imaging.so
/usr/bin/ld: can't locate framework for: -framework ./_imaging.o
make: *** [_imaging.so] Error 1
Then I ran the failed cc with "Python" inserted by hand after
"-framework" and all was well.
On Sunday, May 12, 2002, at 04:03 PM, Jack Jansen wrote:
> For some reason there's a "Python" missing after your "-framework"
> option. Distutils picks that string of funny linker options up from the
> LDSHARED flag in the Makefile that's installed in your
> lib/pythonX.Y/config (installed there by the Python "make install").
> The value after the -framework comes from PYTHONFRAMEWORK, which in the
> end comes from what you passed to the --enable-framework during the
> Python configure.
> Ah, I forgot: PIL uses the old Makefile.pre.in method for building an
> extension, it isn't distutils-based. It could well be that this doesn't
> work for frameworks Python builds (I had completely forgotten that
> there were still some popular extension packages that hadn't switched
> over to distutils yet).
>
> It's probably best if you communicate your workaround to Fredrik, so he
> can put a note up on the PIL site or something like that. I have no
> time to look into this, and I'm pretty sure Fredrik doesn't have an OSX
> machine.
> --
> - Jack Jansen <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution -- Emma
> Goldman -
If you need and further information let me know.
Dan