I'm having difficulty on compiling PIL on Leopard. PIL used to compile just fine with the system's python (2.5.1 I believe), but with macpython 2.6 it breaks.

First of all, I get lots of warnings 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/ RawDecode.o
In file included from /usr/include/math.h:26,
from /Library/Frameworks/Python.framework/Versions/ 2.6/include/python2.6/pyport.h:235, from /Library/Frameworks/Python.framework/Versions/ 2.6/include/python2.6/Python.h:58,
                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'


Another illustrative example:


gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -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 Tk/tkImaging.c -o build/temp.macosx-10.3- i386-2.6/Tk/tkImaging.o -framework Tcl -framework Tk
In file included from /usr/include/math.h:26,
from /Library/Frameworks/Python.framework/Versions/ 2.6/include/python2.6/pyport.h:235, from /Library/Frameworks/Python.framework/Versions/ 2.6/include/python2.6/Python.h:58,
                 from libImaging/ImPlatform.h:10,
                 from libImaging/Imaging.h:14,
                 from Tk/tkImaging.c:53:
/usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function 'scalb' i686-apple-darwin9-gcc-4.0.1: -framework: linker input file unused because linking not done i686-apple-darwin9-gcc-4.0.1: Tcl: linker input file unused because linking not done i686-apple-darwin9-gcc-4.0.1: -framework: linker input file unused because linking not done i686-apple-darwin9-gcc-4.0.1: Tk: linker input file unused because linking not done powerpc-apple-darwin9-gcc-4.0.1: -framework: linker input file unused because linking not done powerpc-apple-darwin9-gcc-4.0.1: Tcl: linker input file unused because linking not done powerpc-apple-darwin9-gcc-4.0.1: -framework: linker input file unused because linking not done powerpc-apple-darwin9-gcc-4.0.1: Tk: linker input file unused because linking not done


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
(www.isr.ist.utl.pt)
Instituto Superior Técnico
Lisbon, Portugal


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

Reply via email to