Problem installing DBD::mysql

Discussion in 'Perl Misc' started by Jørn Dahl-Stamnes, Dec 21, 2007.

  1. Hello folks,

    I'm trying to install the DBD::mysql, but it failes. It have done this
    before but after my system disk crashed I had to reinstall Fedora Core 4
    (yes, I know it is a bit old).

    I do a 'cpan -i DBD::mysql'. It claim that my AMD 64-bit prosessor does not
    support x86-64 instruction set... which I find a bit odd.

    What can be wrong?

    Checking if your kit is complete...
    Looks good
    Using DBI 1.48 (for perl 5.008006 on x86_64-linux-thread-multi) installed
    in /usr/lib64/perl5/vendor_perl/5.8.6/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/Mysql.pm blib/lib/Mysql.pm
    cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
    cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    gcc -c
    -I/usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi/auto/DBI/
    -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32
    -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE
    -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
    -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT
    -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include
    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe
    -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona
    -DVERSION=\"2.9008\" -DXS_VERSION=\"2.9008\" -fPIC
    "-I/usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE" dbdimp.c
    dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
    make: *** [dbdimp.o] Error 1
    /usr/bin/make -- NOT OK
    Running make test
    Can't test without successful make
    Running make install
    make had returned bad status, install seems impossible

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #1
    1. Advertising

  2. Jørn Dahl-Stamnes wrote:

    > Hello folks,
    >
    > I'm trying to install the DBD::mysql, but it failes. It have done this
    > before but after my system disk crashed I had to reinstall Fedora Core 4
    > (yes, I know it is a bit old).
    >
    > I do a 'cpan -i DBD::mysql'. It claim that my AMD 64-bit prosessor does
    > not support x86-64 instruction set... which I find a bit odd.
    >
    > What can be wrong?


    BTW, the complete output of the cpan command is found at:

    http://www.dahl-stamnes.net/dahls/perl_dbd.html

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #2
    1. Advertising

  3. Christian Winter wrote:
    > Jørn Dahl-Stamnes schrieb:
    >> Checking if your kit is complete...
    >> Looks good
    >> Using DBI 1.48 (for perl 5.008006 on x86_64-linux-thread-multi) installed
    >> in /usr/lib64/perl5/vendor_perl/5.8.6/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/Mysql.pm blib/lib/Mysql.pm
    >> cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    >> cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
    >> cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    >> gcc -c
    >> -I/usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi/auto/DBI/
    >> -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32

    >
    > The "-m32" above and the "-march=i386" following that one point to the
    > culprit. It looks as if the mysql libraries gcc tries to link against
    > are 32bit, with the offending arguments steming from the output of the
    > "mysql_config" script.
    >
    >> -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE
    >> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
    >> -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT
    >> -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include
    >> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g
    >> -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona
    >> -DVERSION=\"2.9008\" -DXS_VERSION=\"2.9008\" -fPIC
    >> "-I/usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE" dbdimp.c
    >> dbdimp.c:1: error: CPU you selected does not support x86-64 instruction
    >> set

    >
    > So the error message is quite precise. I'm not familiar enough with
    > fedora, but basically you need to make sure that you have 64bit libs
    > installed and a mysql_config that returns the correct values for the
    > 64bit libraries. Then you should at least be able to do a manual install
    > of DBD::mysql with
    > perl Makefile.PL mysql_config=/path/to/correct/mysql_config


    After doing this, I checked the Makefile and found the line:

    LIBC = /lib/libc-2.3.4.so

    But there is no such file on my system. The one I got is /lib/libc-2.3.5.so
    I tried to change this, but no changes - same error when doing 'make'.

    I'm not sure which libraries that are missing/wrong.

    Thanks for your reply, even if it does not help me (at the moment).

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #3
  4. Christian Winter wrote:
    > So your system is likely mixed up a bit with libraries/tools that
    > have been linked against different glibc versions. It might be possible
    > to update/recompile everything linked against 2.3.4, though that's
    > often a PITA with older distributions and packages that have a lot of
    > interdepencenies. The LIBC setting above should stem from the perl
    > binary itself ('perl -V | grep libc' should confirm that). So most
    > probably you need a newer Perl rpm or compile it again to link against
    > your current environment.


    [root@jedi DBD-mysql-4.005]# perl -V | grep libc
    libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.5'

    I also tried to upgrade perl by using yum, but that does not work very well
    (see below). Perhaps I need to install perl from source?

    [root@jedi ~]# yum upgrade perl-*
    Setting up Upgrade Process
    Setting up repositories
    Reading repository metadata in from local files
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for perl-DBD-MySQL to pack into transaction set.
    perl-DBD-MySQL-2.9007-1.x 100% |=========================| 7.4 kB 00:00
    ---> Package perl-DBD-MySQL.x86_64 0:2.9007-1 set to be updated
    --> Running transaction check
    --> Processing Dependency: libmysqlclient.so.14()(64bit) for package:
    perl-DBD-MySQL
    --> Restarting Dependency Resolution with new changes.
    --> Populating transaction set with selected packages. Please wait.
    ---> Downloading header for mysql to pack into transaction set.
    http://download.fedoraproject.org/p...tes/4/x86_64/mysql-4.1.20-1.FC4.1.x86_64.rpm:
    [Errno 4] IOError: HTTP Error 502: Date: Fri, 21 Dec 2007 13:14:04 GMT
    Content-Length: 490
    Content-Type: text/html; charset=iso-8859-1
    Trying other mirror.
    mysql-4.1.20-1.FC4.1.x86_ 100% |=========================| 39 kB 00:00
    ---> Package mysql.x86_64 0:4.1.20-1.FC4.1 set to be updated
    --> Running transaction check

    Dependencies Resolved

    =============================================================================
    Package Arch Version Repository Size
    =============================================================================
    Updating:
    perl-DBD-MySQL x86_64 2.9007-1 base 139 k
    Installing for dependencies:
    mysql x86_64 4.1.20-1.FC4.1 updates-released 2.9 M

    Transaction Summary
    =============================================================================
    Install 1 Package(s)
    Update 1 Package(s)
    Remove 0 Package(s)
    Total download size: 3.0 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/2): mysql-4.1.20-1.FC4 100% |=========================| 2.9 MB 00:06
    (2/2): perl-DBD-MySQL-2.9 100% |=========================| 139 kB 00:00
    Running Transaction Test
    Finished Transaction Test


    Transaction Check Error: file /usr/share/info/mysql.info.gz from install
    of mysql-4.1.20-1.FC4.1 conflicts with file from package mysql-4.1.11-2
    file /usr/share/man/man1/mysql.1.gz from install of mysql-4.1.20-1.FC4.1
    conflicts with file from package mysql-4.1.11-2
    file /usr/share/man/man1/mysqlaccess.1.gz from install of
    mysql-4.1.20-1.FC4.1 conflicts with file from package mysql-4.1.11-2
    Jørn Dahl-Stamnes, Dec 21, 2007
    #4
  5. On Fri, 21 Dec 2007 14:17:05 +0100, Jørn Dahl-Stamnes wrote:

    > I also tried to upgrade perl by using yum, but that does not work very
    > well (see below). Perhaps I need to install perl from source?


    No, you need to straighten out your install. You have a non-FC install of
    mysql that conflicts with the FC package. Uninstall mysql* and reinstall.

    HTH,
    M4
    Martijn Lievaart, Dec 21, 2007
    #5
  6. Martijn Lievaart wrote:

    > On Fri, 21 Dec 2007 14:17:05 +0100, Jørn Dahl-Stamnes wrote:
    >
    >> I also tried to upgrade perl by using yum, but that does not work very
    >> well (see below). Perhaps I need to install perl from source?

    >
    > No, you need to straighten out your install. You have a non-FC install of
    > mysql that conflicts with the FC package. Uninstall mysql* and reinstall.


    Hmm.. where does that one come from? I have installed FC from scratch (from
    CDs) and then tried to install the perl modules. I have not done anything
    else to install mysql.

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #6
  7. On Fri, 21 Dec 2007 16:01:53 +0100, Christian Winter wrote:

    > Martijn Lievaart schrieb:
    >> On Fri, 21 Dec 2007 14:17:05 +0100, Jørn Dahl-Stamnes wrote:
    >>
    >>> I also tried to upgrade perl by using yum, but that does not work very
    >>> well (see below). Perhaps I need to install perl from source?

    >>
    >> No, you need to straighten out your install. You have a non-FC install
    >> of mysql that conflicts with the FC package. Uninstall mysql* and
    >> reinstall.

    >
    > That won't solve the original problem, that Perl is linked against a
    > glibc version that isn't available any longer, therefore breaking the
    > mechanism ExtUtils::MakeMaker uses to determine linker paramters.


    It might solve it, as that allows to upgrade to the latest Perl. As
    suggested by you.

    M4
    Martijn Lievaart, Dec 21, 2007
    #7
  8. On Fri, 21 Dec 2007 16:13:39 +0100, Jørn Dahl-Stamnes wrote:

    > Martijn Lievaart wrote:
    >
    >> On Fri, 21 Dec 2007 14:17:05 +0100, Jørn Dahl-Stamnes wrote:
    >>
    >>> I also tried to upgrade perl by using yum, but that does not work very
    >>> well (see below). Perhaps I need to install perl from source?

    >>
    >> No, you need to straighten out your install. You have a non-FC install
    >> of mysql that conflicts with the FC package. Uninstall mysql* and
    >> reinstall.

    >
    > Hmm.. where does that one come from? I have installed FC from scratch
    > (from CDs) and then tried to install the perl modules. I have not done
    > anything else to install mysql.


    Hmmm, 4.1.11-2 is indeed the original FC4 version. This seems to be a
    repository bug in FC4. You can still uninstall mysql and reinstall, that
    way you avoid this issue and are more up to date.

    FC4 is old, though. You may want to upgrade. I use CentOS myself, and I
    like it a lot better than Fedora in terms of stability. Otherwise, try
    FC8.

    This is getting very OT, but I suggest you first get your machine up to
    date, and then retry. I use both Fedora and CentOS and have no issues
    with the perl, mysql or DBI::mysql packages.

    HTH,
    M4
    Martijn Lievaart, Dec 21, 2007
    #8
  9. Martijn Lievaart wrote:

    > On Fri, 21 Dec 2007 16:01:53 +0100, Christian Winter wrote:
    >> That won't solve the original problem, that Perl is linked against a
    >> glibc version that isn't available any longer, therefore breaking the
    >> mechanism ExtUtils::MakeMaker uses to determine linker paramters.

    >
    > It might solve it, as that allows to upgrade to the latest Perl. As
    > suggested by you.


    I tried to install/update ExtUtils::MakeMaker, but that did not solve the
    problem.

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #9
  10. Martijn Lievaart wrote:
    > Hmmm, 4.1.11-2 is indeed the original FC4 version. This seems to be a
    > repository bug in FC4. You can still uninstall mysql and reinstall, that
    > way you avoid this issue and are more up to date.


    I'll try that later.

    > FC4 is old, though. You may want to upgrade. I use CentOS myself, and I
    > like it a lot better than Fedora in terms of stability. Otherwise, try
    > FC8.


    I know. But I reinstalled it to get up the server up and running as fast as
    possible after a disk crash (well, non of the disk crashed but it seems
    that the logical volume information was corrupt and I was not able to boot
    the system. But I was able to recover all filesystems by booting the
    recovery CD and then copied all configuration to other disks).

    > This is getting very OT, but I suggest you first get your machine up to
    > date, and then retry. I use both Fedora and CentOS and have no issues
    > with the perl, mysql or DBI::mysql packages.


    I plan to upgrade from FC 4 to 5 and then to 6 and maybe up to 7. I'm not
    sure if I can just go directly to 7 (have not looked into this yet).

    --
    Jørn Dahl-Stamnes
    http://www.dahl-stamnes.net/dahls/
    Jørn Dahl-Stamnes, Dec 21, 2007
    #10
  11. Jørn Dahl-Stamnes

    Guest

    On Dec 21 2007, 3:21 pm, Jørn Dahl-Stamnes <newsmanDEL...@REMOVEdahl-
    stamnes.net> wrote:
    > Hello folks,
    >
    > I'm trying to install the DBD::mysql, but it failes. It have done this
    > before but after my system disk crashed I had to reinstall Fedora Core 4
    > (yes, I know it is a bit old).
    >
    > I do a 'cpan -i DBD::mysql'. It claim that my AMD 64-bit prosessor does not
    > support x86-64 instruction set... which I find a bit odd.
    >
    > What can be wrong?
    >
    > Checking if your kit is complete...
    > Looks good
    > Using DBI 1.48 (for perl 5.008006 on x86_64-linux-thread-multi) installed
    > in /usr/lib64/perl5/vendor_perl/5.8.6/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/Mysql.pm blib/lib/Mysql.pm
    > cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    > cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
    > cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    > gcc -c
    > -I/usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi/auto/DBI/
    > -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32
    > -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE
    > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
    > -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT
    > -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include
    > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe
    > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona  
    > -DVERSION=\"2.9008\" -DXS_VERSION=\"2.9008\" -fPIC
    > "-I/usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE"   dbdimp.c
    > dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
    > make: *** [dbdimp.o] Error 1
    >   /usr/bin/make  -- NOT OK
    > Running make test
    >   Can't test without successful make
    > Running make install
    >   make had returned bad status, install seems impossible
    >
    > --
    > Jørn Dahl-Stamneshttp://www.dahl-stamnes.net/dahls/


    I have the same problem "dbdimp.c:1: error: CPU you selected does not
    support x86-64 instruction set". and i fix on my system cause my OS
    based X86_64 but install i386 mysql and perl DBD,so please try
    download 64bit mysql and perl-DBD,may help.(i am from
    china:)
    , Jan 11, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Solomon

    DBD::mysqlPP v DBD::mysql

    Mike Solomon, Feb 16, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    214
    James Willmore
    Feb 16, 2004
  2. Hal Vaughan
    Replies:
    2
    Views:
    129
    Hal Vaughan
    Aug 27, 2004
  3. Hal Vaughan

    Problem installing DBD::MySQL 2.9004

    Hal Vaughan, Aug 29, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    222
    Hal Vaughan
    Aug 29, 2004
  4. Jim Cochrane
    Replies:
    0
    Views:
    115
    Jim Cochrane
    Aug 25, 2007
  5. mmccaws2

    problem installing DBD/mysql.pm

    mmccaws2, Nov 7, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    338
    Ben Morrow
    Nov 7, 2007
Loading...

Share This Page