LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to install DBD::mysql via cpan (https://www.linuxquestions.org/questions/linux-software-2/unable-to-install-dbd-mysql-via-cpan-917811/)

aroekene 12-08-2011 07:16 PM

Unable to install DBD::mysql via cpan
 
Hi.
I'm unable to install DBD::mysql after updating to MySQL 5.5.18
Works fine if i "downgrade" to MySQL 5.0.77

System:
CentOS 5.5 x86_64
Perl:
perl.i386 4:5.8.8-32.el5_6.3
perl.x86_64 4:5.8.8-32.el5_6.3
perl-DBD-MySQL.x86_64 3.0007-2.el5
perl-DBI.x86_64 1.52-2.el5
perl-String-CRC32.x86_64 1.4-2.fc6
perl-URI.noarch 1.35-3

MySQL
mysql.x86_64 5.5.18-1.el5.remi
mysql-devel.x86_64 5.5.18-1.el5.remi
mysql-libs.x86_64 5.5.18-1.el5.remi
mysql-server.x86_64 5.5.18-1.el5.remi
mysqlclient15.x86_64 5.0.67-1.el5.remi

Code:

[root@localhost root]# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan>  install DBD::mysql
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Thu, 08 Dec 2011 17:28:22 GMT
Running install for module DBD::mysql
Running make for C/CA/CAPTTOFU/DBD-mysql-4.020.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for /root/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.020.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Deleting from cache: /root/.cpan/build/DateTime-TimeZone-1.42-6bZO4y.yml (11.7>10.0 MB)
Deleting from cache: /root/.cpan/build/Math-Round-0.06-4tVLIM (11.7>10.0 MB)
Deleting from cache: /root/.cpan/build/DateTime-0.70-by6WN0 (11.6>10.0 MB)
Deleting from cache: /root/.cpan/build/Math-Round-0.06-4tVLIM.yml (10.3>10.0 MB)
Deleting from cache: /root/.cpan/build/DateTime-0.70-by6WN0.yml (10.3>10.0 MB)
Deleting from cache: /root/.cpan/build/AppConfig-1.66-JQnk7J (10.3>10.0 MB)
DBD-mysql-4.020/
DBD-mysql-4.020/ChangeLog
DBD-mysql-4.020/constants.h
DBD-mysql-4.020/dbdimp.c
DBD-mysql-4.020/dbdimp.h
DBD-mysql-4.020/eg/
DBD-mysql-4.020/eg/bug14979.pl
DBD-mysql-4.020/eg/bug21028.pl
DBD-mysql-4.020/eg/bug30033.pl
DBD-mysql-4.020/eg/bug30033pg.pl
DBD-mysql-4.020/eg/decimal_test.pl
DBD-mysql-4.020/eg/issue21946.pl
DBD-mysql-4.020/eg/prepare_memory_usage.pl
DBD-mysql-4.020/eg/proc_example1.pl
DBD-mysql-4.020/eg/proc_example2.pl
DBD-mysql-4.020/eg/proc_example2a.pl
DBD-mysql-4.020/eg/proc_example2b.pl
DBD-mysql-4.020/eg/proc_example3.pl
DBD-mysql-4.020/eg/proc_example4.pl
DBD-mysql-4.020/INSTALL.html
DBD-mysql-4.020/lib/
DBD-mysql-4.020/lib/Bundle/
DBD-mysql-4.020/lib/Bundle/DBD/
DBD-mysql-4.020/lib/Bundle/DBD/mysql.pm
DBD-mysql-4.020/lib/DBD/
DBD-mysql-4.020/lib/DBD/mysql/
DBD-mysql-4.020/lib/DBD/mysql/GetInfo.pm
DBD-mysql-4.020/lib/DBD/mysql/INSTALL.pod
DBD-mysql-4.020/lib/DBD/mysql.pm
DBD-mysql-4.020/Makefile.PL
DBD-mysql-4.020/Makefile.PL.embedded
DBD-mysql-4.020/MANIFEST
DBD-mysql-4.020/MANIFEST.SKIP
DBD-mysql-4.020/META.yml
DBD-mysql-4.020/myld
DBD-mysql-4.020/mysql.xs
DBD-mysql-4.020/README
DBD-mysql-4.020/t/
DBD-mysql-4.020/t/00base.t
DBD-mysql-4.020/t/10connect.t
DBD-mysql-4.020/t/20createdrop.t
DBD-mysql-4.020/t/25lockunlock.t
DBD-mysql-4.020/t/29warnings.t
DBD-mysql-4.020/t/30insertfetch.t
DBD-mysql-4.020/t/31insertid.t
DBD-mysql-4.020/t/32insert_error.t
DBD-mysql-4.020/t/35limit.t
DBD-mysql-4.020/t/35prepare.t
DBD-mysql-4.020/t/40bindparam.t
DBD-mysql-4.020/t/40bindparam2.t
DBD-mysql-4.020/t/40blobs.t
DBD-mysql-4.020/t/40catalog.t
DBD-mysql-4.020/t/40keyinfo.t
DBD-mysql-4.020/t/40listfields.t
DBD-mysql-4.020/t/40nulls.t
DBD-mysql-4.020/t/40nulls_prepare.t
DBD-mysql-4.020/t/40numrows.t
DBD-mysql-4.020/t/40server_prepare.t
DBD-mysql-4.020/t/40server_prepare_error.t
DBD-mysql-4.020/t/40types.t
DBD-mysql-4.020/t/41bindparam.t
DBD-mysql-4.020/t/41blobs_prepare.t
DBD-mysql-4.020/t/42bindparam.t
DBD-mysql-4.020/t/50chopblanks.t
DBD-mysql-4.020/t/50commit.t
DBD-mysql-4.020/t/51bind_type_guessing.t
DBD-mysql-4.020/t/52comment.t
DBD-mysql-4.020/t/53comment.t
DBD-mysql-4.020/t/55utf8.t
DBD-mysql-4.020/t/60leaks.t
DBD-mysql-4.020/t/65types.t
DBD-mysql-4.020/t/70takeimp.t
DBD-mysql-4.020/t/71impdata.t
DBD-mysql-4.020/t/75supported_sql.t
DBD-mysql-4.020/t/76multi_statement.t
DBD-mysql-4.020/t/80procs.t
DBD-mysql-4.020/t/85init_command.t
DBD-mysql-4.020/t/86_bug_36972.t
DBD-mysql-4.020/t/lib.pl
DBD-mysql-4.020/t/mem_leak.pl
DBD-mysql-4.020/t/mysql.dbtest
DBD-mysql-4.020/t/mysql.mtest
DBD-mysql-4.020/TODO
Removing previously used /root/.cpan/build/DBD-mysql-4.020

  CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.020.tar.gz



PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC  -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
  embedded      (mysql_config) =
  libs          (mysql_config) = -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl
  mysql_config  (guessed    ) = mysql_config
  nocatchstderr (default    ) = 0
  nofoundrows  (default    ) = 0
  ssl          (guessed    ) = 1
  testdb        (default    ) = test
  testhost      (default    ) =
  testpassword  (default    ) =
  testsocket    (default    ) =
  testuser      (guessed    ) = root

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

Checking if your kit is complete...
Looks good
Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/
Writing Makefile for DBD::mysql
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc -c  -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC  -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -DVERSION=\"4.020\" -DXS_VERSION=\"4.020\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  dbdimp.c
dbdimp.c: In function ‘alloc_param’:
dbdimp.c:223: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘alloc_bind’:
dbdimp.c:241: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘alloc_fbind’:
dbdimp.c:257: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘alloc_fbuffer’:
dbdimp.c:272: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘dbd_discon_all’:
dbdimp.c:2193: warning: unused variable ‘imp_xxh’
dbdimp.c: In function ‘mysql_st_prepare’:
dbdimp.c:2614: warning: unused variable ‘limit_flag’
dbdimp.c: In function ‘mysql_st_fetch’:
dbdimp.c:3830: warning: ISO C90 forbids mixed declarations and code
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 242
Warning: duplicate function definition 'rows' detected in mysql.xs, line 751
gcc -c  -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC  -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -DVERSION=\"4.020\" -DXS_VERSION=\"4.020\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  mysql.c
mysql.xs: In function ‘XS_DBD__mysql__db__ListDBs’:
mysql.xs:221: warning: ISO C90 forbids mixed declarations and code
mysql.xs: In function ‘XS_DBD__mysql__db_do’:
mysql.xs:365: warning: comparison is always false due to limited range of data type
mysql.xs:366: warning: comparison is always false due to limited range of data type
mysql.xs:260: warning: unused variable ‘statement_ptr’
mysql.xs: In function ‘XS_DBD__mysql__db_quote’:
mysql.xs:612: warning: ISO C90 forbids mixed declarations and code
mysql.xs: In function ‘XS_DBD__mysql__st_more_results’:
mysql.xs:689: warning: implicit declaration of function ‘mysql_st_next_results’
mysql.xs:688: warning: unused variable ‘retval’
mysql.xs: In function ‘XS_DBD__mysql__GetInfo_dbd_mysql_get_info’:
mysql.xs:899: warning: implicit declaration of function ‘is_prefix’
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
/usr/bin/perl myld gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so  \
          -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl          \
         
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3pm
Manifying blib/man3/DBD::mysql::INSTALL.3pm
Manifying blib/man3/Bundle::DBD::mysql.3pm
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base....................NOK 2                                           
#  Failed test 'use DBD::mysql;'
#  in t/00base.t at line 21.
#    Tried to use 'DBD::mysql'.
#    Error:  Can't load '/root/.cpan/build/DBD-mysql-4.020/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: /root/.cpan/build/DBD-mysql-4.020/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: is_prefix at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
#  at (eval 6) line 2
# Compilation failed in require at (eval 6) line 2.
# BEGIN failed--compilation aborted at t/00base.t line 21.
FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 9
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

Any ideas will be appreciated.

j-ray 12-09-2011 02:01 AM

You can probably install with the force flag? Did the script ask for a password?

aroekene 12-09-2011 10:18 AM

The problem is that it is embedded in the Bugzilla checkconfig script (4.1.3)
The script does not ask for a password.


All times are GMT -5. The time now is 03:03 AM.