LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-22-2005, 03:40 AM   #1
pitaro920
LQ Newbie
 
Registered: May 2005
Distribution: RedHat 9.0
Posts: 1

Rep: Reputation: 0
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
 
Old 01-16-2006, 04:28 PM   #2
spide21
LQ Newbie
 
Registered: Nov 2005
Distribution: Fedora Core 11
Posts: 23

Rep: Reputation: 15
Post using CPAN

Quote:
Originally Posted by pitaro920
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


Hi, if you install mysql (what version ?), make sure your lib*.so and "linked" files are in a directoy, in case you install mysql from RPM check the file path and locate the directory where your RPM install the *.so library. If you did install from source wich is the best solution (in my case) by default everything is installed in /usr/local/mysql.

After you successfully install mysql, add you /usr/mysql/lib/mysql directory to the /etc/ld.so.conf and save it, then load it by running "ldconfig -f /etc/ld.so.conf", and walla!, all your *.so files are accessible from any where in the system.

Note that if you system has Perl and CPAN, then it would be the easiest way to install all the packages you want, just type "cpan from shell". The first time CPAN is executed it will make you some question, just answer them and at the end choose only http servers rather than ftp because the are faster.

After all the questions, just type " install cpan" -->run "install Boundle::CPAN" and it will update your cpan.

Now make sure that you can run mysql_client from any part of the system, if you can't, do this "export PATH=$PATH:PATH_TO_YOU_MYSQL_BASE_DIR/bin" and try again by running mysql or any MySQL bin file.

After every thing is up, run CPAN again, just type "o conf prerequisites_policy ask" -->run "install DB::Mysql"

I hope all of these lines help you
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
bugzilla error! DBD mysql user access denial pudhiyavan Linux - Software 1 01-16-2006 04:33 PM
perl-DBD-MySQL installation problem kartheekpn Linux - Software 3 09-23-2005 03:01 AM
Error with Perl DBD::mysql ginda Programming 3 03-04-2005 06:20 PM
DBD/mysql error dt23 Programming 3 04-22-2004 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration