I'm not a fink man, so I can't help you there, but I suspect installing these libraries via any method should install them in the same important Perl relevant location.
Now, the most recent time I've done this, it was on a Core 2 Duo iMac. There might be some slight differences in the commands due to whatever architecture you're running.
So, I used cpan to install DBI. I suspect you, like I, had no trouble getting DBI installed.
I started by launching cpan:
<pre class="command">/usr/bin/sudo /usr/bin/cpan</pre>
Once that's running, you can install DBI via:
<pre class="command">install DBI</pre>
It should run through its paces, maybe ask you for some prerequisites and then complete. I suspect that if fink has previously succeeded, cpan should just tell you that DBI is up to date.
At this point, exit cpan.
Then, get the source for DBD::mysql. I got 4.004:
curl -O http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.004.tar.gz
Decompress and enter the folder and run the makefile command:
<pre class="command">tar -zxvf DBD-mysql-4.004.tar.gz</pre>
<pre class="command">cd DBD-mysql-4.004</pre>
<pre class="command">perl Makefile.PL</pre>
Now, if your setup is like mine, you'll get something like this at the start:
<pre class="command">I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/include/mysql -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe
embedded (mysql_config) =
libs (mysql_config) = -arch ppc64 -arch x86_64 -pipe -L/usr/lib/mysql -lmysqlclient -lz -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) = </pre>
And something like this at the end:
<pre class="command">Unrecognized argument in LIBS ignored: '-arch'
Unrecognized argument in LIBS ignored: 'ppc64'
Unrecognized argument in LIBS ignored: '-arch'
Unrecognized argument in LIBS ignored: 'x86_64'
Unrecognized argument in LIBS ignored: '-pipe'</pre>
Basically, the DBD::mysql installer looked at your mysql_config and tried to add whatever flags Apple used to build MySQL, to build DBD::mysql, and some arguments just don't apply/work. Specifically, the DBD::mysql installer doesn't understand the -arch and -pipe arguments.
SO, you need to override `perl Makerfile.PL` to not exclude those by overriding the cflags and libs attributes with everything BUT -arch and -pipe. So, in my case, the updated command should now look like this (don't execute it yet!):
<pre class="command">perl Makefile.PL \
--cflags="-I/usr/include/mysql -fno-omit-frame-pointer" \
--libs="-L/usr/lib/mysql -lmysqlclient -lz -lm"</pre>
Now, I like testing the build before installing it, and to do that successfully, you have to inform the installer which database it can perform tests on. By default, the installer tries to perform tests on the "test" database as the current user using no password. That was no good for me. So, I created a user for mysql using phpMyAdmin named "test" with password of "t3st". So, my completed Makefile line looked like this:
<pre class="command">perl Makefile.PL \
--cflags="-I/usr/include/mysql -fno-omit-frame-pointer" \
--libs="-L/usr/lib/mysql -lmysqlclient -lz -lm" \
--testhost=localhost \
--testdb=test \
--testuser=test \
--testpassword=t3st \
--testsocket=/var/mysql/mysql.sock</pre>
That should all run now without complaint and you should see no "Unrecognized argument" comments. If so, after that, you can run in order:
<pre class="command">./configure</pre>
<pre class="command">make</pre>
<pre class="command">make test</pre>
At that point, everything should have gone smoothly, tests and all. If so, do the last and final command:
<pre class="command">/usr/bin/sudo /usr/bin/make install</pre>
Let me know if anything is not as expected and/or if it works for you. If you have issues copy and paste whatever you did enter and what the output was.
MacBook Mac OS X (10.4.8)
MacBook Mac OS X (10.4.8)
MacBook Mac OS X (10.4.8)
MacBook Mac OS X (10.4.8)