SPUG: problem building DBD::mysql

Mike Schuh schuh at farmdale.com
Mon Jun 16 09:19:50 PDT 2008


Thanks for the hints.  My responses are below.

On Mon, 16 Jun 2008, Mark Foster wrote:

>Mike Schuh wrote:
>> perl Makefile.PL and make are error free, but then make test gives:
>> ----------------------------- cut here ---------------------------------
>> PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
>> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
>> t/00base.t....................1/6
>> #   Failed test 'use DBD::mysql;'
>> #   at t/00base.t line 21.
>> #     Tried to use 'DBD::mysql'.
>> #     Error:  Can't load
>> '/root/.cpan/build/DBD-mysql-4.007-hOjir2/blib/arch/auto/DBD/mysql/mysql.so'
>> for module DBD::mysql:
>> /root/.cpan/build/DBD-mysql-4.007-hOjir2/blib/arch/auto/DBD/mysql/mysql.so:
>> undefined symbol: SSL_CTX_free at
>> /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/DynaLoader.pm line 203.
>Assuming you already have the underlying mysql bits,

mysql is installed and seems happy:

$ mysql -u username -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.0.45-community MySQL Community Edition (GPL)

>it appears to be some problem with your ssl library. You can find out more
>using ldd, but against mysql or perl I cannot say for sure.

$ ldd `which perl` | sort
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x05f34000)
        libc.so.6 => /lib/libc.so.6 (0x001dd000)
        libdl.so.2 => /lib/libdl.so.2 (0x00348000)
        /lib/ld-linux.so.2 (0x001c0000)
        libm.so.6 => /lib/libm.so.6 (0x0031f000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x0084e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00363000)
        libutil.so.1 => /lib/libutil.so.1 (0x00d95000)
        linux-gate.so.1 =>  (0x00110000)
$ ldd `which mysql` | sort
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x05f34000)
        libc.so.6 => /lib/libc.so.6 (0x001dd000)
        libdl.so.2 => /lib/libdl.so.2 (0x00348000)
        /lib/ld-linux.so.2 (0x001c0000)
        libm.so.6 => /lib/libm.so.6 (0x0031f000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x061a8000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x0084e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00363000)
        linux-gate.so.1 =>  (0x00110000)

$ ll -d /usr/lib/*ssl*
lrwxrwxrwx 1 root root     27 Aug 31  2007 /usr/lib/libgnutls-openssl.so.13
-> libgnutls-openssl.so.13.0.6
-rwxr-xr-x 1 root root  99248 Sep 14  2006
-rwxr-xr-x 1 root root 174072 Jul 11  2007 /usr/lib/libssl3.so
-rw-r--r-- 1 root root 441236 Oct 12  2007 /usr/lib/libssl.a
lrwxrwxrwx 1 root root     26 Oct 17  2007 /usr/lib/libssl.so ->
drwxr-xr-x 3 root root   4096 Oct 12  2007 /usr/lib/openssl

>You could also try installing (if not already) IO::Socket::SSL or even
>the older Net::SSLeay.

Net::SSLeay has problems installing (and IO::Socket::SSL requires it):
[from CPAN install]

Running install for module 'Net::SSLeay'
Running make for F/FL/FLORA/Net-SSLeay-1.32.tar.gz
  Has already been unwrapped into directory
  Has already been made
Running make test
/usr/local/bin/perl "-Iinc" Makefile.PL --config=
Cannot determine perl version info from lib/Net/SSLeay.pm
Cannot determine license info from lib/Net/SSLeay.pm
*** Found OpenSSL-0.9.8b installed in /usr
*** Be sure to use the same compiler and options to compile your OpenSSL,
    and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [y] y
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*/*.t t/*/*/*.t
t/handle/external/10_destroy.t.....1/6 Use of uninitialized value in
subroutine entry at
/usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/Socket.pm line 386.
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at
/usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/Socket.pm line 386.
# Looks like you planned 6 tests but only ran 2.
# Looks like your test died just after 2.

>Also what platform are you running on?

# (Fedora Core 6)

$ uname -a
Linux rack #1 SMP Wed Nov 21 13:44:07 EST 2007 i686 athlon i386 GNU/Linux

$ perl -v

This is perl, v5.10.0 built for i686-linux-thread-multi

>Some days it's just not worth chewing through the restraints...


Thanks again.

Mike Schuh - Seattle, Washington USA

More information about the spug-list mailing list