[Pythonmac-SIG] can't build extensions for python.org 3.1.1 framework

Ned Deily nad at acm.org
Sun Nov 29 03:22:39 CET 2009


In article <BF776BCD-4B26-4C34-8F53-8419262B0960 at virgin.net>,
 has <hengist.podd at virgin.net> wrote:
> Anyone tried building extensions for python.org's prebuilt Python 3.1.1 
> framework on 10.6.2? After remembering to install the 10.4u SDK for Xcode 
> 3.2.1, I'm getting a bunch of 'missing header' errors, e.g.:
> 
> $ cd py-appscript
> $ python3 setup.py install
> ...
> building 'aem.ae' extension
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
> -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 
> -I/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1 -c 
> appscript_3x/ext/ae.c -o build/temp.macosx-10.3-fat-3.1/appscript_3x/ext/ae.o 
> -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4
> In file included from 
> /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/bytearrayo
> bject.h:9,
>                  from 
>                  /Library/Frameworks/Python.framework/Versions/3.1/include/pyt
>                  hon3.1/Python.h:69,
>                  from appscript_3x/ext/ae.c:14:
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: 
> No such file or directory
> ...
> 
> 
> The header files in question do exist, e.g.:
> 
> $ ls -l /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h
> -rw-r--r--  1 root  wheel  234 May  4  2007 
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h
> 
> 
> Any relation to the 2.6.3 problems? Or something else?

3.1.1 was released before 10.6 and, thus, lacks the build fixes for 
extension builds on 10.6 (i.e. the ones that made it into 2.6.3 & 
2.6.4).  The main issue is you need to build with gcc-4.0.  IIRC, this 
should work:

$ export CC=/usr/bin/gcc-4.0

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list