Combinatorial of elements in Python?

Sean Tierney seanttierney at gmail.com
Wed Aug 15 15:00:05 CEST 2007


Hi Team,

I'm trying to get Python hooked up to MySQL using MySQL-python-1.2.2

Details:
Mac OS X 10.4.x
Python2.5
MySQL 5.x.x
MySQL-python-1.2.2
gcc

Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5250.obj~12/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0
--build=powerpc-apple-darwin8 --with-arch=pentium-m
--with-tune=prescott --program-prefix= --host=i686-apple-darwin8
--target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)

When I run $ python setup.py build, I get this message:

~/Desktop/MySQL-python-1.2.2 SeanThomas$ python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,2,'final',0)
-D__version__=1.2.2
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-c _mysql.c -o build/temp.macosx-10.3-fat-2.5/_mysql.o
_mysql.c:35:23: error: my_config.h: No such file or directory
_mysql.c:41: error: parse error before string constant
_mysql.c:78: error: parse error before 'MYSQL'
_mysql.c:78: warning: no semicolon at end of struct or union
_mysql.c:81: error: parse error before '}' token
_mysql.c:81: warning: data definition has no type or storage class
_mysql.c:92: error: parse error before 'MYSQL_RES'
_mysql.c:92: warning: no semicolon at end of struct or union
_mysql.c:96: error: parse error before '}' token
_mysql.c:96: warning: data definition has no type or storage class
_mysql.c:108: error: parse error before '*' token
_mysql.c: In function '_mysql_Exception':
_mysql.c:122: error: 'c' undeclared (first use in this function)
_mysql.c:122: error: (Each undeclared identifier is reported only once
_mysql.c:122: error: for each function it appears in.)
_mysql.c:125: error: 'CR_MAX_ERROR' undeclared (first use in this function)
_mysql.c:133: error: 'CR_COMMANDS_OUT_OF_SYNC' undeclared (first use
in this function)

....~100+ or more lines of error message then it ends with:

lipo: can't figure out the architecture type of: /var/tmp//cc1VlbOG.out
error: command 'gcc' failed with exit status 1


Can someone point me in the right direction?

Thanks, and Happy Wednesday.



More information about the Python-list mailing list