I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-04-25 20:04:16-07 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 | 12096 | Write a response
Posted on 2008-05-19 12:03:02-07 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
Direct Responses: Write a response
Posted on 2010-01-04 17:49:03-08 by drb in response to 7770
Re: Install problems with DBD::mysql on 64-bit Mac
Here's how I fixed it: The problem was caused by the different architectures for perl (32-bit) and MySQL(64-bit). Leopard only had 32-bit perl and most of the modules I wanted were also only in 32-bit. Since installing a new perl was strongly discouraged in the perl MacOSX manual, I uninstalled the 64-bit MySQL and installed a 32-bit MySQL. I was able to get DBD::mysql to work by installing the fink version of DBD::mysql v. 4.005-11. There is a problem with MySQL v 5.0.41 for Leopard. MySQL looks for its libraries at /usr/local/mysql/lib/mysql/ when they really are in /usr/local/mysql/lib. The best workaround I found is to go to /usr/local/mysql/lib, create a mysql directory (sudo mkdir mysql) and then make a soft link to all the files in /usr/local/mysql/lib (sudo ln -s /usr/local/mysql/lib/lib* ../mysql). Also, when I uninstalled DBD::mysql, it took parts of Mysql perlmod with it so I had to reinstall Mysql perlmod with CPANPLUS. The real pain is that my other programs (mostly numerical models) are all 64-bit so I have to change my paths in cshcrs when I want to run the program using the perl modules and reinitialize UNIX. I also had to load a 32-bit netCDF and other stuff too. I don't know if these same problems arise in Snow Leopard but I am upgrading so I'm about to find out!I may just go with 32-bit for everything this time. Deb
Direct Responses: Write a response