Hi, I'm playing with Zope, and have been trying to get Zope to talk to MySQL using the MySQLDA. I'm running RedHat 5.2 Since there were caveats about having MySQL development enabled, and such, I downloaded the source distribution for MySQL and made it. It appears to be working very nicely. When I follow the procedures outlined in the README, the following happens: I run make -f Makefile.pre.in boot and everything works correctly. I then run make and get the following error. gcc -fPIC -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG _H -I/usr/local/mysql/include -I/usr/include/mysql -c ./MySQLmodule.c ./MySQLmodule.c: In function `pythonify_row': ./MySQLmodule.c:238: warning: assignment from incompatible pointer type gcc -shared MySQLmodule.o -L/usr/local/mysql/lib -L/usr/lib/mysql -lmysqlclien t -lm -o MySQLmodule.so ld: cannot open -lmysqlclient: No such file or directory make: *** [MySQLmodule.so] Error 1 I did a locate on mysqlclient, and coudln't find the file. though I did find some called libmysqlclient. So I changed the both Setup and Setup.in to reflect that other name. however, I still get the above error. Any help would be greatly appreciated. -- Stand Fast, tjg. =================================================== Timothy Grant VP Technology/CTO Avalon Technology Group tjg@avalongroup.net www.avalongroup.net (503) 246-3630 voice (503) 246-3124 fax
On Wed, 3 Mar 1999, Timothy Grant wrote:
gcc -shared MySQLmodule.o -L/usr/local/mysql/lib -L/usr/lib/mysql -lmysqlclien t -lm -o MySQLmodule.so ld: cannot open -lmysqlclient: No such file or directory make: *** [MySQLmodule.so] Error 1
I did a locate on mysqlclient, and coudln't find the file. though I did find some called libmysqlclient. So I changed the both Setup and Setup.in to reflect that other name. however, I still get the above error.
Your problem wasn't with the library, -lmysqlclient refers to libmysqlclient (think of the -l as short for lib). The problem probably was that libmysqlclient wasn't on the path gcc searched for libraries. This is controled by the -L argument (-L is library paths). So... here's what to do: 1. Get everything cleaned up (ie. back in the condition after first untarring ZMySQL). 2. Edit Setup.in, add -L<the path to libmysqlclient> to the end of the last line. 3. Proceed as usual (make -f Makefile.pre.in boot; make) --- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
John Eikenberry wrote:
1. Get everything cleaned up (ie. back in the condition after first untarring ZMySQL). 2. Edit Setup.in, add -L<the path to libmysqlclient> to the end of the last line. 3. Proceed as usual (make -f Makefile.pre.in boot; make)
Thanks to both John and Ronald for their kind assitance. I have made it past my original error and got everything compiled correctly. However, my general Newbieness is still coming back and biting me on the you-know-what. The instructions state that I should start python, and then Import the MySQL module to make sure it works. When I do, I get yet another error. Traceback (innermost last): File "<stdin>", line 1, in ? ImportError: libmysqlclient.so.6: cannot open shared object file: No such file or directory The file does exist, so I am once again stumped. Thank you for your continued assitance. -- Stand Fast, tjg. =================================================== Timothy Grant VP Technology/CTO Avalon Technology Group tjg@avalongroup.net www.avalongroup.net (503) 246-3630 voice (503) 246-3124 fax
John Eikenberry wrote:
1. Get everything cleaned up (ie. back in the condition after first untarring ZMySQL). 2. Edit Setup.in, add -L<the path to libmysqlclient> to the end of the last line. 3. Proceed as usual (make -f Makefile.pre.in boot; make)
Thanks to both John and Ronald for their kind assitance. I have made it past my original error and got everything compiled correctly. However, my general Newbieness is still coming back and biting me on the you-know-what. The instructions state that I should start python, and then Import the MySQL module to make sure it works. When I do, I get yet another error. Traceback (innermost last): File "<stdin>", line 1, in ? ImportError: libmysqlclient.so.6: cannot open shared object file: No such file or directory The file does exist, so I am once again stumped. Thank you for your continued assitance. -- Stand Fast, tjg. =================================================== Timothy Grant VP Technology/CTO Avalon Technology Group tjg@avalongroup.net www.avalongroup.net (503) 246-3630 voice (503) 246-3124 fax _______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
Hi,
I'm playing with Zope, and have been trying to get Zope to talk to MySQL using the MySQLDA.
I'm running RedHat 5.2
Since there were caveats about having MySQL development enabled, and such, I downloaded the source distribution for MySQL and made it. It appears to be working very nicely.
When I follow the procedures outlined in the README, the following happens:
I run make -f Makefile.pre.in boot and everything works correctly.
I then run make and get the following error. gcc -fPIC -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG _H -I/usr/local/mysql/include -I/usr/include/mysql -c ./MySQLmodule.c ./MySQLmodule.c: In function `pythonify_row': ./MySQLmodule.c:238: warning: assignment from incompatible pointer type gcc -shared MySQLmodule.o -L/usr/local/mysql/lib -L/usr/lib/mysql -lmysqlclien t -lm -o MySQLmodule.so ld: cannot open -lmysqlclient: No such file or directory make: *** [MySQLmodule.so] Error 1
I did a locate on mysqlclient, and coudln't find the file. though I did find some called libmysqlclient. So I changed the both Setup and Setup.in to reflect that other name. however, I still get the above error.
Any help would be greatly appreciated.
You almost made it ;=) The -lmysqlclient does refer to the libmysqlclient you found, but you should only modify the path pointing to it. This is done in the Setp[.in] just before the -lmysqlclient; modify the '-L/<path-to-the-libmysqlclient>', if have this set to -L/usr/local/lib/mysql. [ZDP] Maybe this is something for the FAQ? -- <- Ronald Offerman | ron@offerman.cx <- Root Powered Carrot Munchers Ltd. Inc. SA AG BV "This is Linux Country. On a quiet night, you can hear Windows NT reboot!" "Daddy, why do those people have to use Microsoft Windows?" "Don't stare, son; it's not polite." "M$ Windows NT, an accident waiting to happen" "What goes up, must come down. Ask any system administrator." ".sig too big? Flame me, I'm cold!"
participants (3)
-
John Eikenberry -
Ronald Offerman -
Timothy Grant