DBD-Installer: Modul DBD::Mysql Problem

Hallo,

ich hab folgendes Problem beim installieren des DBD::Mysql Moduls.

myunix:perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config

PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.pl --testuser=username

I will use the following settings for compiling and testing:

cflags        (mysql_config) = -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T
  embedded      (mysql_config) =
  libs          (mysql_config) = -fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib  -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lposix4 -lgen -lsocket -lnsl -lm  -L/usr/local/ssl/lib -lssl -lcrypto
  mysql_config  (Users choice) = /usr/local/mysql/bin/mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 1
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testsocket    (default     ) =
Use of uninitialized value in printf at Makefile.PL line 175, <PIPE> line 93.
  testuser      (            ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '-fPIC'
Using DBI 1.58 (for perl 5.008004 on i86pc-solaris-64int) installed in /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI/
Writing Makefile for DBD::mysql

myunix:/tmp/DBD-mysql-4.011 # make
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c  -I/usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff   -DVERSION="4.011" -DXS_VERSION="4.011" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE"   dbdimp.c
"dbdimp.c", line 463: warning: implicit function declaration: parse_number
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp  -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 225
Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
cc -c  -I/usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff   -DVERSION="4.011" -DXS_VERSION="4.011" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE"   mysql.c
"mysql.xs", line 588: warning: implicit function declaration: mysql_st_next_results
"mysql.xs", line 724: warning: implicit function declaration: is_prefix
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/local/mysql/lib/mysql:/usr/local/lib:/usr/lib:/usr/local/ssl/lib" /usr/bin/perl myld cc  -G dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so   -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lposix4 -lgen -lsocket -lnsl -lm -L/usr/local/ssl/lib -lssl -lcrypto
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Bundle::DBD::mysql.3

myunix:/tmp/DBD-mysql-4.011 # make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base....................ok 1/6
t/00base....................NOK 2#   Failed test 'use DBD::mysql;'
#   at t/00base.t line 21.
#     Tried to use 'DBD::mysql'.
#     Error:  Can't load '/tmp/DBD-mysql-4.011/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: libmysqlclient.so.15: open failed: No such file or directory at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230.
#  at (eval 6) line 2

Compilation failed in require at (eval 6) line 2.

BEGIN failed--compilation aborted at (eval 6) line 2.

FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 29

Hat jemand eine Idee wie ich das lösen kann?

Gruss,
DBD-Installer

  1. hi,

    Hat jemand eine Idee wie ich das lösen kann?

    Yast starten, Installationsquelle wählen und das richtige Paket auswählen. Abhängige Libs (shared objects-Dateien, .so) werden so automatisch nachgezogen.

    Hotte

    --
    Wenn der Kommentar nicht zum Code passt, kann auch der Code falsch sein.
    1. »» Hat jemand eine Idee wie ich das lösen kann?

      Yast starten, Installationsquelle wählen und das richtige Paket auswählen. Abhängige Libs (shared objects-Dateien, .so) werden so automatisch nachgezogen.

      Yast? Kenn ich auf Solaris nicht.

  2. Ich hab noch ein Hinweis gefunden ...

    If Perl was compiled with gcc or egcs, but MySQL was compiled with another compiler or on another system, an error message like this is very likely when running ``Make test'':

    t/00base............install_driver(mysql) failed: Can't load
      '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql:
      ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: _umoddi3
      at /usr/local/perl-5.005/lib/5.005/i586-linux-thread/DynaLoader.pm
      line 168.

    This means, that your linker doesn't include libgcc.a. You have the following options:

    The solution is telling the linker to use libgcc. Run

    gcc --print-libgcc-file

    to determine the exact location of libgcc.a or for older versions of gcc

    gcc -v

    to determine the directory. If you know the directory, add a

    -L<directory> -lgcc

    to the list of C compiler flags.

    myunix:/tmp/DBD-mysql-4.011 # gcc --print-libgcc-file
    /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/libgcc.a

    Aber hat leider dennoch nix gebracht ...

    myunix:/tmp/DBD-mysql-4.011 # perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config --libs="-L/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/libgcc.a -lgcc"

    PLEASE NOTE:

    For 'make test' to run properly, you must ensure that the
    database user 'root' can connect to your MySQL server
    and has the proper privileges that these tests require such
    as 'drop table', 'create table', 'drop procedure', 'create procedure'
    as well as others.

    mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';

    You can also optionally set the user to run 'make test' with:

    perl Makefile.pl --testuser=username

    I will use the following settings for compiling and testing:

    cflags        (mysql_config ) = -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T
      embedded      (mysql_config ) =
      libs          (User's choice) = -L/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/libgcc.a -lgcc
      mysql_config  (Users choice ) = /usr/local/mysql/bin/mysql_config
      nocatchstderr (default      ) = 0
      nofoundrows   (default      ) = 0
      ssl           (guessed      ) = 0
      testdb        (default      ) = test
      testhost      (default      ) =
      testpassword  (default      ) =
      testsocket    (default      ) =
    Use of uninitialized value in printf at Makefile.PL line 175, <PIPE> line 92.
      testuser      (             ) = root

    To change these settings, see 'perl Makefile.PL --help' and
    'perldoc INSTALL'.

    Checking if your kit is complete...
    Looks good
    Note (probably harmless): No library found for -lgcc
    Using DBI 1.58 (for perl 5.008004 on i86pc-solaris-64int) installed in /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI/
    Writing Makefile for DBD::mysql

    myunix:/tmp/DBD-mysql-4.011 # make
    cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
    cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
    cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    cc -c  -I/usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff   -DVERSION="4.011" -DXS_VERSION="4.011" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE"   dbdimp.c
    "dbdimp.c", line 463: warning: implicit function declaration: parse_number
    /usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI/Driver.xst > mysql.xsi
    /usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp  -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
    Warning: duplicate function definition 'do' detected in mysql.xs, line 225
    Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
    cc -c  -I/usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int/auto/DBI -I/usr/local/mysql/include/mysql -DHAVE_RWLOCK_T -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff   -DVERSION="4.011" -DXS_VERSION="4.011" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE"   mysql.c
    "mysql.xs", line 588: warning: implicit function declaration: mysql_st_next_results
    "mysql.xs", line 724: warning: implicit function declaration: is_prefix
    Running Mkbootstrap for DBD::mysql ()
    chmod 644 mysql.bs
    rm -f blib/arch/auto/DBD/mysql/mysql.so
    LD_RUN_PATH="" /usr/bin/perl myld cc  -G dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so
    chmod 755 blib/arch/auto/DBD/mysql/mysql.so
    cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
    chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
    Manifying blib/man3/DBD::mysql.3
    Manifying blib/man3/DBD::mysql::INSTALL.3
    Manifying blib/man3/Bundle::DBD::mysql.3

    myunix:/tmp/DBD-mysql-4.011 # make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/00base....................NOK 2
    #   Failed test 'use DBD::mysql;'
    #   at t/00base.t line 21.
    #     Tried to use 'DBD::mysql'.
    #     Error:  Can't load '/tmp/DBD-mysql-4.011/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: relocation error: file /tmp/DBD-mysql-4.011/blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_real_escape_string: referenced symbol not found at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230.
    #  at (eval 6) line 2

    Compilation failed in require at (eval 6) line 2.

    BEGIN failed--compilation aborted at (eval 6) line 2.

    FAILED--Further testing stopped: Unable to load DBD::mysql
    make: *** [test_dynamic] Error 29