Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Problem installing PERL DBD::mysql

Problem installing PERL DBD::mysql

2006-08-14       - By Logg, Connie A.

 Back
Reply:     1     2     3     4  

Machine info:

[iepm@(protected) 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@(protected) utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[iepm@(protected) 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@(protected) DBD-mysql-3 (See http://sql-3.ora-code.com).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@(protected) DBD-mysql-3 (See http://sql-3.ora-code.com).0006]#
[root@(protected) DBD-mysql-3 (See http://sql-3.ora-code.com).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_BITSd -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_BITSd -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@(protected) DBD-mysql-3 (See http://sql-3.ora-code.com).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 @(protected))
 -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 @(protected)/#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 Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=mysql@(protected)