Problem installing PERL DBD::mysql

"Logg, Connie A." <[email protected]>
Newsgroups gmane.comp.db.mysql.general,gmane.comp.db.mysql.perl
Message-ID <35C208A168A04B4EB99D1E13F2A4DB010128B9D0@exch-mail1.win.slac.stanford.edu>
Machine info:

[iepm@snv1 utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
[iepm@snv1 utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[iepm@snv1 utils]$ more /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant Update 4)


--------------------------------------------------
I am having a hard time installing DBD:mysql on 64 bit machine snv1.ultralight.org 

/usr/bin/perl MCPAN -e shell
CPAN> install DBD::mysql

Dies with errors...so I decided to do it from the source, and it also complains....here is the output from the source install:

[root@snv1 DBD-mysql-3.0006]# /usr/bin/perl Makefile.PL I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/usr/local/include/mysql
  embedded      (mysql_config) =
  libs          (mysql_config) = -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
  mysql_config  (guessed     ) = mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testsocket    (default     ) =
  testuser      (default     ) =

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

Using DBI 1.52 (for perl 5.008008 on x86_64-linux) installed in /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI/
Writing Makefile for DBD::mysql
[root@snv1 DBD-mysql-3.0006]#
[root@snv1 DBD-mysql-3.0006]# make
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI -I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\"3.0006\" -DXS_VERSION=\"3.0006\" -fpic "-I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE"   dbdimp.c
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI -I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\"3.0006\" -DXS_VERSION=\"3.0006\" -fpic "-I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE"   mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:647: warning: ignoring return value of `Perl_newSViv', declared with attribute warn_unused_result
mysql.xs:650: warning: ignoring return value of `Perl_newSViv', declared with attribute warn_unused_result
mysql.xs:653: warning: ignoring return value of `Perl_newSVpv', declared with attribute warn_unused_result Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/usr/local/lib/mysql" /usr/bin/perl myld cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/aut
o/DBD/mysql/mysql.so    \
   -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   \

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

I have tried using -fPIC, but I think I do not know how to tell it to use that correctly. I assume it is passed with --cflags on the 'perl Makefile.PL' line, but I can't get that to work.

Can someone tell me the syntax on the 'perl Makefile.PL' line, or, what the problem is and how can I get DBD::mysql to load?

By the way, perl Makefile.PL --help gives me..
[root@snv1 DBD-mysql-3.0006]# perl -Makefile.PL --help

Usage: perl [switches] [--] [programfile] [arguments]
  -0[octal]       specify record separator (\0, if no argument)
  -a              autosplit mode with -n or -p (splits $_ into @F)
  -C[number/list] enables the listed Unicode features
  -c              check syntax only (runs BEGIN and CHECK blocks)
  -d[:debugger]   run program under debugger
  -D[number/list] set debugging flags (argument is a bit mask or alphabets)
  -e program      one line of program (several -e's allowed, omit programfile)
  -f              don't do $sitelib/sitecustomize.pl at startup
  -F/pattern/     split() pattern for -a switch (//'s are optional)
  -i[extension]   edit <> files in place (makes backup if extension supplied)
  -Idirectory     specify @INC/#include directory (several -I's allowed)
  -l[octal]       enable line ending processing, specifies line terminator
  -[mM][-]module  execute "use/no module..." before executing program
  -n              assume "while (<>) { ... }" loop around program
  -p              assume loop like -n but print line also, like sed
  -P              run program through C preprocessor before compilation
  -s              enable rudimentary parsing for switches after programfile
  -S              look for programfile using PATH environment variable
  -t              enable tainting warnings
  -T              enable tainting checks
  -u              dump core after parsing program
  -U              allow unsafe operations
  -v              print version, subversion (includes VERY IMPORTANT perl info)
  -V[:variable]   print configuration summary (or a single Config.pm variable)
  -w              enable many useful warnings (RECOMMENDED)
  -W              enable all warnings
  -x[directory]   strip off text before #!perl line and perhaps cd to directory
  -X              disable all warnings


Thanks, Connie
Connie Logg, Network Analyst
Stanford Linear Accelerator Center
ph: 650-926-2879 
"Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life."

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.