distutils extension configuration problem

Ron Garret rNOSPAMon at flownet.com
Tue May 26 17:10:05 EDT 2009

I'm trying to build PyObjC on an Intel Mac running OS X 10.5.7.  The 
build is breaking because distutils seems to want to build extension 
modules as universal binaries, but some of the libraries it depends on 
are built for intel-only, i.e.:

[ron at mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2b2]$ python2.6 
setup.py build
/dist.py:266: UserWarning: Unknown distribution option: 'options'
running build
running build_py
running build_ext
building 'ScreenSaver._inlines' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g 
-bundle -undefined dynamic_lookup 
build/temp.macosx-10.3-i386-2.6/Modules/_ScreenSaver_inlines.o -o 
build/lib.macosx-10.3-i386-2.6/ScreenSaver/_inlines.so -framework 
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libTIFF.dylib, file 
is not of required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: 
/var/folders/nT/nTiypn-v2RatkU+BYncrKU+++TI/-Tmp-//ccMFYRkt.out (No such 
file or directory)
error: command 'gcc' failed with exit status 1

[ron at mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2b2]$ file 
build/temp.macosx-10.3-i386-2.6/Modules/_ScreenSaver_inlines.o: Mach-O 
universal binary with 2 architectures
build/temp.macosx-10.3-i386-2.6/Modules/_ScreenSaver_inlines.o (for 
architecture ppc): Mach-O object ppc
build/temp.macosx-10.3-i386-2.6/Modules/_ScreenSaver_inlines.o (for 
architecture i386):   Mach-O object i386

[ron at mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2b2]$ file 
/usr/local/lib/libtiff.dylib: Mach-O dynamically linked shared library 

How do I get distutils to stop trying to build extensions as universal 


More information about the Python-list mailing list