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

I am setting Bugzilla on my machine and want to install DBD::mysql module. I am trying this with manual installation using nmake install as my network is behind firewall and I can not use ppm install or cpan commands because proxy authentication failure error(inspite of setting HTTP_proxy environment variable).

I also tried installing lower version of DBD::mysql module but got same error. Can you please suggest how do I resolve this error? or Is there any other way to install this module.There are some sucessfull process as well as warnings in between but I have put only errors.

Error:

D:\Bugzilla\PERL_M~1\DBD-MY~1.011>perl Makefile.PL "--libs=-Lc:\mysql\lib -lmysq lclient -lz -lm -lcrypt -lnsl" "--cflags=-Ic:\mysql\include"
Use of uninitialized value in concatenation (.) or string at Makefile.PL line 488.
Use of uninitialized value in printf at Makefile.PL line 175.

Use of uninitialized value in printf at Makefile.PL line 175.

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lmysqlclient
Note (probably harmless): No library found for -lz
Note (probably harmless): No library found for -lm
Note (probably harmless): No library found for -lcrypt
Note (probably harmless): No library found for -lnsl
Multiple copies of Driver.xst found in: C:/Perl/site/lib/auto/DBI/ C:/Perl/lib/a uto/DBI/ at Makefile.PL line 747

Using DBI 1.608 (for perl 5.008008 on MSWin32-x86-multi-thread) installed in C:/ Perl/site/lib/auto/DBI/

Writing Makefile for DBD::mysql
D:\Bugzilla\PERL_M~1\DBD-MY~1.011>nmake
Creating library blib\arch\auto\DBD\mysql\mysql.lib and object blib\arch\auto \DBD\mysql\mysql.exp
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32

dbdimp.obj : error LNK2001: unresolved external symbol _mysql_options@12
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_init@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_errno@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_errno@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_error@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_error@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_sqlstate@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_sqlstate@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_commit@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_rollback@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_close@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_close@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_server_end@0
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_autocommit@8
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_insert_id@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_info@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_get_proto_info@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stat@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_get_server_info@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_get_server_info@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_thread_id@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_get_host_info@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_param_count@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_close@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_stmt_close@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_errno@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_stmt_errno@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_error@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_stmt_error@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_prepare@12
mysql.obj : error LNK2001: unresolved external symbol _mysql_stmt_prepare@12
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_stmt_init@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_stmt_init@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_next_result@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_next_result@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_free_result@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_free_result@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_field_count@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_use_result@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_use_result@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_affected_rows@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_warning_count@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_more_results@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
mysql.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_real_query@12
mysql.obj : error LNK2001: unresolved external symbol _mysql_real_query@12
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_list_fields@12
dbdimp.obj : error LNK2001: unresolved external symbol _mysql_real_escape_string @16
.
.
.
.
.

blib\arch\auto\DBD\mysql\mysql.dll : fatal error LNK1120: 63 unresolved externals
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1' Stop.

Can you please help me solve this problem?

Replies are listed 'Best First'.
Re: DBD::mysql module installation error
by Corion (Patriarch) on May 27, 2009 at 12:03 UTC
    Note (probably harmless): No library found for -lmysqlclient Note (probably harmless): No library found for -lz Note (probably harmless): No library found for -lm Note (probably harmless): No library found for -lcrypt Note (probably harmless): No library found for -lnsl

    These are not harmless, despite what Perl tells you. It seems your setup does either not have the MySQL client libraries (and necessary prerequisites), or the library/include search paths are not set up correctly so that the Makefile.PL can find them.

      I have passed location of mysql library and include files as arguments to makefile.pl command as shown below.

      D:\Bugzilla\PERL_M~1\DBD-MY~1.011>perl Makefile.PL "--libs=-Lc:\mysql\lib -lmysq lclient -lz -lm -lcrypt -lnsl" "--cflags=-Ic:\mysql\include"

Re: DBD::mysql module installation error
by moritz (Cardinal) on May 27, 2009 at 12:02 UTC
    You could still manually download the .ppm files and install them with locally with ppm, that might be much less trouble than compiling all that stuff yourself.
      Can you please suggest from where do I download ppm file. IS it present in .tar itself or I will have to get it form some other location?