Thread

Posted on Fri Apr 25 23:04:16 2008 by drb
Install problems with DBD::mysql on 64-bit Mac
I have been having problems loading DBD::Mysql v. 4.006 (and v. 3.0008) on Mac 10.5.2 Leopard with DBI 1.52. My perl 5.8.8 is 64-bit. Mysql v. 5.0.51a is a preprocessed binary for Mac x86_64. I have looked at the enormous number of Google finds for DBD::Mysql problems but my directories for mysql/lib and mysql/include are correct. The ccflags have -arch x84-64. My C libraries are also compatible with x86_64. One site (http://www.entropy.ch/blog/Developer/2008/03/25/Installing-Perl-DBD-mysql-on-Mac-OS-X-10-5.html) said that this perl module does not work for 64-bit memory. Is this true? Is this a bug that can be fixed? Here's my "make test" log error:
install_driver(mysql) failed: Can't load '/phd/basics/perl_modules/DBD-mysql-4.006/blib/arch/auto/D +BD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/phd/basics/perl_modules/DBD-mysql-4.006/blib +/arch/auto/DBD/mysql/mysql.bundle, 2): no suitable image found. Did find: /phd/basics/perl_modules/DBD-mysql-4.006/blib/arch/auto/DBD/mysql/mysql.bundle: mach-o, but wrong a +rchitecture at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected
Thanks Debra Baker University of Maryland
Direct Responses: 7903 | Write a response
Posted on Mon May 19 15:03:02 2008 by robbie in response to 7770
Re: Install problems with DBD::mysql on 64-bit Mac
Debra

I'm come across the same problem although I'm using ActivePerl 5.8.8 version of Perl on my MacBook Pro running Leopard. I had used PPM that comes with that Perl to install my missing modules, and was offered the 3.008 version of DBD::mysql, which gave me a similar error. I was just about to post something about this on the ActivePerl mailing list when I came across the following at KNOWN PROBLEMS:

"There are known problems with shared versions of libmysqlclient, at least on some Linux boxes. If you receive an error message similar to install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/i586-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: File not found at /usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line 166<br><br> then this error message can be misleading: It's not mysql.so that fails being loaded, but libmysqlclient.so! The usual problem is that this file is located in a directory like /usr/lib/mysql where the linker doesn't look for it. The best workaround is using a statically linked mysqlclient library, for example /usr/lib/mysql/libmysqlclient.a You force linking against this file by replacing -L/usr/lib/mysql -lmysqlclient with /usr/lib/mysql/libmysqlclient.a in the list of linker flags. <A HREF="http://aspn.activestate.com/ASPN/CodeDoc/DBD-mysql/DBD/mysql/ +INSTALL.html#Configuration">/Configuration</A>. <A HREF="http://aspn.activestate.com/ASPN/CodeDoc/ +DBD-mysql/DBD/mysql/INSTALL.html#Linker%20flags">/Linker flags</A>."
Although this was for DBD::mysql v2.1004 and the error message is not quite the same as the ones you and I are getting I wonder if perhaps this is our problem. I've not yet checked up on this yet. I'm very new to the Mac having just started to use this recently having used Windows up until now so it will take me a bit longer to try this solution out. I'll be very interested to learn if you think this might be the answer, and if so whether it worked when you tried it. Eric Robertson
Write a response