MySQL Forums
Forum List  »  Connector/Python

Re: Problems in building 1.2.2 on Mac OS 10.5
Posted by: Jason Evans
Date: November 27, 2007 12:25AM

okay, after a whole lot of research and trying to figure out this problem, i finally got it.

I have a 64bit ppc, but i imagine this is true with any ppc based mac

1.) build mysql community server from source, not a binary or rpm of the source
2.) comment out the duplicate uint declaration in


so it looks like this

/*typedef unsigned int uint;*/

*just make sure you change it back or at least comment it so you don't
have problems down the line*

3.) since building from source there are no mysqlclient_r.dylib files copy the
mysqlclient.dylib to mysqlclient_r.dylib in /usr/local/mysql/lib/mysql/
because the mysqldb source looks for those names specifically.

cp mysqlclient.dylib mysqlclient_r.dylib
cp mysqlclient.15.dylib mysqlclient_r.15.dylib
cp mysqlclient.15.0.0.dylib mysqlclient_r.15.0.0.dylib

4.) build mysqldb from the source, build. it will still complain
about mysqlclient_r.dylib being of the incorrect architecture.

5.) for some reason it opts to build with that library assuming an i386
architecture so build it manually by copying the gcc command and removing
the -arch i386 option.

gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch ppc
build/temp.macosx-10.5-ppc-2.5/_mysql.o -L/usr/local/mysql/lib/mysql
-lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-ppc-2.5/

6.) install it, sudo pyton install.

7.) copy all of the files from MySQL-python-1.2.2/build/lib.macosx-10.5-ppc-2.5
including, and those files in the directory
MySQLdb to a directory MySQLdb in your python site-packages directory.

8.) test it out
and email me to tell me if it worked or not at .


Options: ReplyQuote

Written By
Re: Problems in building 1.2.2 on Mac OS 10.5
November 27, 2007 12:25AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.