PDA

View Full Version : dbi/dbd as static modules


undertow
05-11-03, 16:48
I want to have DBI and DBD::mysql compiled into Perl statically. I have not been able to do this successfully. If I unpackage the two modules into the ext directory and try to build Perl, only DBI shows up. I read in the last section of this MySQL doc page (http://www.mysql.com/doc/en/Perl_support_problems.html) that you actually need to build two Perls, first with DBI as a static module, then again for DBD::mysql. Apparently all you have to do is type perl Makefile.PL -static -config in the DBI directory, then do make, make install, and make perl. Once you have done this, you use the new Perl and run the same four commands in the DBD::mysql directory. However, I get "unrecognized option" errors for static and config (these are kind of important). I looked at the Makefile.PL for DBI and at line 153 there is a reference to what appears to be a "static" option. There are too many uses of "config" to see if there's a similar reference to that option.

I'm at a loss for why this isn't working. Some version numbers are: Perl 5.8.0 DBI 1.35 DBD::mysql 2.1026. TIA.

ScottGeiger
06-19-03, 10:41
You could try the CPAN interface: perl -MCPAN -e shell

Then at the CPAN command like do this:

install DBI

{note this might fail the test stage, usually because you have correctly set a password for the root user to access MySQL. If it does then you can issue this command instead: force install DBI}

install DBD::mysql

I find that using CPAN shell is easier than manually doing all the work. Plus it will tell you (and often download and install) any dependencies that are required.