+1  A: 

Did you try installing Bundle::DBD::mysql?

Sinan Ünür
Absolutely did. DBI installed just fine, but DBD::mysql did not.
dlamblin
The message about redefinition of function `do` is puzzling to me. I don't think you can have a function called `do` in a C program.
Sinan Ünür
+5  A: 

Okay, if you get these errors I now know the following:

  1. MySQL 5.1 for Mac OS X x86_64 is not compatible with DBD::mysql (yet). Install the 32-bit x86 version, and try again. You'll succeed. I wish the perl Makefile.pl would just tell you that in a banner.
  2. Bundle::CPAN had issues because I wasn't installing as root. Why that makes it report circular references instead of installation permission issues, I'll never understand.
dlamblin
A: 

I haven't dealt with this problem, but I found that MacPorts cleaned up all my UNIX incompatibility problems. You might want to try that before enduring too much pain and suffering.

ktrimbach
MacPorts does its magic by installing its own version of Perl. That may be a great idea - I prefer not to use Mac's system Perl for anything - but it's worth clarifying how MacPorts helps.
Telemachus
I personally find this to be massive overkill on the scale of warrants issued by the U.N. international courts.
dlamblin
A: 

Where is it complaining about a circular dependency? It looks like you are trying to link to an incompatible version of the mysql libraries. The symbol it's looking for isn't in the library you loaded. I don't think this is a problem caused by CPAN.pm or the cpan script.

Some questions:

  • Who compiled perl? Is this Apple's perl?
  • Who compiled mysql? Is that your own version since it's in /usr/local?
  • Did you previously compile other versions? I start with a compile to ensure everything points to the right places.
brian d foy
yes I understand that that the example doesn't show the circular dependancy. That's because it's the dbd::mysql part I showed. I'd closed the terminal with circular refs. now that I fixed it, I can't reproduce it. If people didn't keep changing my title, you'd see it IS "apple's" perl and mysql's mysql pkg. (stock). I want to compile as little as possible.
dlamblin
None of your title's ever mentioned Apple's perl. Since you can't reproduce the circular dependency stuff, you should remove that from your question.
brian d foy
+2  A: 

Installing the (beta) 5.4.1 64 bit version of mysql, available from their developer website, fixes the issue. Tested on Snow Leopard.

DaGaMs
I just tried the exact some version 4.5.1-beta-osx10.5-x86_64 on 10.6 (there's no 10.6 pkgs) and the install and run fine, but sudo perl -MCPAN -e 'shell' won't install Bundle::DBD::mysql.Test Summary Report-------------------...Failed during this command: CAPTTOFU/DBD-mysql-4.012.tar.gz : make_test NO
dlamblin
I'm not alone, someone on perlmonks.org has the same problem http://www.perlmonks.org/?node_id=793727
dlamblin
Finally got it to build and run and at least load the module with 5.4.1 64 bit version for 10.5 on 10.6. The tests still wouldn't run as it seemed mighty insistent on wanting to connect to a test db. Did get past the symbol errors even loading it though. Ended up force installing it and things are working beautifully.
mikegrb
A: 

Installing latest beta 64bit version of Mysql fixed problem on my computer.

Please identify the "latest version" with either a version number or build number. There are currently 3 latest versions available on the site, one is beta, one is recommended and another is an older but compatible (with older queries) version.
dlamblin