costas has asked for the wisdom of the Perl Monks concerning the following question:

I tried installing DBD::mysql but it dosent quite complete

I used the following line

perl Makefile.PL --cflags=-I/usr/local/mysql/include/mysql -libs=-L/usr/local/mysql/lib/mysql The I tag being the location of mysql.h. Can you see if I am doing anything wrong?

THanks

Costas

I have included the results of 'make' for anyones reference
cc -c -I/usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI -I/usr/loca +l/mysql/include/mysql -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64 -O2 -march=i686 -pipe -DVERSION=\"2.0902\" -DXS_VE +RSION=\"2.0902\" -fpic -I/usr/lib/perl5/5.6.1/i686-linux/CORE dbdimp +.c /usr/bin/perl -p -e "s/~DRIVER~/mysql/g" < /usr/lib/perl5/site_perl/5. +6.1/i686-linux/auto/DBI/Driver.xst > mysql.xsi /usr/bin/perl -I/usr/lib/perl5/5.6.1/i686-linux -I/usr/lib/perl5/5.6.1 + /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.1/ +ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c Warning: duplicate function definition 'rows' detected in mysql.xs, li +ne 263 cc -c -I/usr/lib/perl5/site_perl/5.6.1/i686-linux/auto/DBI -I/usr/loca +l/mysql/include/mysql -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64 -O2 -march=i686 -pipe -DVERSION=\"2.0902\" -DXS_VE +RSION=\"2.0902\" -fpic -I/usr/lib/perl5/5.6.1/i686-linux/CORE mysql. +c 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 -shared dbdimp.o mysql.o -o bli +b/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.3perl Unmatched =back at /usr/bin/pod2man line 48 Unmatched =back at /usr/bin/pod2man line 48 Manifying blib/man3/DBD::mysql::INSTALL.3perl Manifying blib/man3/Bundle::DBD::mysql.3perl Manifying blib/man3/Mysql.3perl

Replies are listed 'Best First'.
Re: Installing DBD problems
by MZSanford (Curate) on Oct 15, 2001 at 20:26 UTC
    from what i can tell, that make output it fine. Did make test result in some sort of dubious output ?
    The requirements change because they don't know what they want, or how much they own you.
      Here is the results for make test. Can you see why installation went wrong?
      PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl +5/5.6.1/i686-linux -I/usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&r +untests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/00base............install_driver(mysql) failed: Can't load 'blib/arc +h/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/ +mysql/mysql.so: undefined symbol: mysql_store_result at /usr/lib/perl +5/5.6.1/i686-linux/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/00base.t line 38 t/00base............dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 4-5 Failed 2/5 tests, 60.00% okay t/10dsnlist.........install_driver(mysql) failed: Can't load 'blib/arc +h/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/ +mysql/mysql.so: undefined symbol: mysql_store_result at /usr/lib/perl +5/5.6.1/i686-linux/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/10dsnlist.t line 45 t/10dsnlist.........dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/20createdrop......install_driver(mysql) failed: Can't load 'blib/arc +h/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/ +mysql/mysql.so: undefined symbol: mysql_store_result at /usr/lib/perl +5/5.6.1/i686-linux/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/20createdrop.t line 45 t/20createdrop......dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t/30insertfetch.....install_driver(mysql) failed: Can't load 'blib/arc +h/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/ +mysql/mysql.so: undefined symbol: mysql_store_result at /usr/lib/perl +5/5.6.1/i686-linux/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/30insertfetch.t line 48 t/30insertfetch.....dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/40bindparam.......install_driver(mysql) failed: Can't load 'blib/arc +h/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/ +mysql/mysql.so: undefined symbol: mysql_store_result at /usr/lib/perl +5/5.6.1/i686-linux/DynaLoader.pm line 206. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/40bindparam.t line 64 t/40bindparam.......dubious + Test returned status 255 (wstat 65280, 0xff00)
        I do not usually work on Linux, but on Solaris/HP/SGI/etc, this is sometimes caused by not having the MySQL .so (mysql.so) file in the LD_LIBRARY_PATH environment variable. I would check $LD_LIBRARY_PATH and $SHLIB_PATH, and make sure that both contain the directory your mysql library is in (not sure which of the two environment variables is used by Linux.)

        Also, and i hate to say this, but another test is to run make install, and then try to use the driver. I have seen the DBD::Sybase driver fail 90% of tests, and still work once installed (usually because of path setups).
Re: Installing DBD problems
by ralphie (Friar) on Oct 16, 2001 at 04:04 UTC
    what distribution are you using? with debian, i've found it to be much easier to install drivers with the libdbd-mysql package, for example, and there are plenty of rpm's for the various redhat derivatives.
      I am using SUSE. What installation method do you recommend?
Re: Installing DBD problems
by tommyw (Hermit) on Oct 16, 2001 at 13:58 UTC

    Disclaimer: I install everything from RPMs or CPAN these days, and I don't deal with mysql, so the command line arguments don't mean anything to me

    You've got a double hyphen before cflags, and a single hyphen before libs. Is this deliberate, a typo, or an error?

    Do you want the -libs string appended to the value for cflags, or is it a separate argument to Makefile.PL? If the former, then you need to stop the space being used as a word separator: either escape it, or wrap the entire value of cflags in quotes

      Just to Say that it is now fixed!

      If anyone is having problems installing mysql drivers on Suse, use Msql-Mysql module instead of the DBDmysdql module. Its quite tricky getting DBD::mysql to install succesfully on Suse and to recognise.

      Install the Msql-Mysql module by performing a 'make install && make test'.

      Thanks to all who helped.

      costas