mysql-python build error
I installed Plone 2.1 from the binary installer at plone.org and MySQL 4.1 from the binary at mysql.com. When attempting to build MySQL-python-1.2.0 on MOSX 10.4.2 client, I get this error: sh: line 1: mysql_config: command not found sh: line 1: mysql_config: command not found running build running build_py running build_ext building '_mysql' extension gcc -bundle -undefined dynamic_lookup build/temp.darwin-8.2.0-Power_Macintosh-2.3/_mysql.o -L/usr/local/mysql/include -lz -lmysqld -o build/lib.darwin-8.2.0-Power_Macintosh-2.3/_mysql.so /usr/bin/ld: can't locate file for: -lmysqld collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Obviously, it's looking for -lmysqld. I don't know where to change setup.py (or what to change it to) so this will work. Any tips are appreciated!! SG __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
On Tue, 13 Sep 2005 18:51:24 +0200, Sophia Grimm <sophiagrimm@yahoo.com> wrote:
I installed Plone 2.1 from the binary installer at plone.org and MySQL 4.1 from the binary at mysql.com. When attempting to build MySQL-python-1.2.0 on MOSX 10.4.2 client, I get this error:
error: command 'gcc' failed with exit status 1
Obviously, it's looking for -lmysqld. I don't know where to change setup.py (or what to change it to) so this will work. Any tips are appreciated!!
If you are doing any serious work with UNIX tools on Mac OS X, I recommend DarwinPorts: http://www.darwinports.org I'm not sure if they have your particular package, but since Python and MySQL is so common, I would assume they do. -- _____________________________________________________________________ Alexander Limi · Chief Architect · Plone Solutions · Norway Consulting · Training · Development · http://www.plonesolutions.com _____________________________________________________________________ Plone Co-Founder · http://plone.org · Connecting Content Plone Foundation · http://plone.org/foundation · Protecting Plone
It turned out there were two different problems at work here. First, I had to hard code the paths of my include_dirs and include_lib. Second, I didn't realize my bash shell wasn't taking the export command. I had to edit my bash profile to set the mysqlclient environment variable (which is the path of the mysql installation). Thanks to everyone who responded! SG --- Sophia Grimm <sophiagrimm@yahoo.com> wrote:
I installed Plone 2.1 from the binary installer at plone.org and MySQL 4.1 from the binary at mysql.com. When attempting to build MySQL-python-1.2.0 on MOSX 10.4.2 client, I get this error:
sh: line 1: mysql_config: command not found sh: line 1: mysql_config: command not found running build running build_py running build_ext building '_mysql' extension gcc -bundle -undefined dynamic_lookup build/temp.darwin-8.2.0-Power_Macintosh-2.3/_mysql.o -L/usr/local/mysql/include -lz -lmysqld -o build/lib.darwin-8.2.0-Power_Macintosh-2.3/_mysql.so /usr/bin/ld: can't locate file for: -lmysqld collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1
Obviously, it's looking for -lmysqld. I don't know where to change setup.py (or what to change it to) so this will work. Any tips are appreciated!!
SG
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Alexander Limi -
Sophia Grimm