[Image-SIG] PIL does not compile on python 2.6 in MacOSX Leopard

Rodrigo Ventura yoda at isr.ist.utl.pt
Fri Oct 24 13:14:00 CEST 2008

I've compiled PIL just fine, with all optional support (used macports  
for the missing packages), with the python shipped with Leopard  
(2.5.1), but after installing the official MacPython distro, the PIL  
does not compile any more.

First of all, I get warning after almost all gcc calls during  
compilation that I did't get before. Sample example:

gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - 
fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 - 
DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/ 
Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/opt/local/ 
include/freetype2 -IlibImaging -I/opt/local/include -I/Library/ 
Frameworks/Python.framework/Versions/2.6/include -I/usr/include -I/ 
Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c  
libImaging/RawDecode.c -o build/temp.macosx-10.3-i386-2.6/libImaging/ 
In file included from /usr/include/math.h:26,
                  from /Library/Frameworks/Python.framework/Versions/ 
                  from /Library/Frameworks/Python.framework/Versions/ 
                  from libImaging/ImPlatform.h:10,
                  from libImaging/Imaging.h:14,
                  from libImaging/RawDecode.c:17:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types  
for built-in function 'scalb'

And then it fails with:

gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g - 
bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.6/ 
_imagingtk.o build/temp.macosx-10.3-i386-2.6/Tk/tkImaging.o -L/opt/ 
local/lib -L/usr/local/lib -L/Library/Frameworks/Python.framework/ 
Versions/2.6/lib -L/usr/lib -o build/lib.macosx-10.3-i386-2.6/ 
_imagingtk.so -framework Tcl -framework Tk
ld: in /opt/local/lib/libz.1.dylib, file is not of required  
architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/gO/gOEfKG2kElSEfJYMJH7ijU++ 
+TI/-Tmp-//ccpZdO98.out (No such file or directory)
error: command 'gcc' failed with exit status 1

Is there a fix for this?


Rodrigo Ventura
Institute for Systems and Robotics
Instituto Superior Técnico
Lisbon, Portugal

More information about the Image-SIG mailing list