From: Ned Deily on 14 Jul 2010 16:57 In article <AANLkTim1x7B7IF4R4T-zhqcVzuQ656mO7o9IzurCVmj8(a)mail.gmail.com>, Benjamin Kaplan <benjamin.kaplan(a)case.edu> wrote: > On Sun, Jul 11, 2010 at 1:18 PM, dk <dkelley21(a)gmail.com> wrote: [...] > > when i try to compile mysql-python-1.2.3 i get the following error > > returned from python setup.py build ----- > > > > building '_mysql' extension > > gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing > > -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) - > > D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/ > > Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/ > > temp.macosx-10.3-fat-2.6/_mysql.o -g -Os -arch x86_64 -fno-common - > > D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ - > > DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL > > In file included from /Library/Frameworks/Python.framework/Versions/ > > 2.6/include/python2.6/unicodeobject.h:4, > > � � � � � � � � from /Library/Frameworks/Python.framework/Versions/ > > 2.6/include/python2.6/Python.h:85, > > � � � � � � � � from pymemcompat.h:10, > > � � � � � � � � from _mysql.c:29: > > /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: > > stdarg.h: No such file or directory > > In file included from _mysql.c:36: > > /usr/local/mysql/include/my_config.h:1053:1: warning: "HAVE_WCSCOLL" > > redefined > > In file included from /Library/Frameworks/Python.framework/Versions/ > > 2.6/include/python2.6/Python.h:8, > > � � � � � � � � from pymemcompat.h:10, > > � � � � � � � � from _mysql.c:29: > > /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/ > > pyconfig.h:808:1: warning: this is the location of the previous > > definition > > error: command 'gcc-4.0' failed with exit status 1 > > -- > > Strange. Seems that the package is trying to use gcc-4.0 and the > MacOSX10.4 SDK. The default version of gcc on Snow Leopard is 4.2, and > XCode only comes with the SDKs for the previous two versions of OS X. Not strange at all. The python.org Python 2.6 (which is installed to /Library/Frameworks/Python.framework) is deliberately built to be compatible with OS X 10.3.9 through 10.6 and, as such, requires gcc-4.0 and the 10.4u SDK. The latter is included in the 10.6 Xcode distribution as a separate package but is not installed by default; to build a Python C extension module for that Python, you need to go back to the Xcode installer for Snow Leopard (or download a new one from Apple) and do a custom installation of that SDK. -- Ned Deily, nad(a)acm.org
|
Pages: 1 Prev: Is Python portable/Can I install it on an USB Stick? Next: Please Help |