MySQL Forums
Forum List  »  Perl

DBD:mysql install problem
Posted by: Chris Millington
Date: November 15, 2007 01:37PM

I have an issue installing DBD:mysql and i cant figure out how to fix it, i have searched the forums and googled for hours. I think i know the problem but feel free to correct me.

OS Solaris 9 64 bit on SPARC
perl 5.8.8 method pkgadd from sunfreeware
myqsl 5.0.45 method pkgadd from here "Solaris 9 (SPARC, 64-bit)"
data:showtable method perl etc
libiconv perl
gcc perl
DBI pel
All the above install OK and run

The final peice of my puzzle was to install
DBD::mysql perl

I get an error with the (full output below)
Unrecognized argument in LIBS ignored: '-xarch=v9'

I get another error when i run make (full output below)
gcc: language arch=v9 not recognized

My reading has led me to believe that this is because mysql is compiled with the sun compiler and DBD::mysql is using gcc.

First of all am i right in my assumptions.
What is the best way to rectify this situation?
I don't fancy my chances of compiling source with gcc and getting it right
Any help appreciated

root@smoke# mysql_config --cflags
-I/opt/mysql/mysql/include -mt -D_FORTEC_ -xarch=v9

root@smoke# mysql_config --libs
-xarch=v9 -L/opt/mysql/mysql/lib -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -lnsl -lm

Below is full out put of DBD:mysql
perl -V
********************************FULL OUTPUT**************************************
root@smoke# perl Makefile.PL
I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/opt/mysql/mysql/include -mt -D_FORTEC_ -xarch=v9
embedded (mysql_config) =
libs (mysql_config) = -xarch=v9 -L/opt/mysql/mysql/lib -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -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'.

Unrecognized argument in LIBS ignored: '-xarch=v9'
Using DBI 1.601 (for perl 5.008008 on sun4-solaris) installed in /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI/
Writing Makefile for DBD::mysql

root@smoke# make
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI -I/opt/mysql/mysql/include -mt -D_FORTEC_ -xarch=v9 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"4.005\" -DXS_VERSION=\"4.005\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE" dbdimp.c
gcc: language arch=v9 not recognized
gcc: dbdimp.c: linker input file unused because linking not done
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI -I/opt/mysql/mysql/include -mt -D_FORTEC_ -xarch=v9 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"4.005\" -DXS_VERSION=\"4.005\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE" mysql.c
gcc: language arch=v9 not recognized
gcc: mysql.c: linker input file unused because linking not done
Running Mkbootstrap for DBD::mysql ()
chmod 644
rm -f blib/arch/auto/DBD/mysql/
LD_RUN_PATH="/opt/mysql/mysql/lib:/usr/lib" /usr/local/bin/perl myld gcc -G -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/ \
-L/opt/mysql/mysql/lib -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -lnsl -lm \

gcc: dbdimp.o: No such file or directory
gcc: mysql.o: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql/'

root@smoke# perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
osname=solaris, osvers=2.9, archname=sun4-solaris
uname='sunos 5.9 generic sun4u sparc sunw,ultra-5_10 solaris '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
cc='gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
ccversion='', gccversion='3.4.6', gccosandvers='solaris2.9'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Characteristics of this binary (from libperl):
Built under solaris
Compiled at May 8 2007 03:46:29

Options: ReplyQuote

Written By
DBD:mysql install problem
November 15, 2007 01:37PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.