pitaro920 |
05-22-2005 03:40 AM |
Error compiling perl-DBD-MySQL after upgrading to MySQL 4.1
Hello,
I'm trying to setup a new Virtual Private Server running on RedHat 9.0, and found that there were a number of things I needed to update.
Firstly, I needed to upgrade MySQL to version 4.1. I ran into some problems doing so, but I was finally able to get version 4.1 installed successfully (with a RPM binary). In the process of getting version 4.1 installed, though, I saw that some packages had dependancies on the previous version of MySQL, so I tried to re-compile those packages to remedy the situation, and the first package I'm working with is perl-DBD-MySQL.
I downloaded the source rpm and installed it with
rpm -ivh perl-DBD-MySQL-2.1021-3.src.rpm
Then I went to:
/usr/src/redhat/SPECS
And tried to build the package with:
rpmbuild -ba perl-DBD-MySQL.spec
But when I do, it fails, and this is the output:
Code:
[root@dharmamatch SPECS]# rpmbuild -ba perl-DBD-MySQL.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.31471
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf DBD-mysql-2.1021
+ /bin/gzip -dc /usr/src/redhat/SOURCES/DBD-mysql-2.1021.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd DBD-mysql-2.1021
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.31471
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd DBD-mysql-2.1021
+ CFLAGS=-O2 -g -march=i386 -mcpu=i686
+ perl Makefile.PL PREFIX=/var/tmp/perl-DBD-MySQL-2.1021-root/usr INSTALLDIRS=vendor --ssl
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/include/mysql -mcpu=i486 -fno-strength-reduce
libs (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
nocatchstderr (default ) = 0
ssl (Users choice) = 1
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testuser (default ) =
To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.
Checking if your kit is complete...
Looks good
Using DBI 1.32 installed in /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
+ make
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/DBD/mysql.pod blib/lib/DBD/mysql.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc -c -I/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI -I/usr/include/mysql -mcpu=i486 -fno-strength-reduce -DDBD_MYSQL_WITH_SSL -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"2.1021\" -DXS_VERSION=\"2.1021\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" dbdimp.c
dbdimp.c: In function `mysql_db_login':
dbdimp.c:847: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c: In function `mysql_db_commit':
dbdimp.c:892: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c: In function `mysql_db_rollback':
dbdimp.c:913: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c: In function `mysql_db_FETCH_attrib':
dbdimp.c:1160: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1164: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1170: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1177: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1192: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1200: warning: initialization discards qualifiers from pointer target type
dbdimp.c:1205: warning: initialization discards qualifiers from pointer target type
dbdimp.c: In function `mysql_st_internal_execute':
dbdimp.c:1350: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c:1362: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c:1371: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c: In function `mysql_st_fetch':
dbdimp.c:1516: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
dbdimp.c: In function `mysql_db_reconnect':
dbdimp.c:2033: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" < /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.0/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'rows' detected in mysql.xs, line 289
gcc -c -I/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI -I/usr/include/mysql -mcpu=i486 -fno-strength-reduce -DDBD_MYSQL_WITH_SSL -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"2.1021\" -DXS_VERSION=\"2.1021\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" mysql.c
mysql.xs: In function `XS_DBD__mysql__dr__ListDBs':
mysql.xs:54: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
mysql.xs: In function `XS_DBD__mysql__dr__admin_internal':
mysql.xs:93: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
mysql.xs:99: too few arguments to function `mysql_shutdown'
mysql.xs:137: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
mysql.xs: In function `XS_DBD__mysql__db__ListDBs':
mysql.xs:180: warning: passing arg 3 of `mysql_dr_error' discards qualifiers from pointer target type
make: *** [mysql.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.31471 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.31471 (%build)
The problem seems to be this "passing arg 3" warning, and from what I've read in other forums so far, it sounds like it's looking for something it can't find, or something is mis-defined, but I'm not sure.
The version of perl installed is 5.8.0, would it be good to upgrade it to 5.8.6? If so, what would be the best way to go about doing so? I downloaded the binary of ActivePerl 5.8.6, but because of my inexperience with Linux, I don't know how to use it to upgrade my existing installation of 5.8.0.
Many thanks for any guidance anyone can provide.
Peter
|