fault installing DBD::mysql in solaris 9
From: gonchi (yairl_at_savion.huji.ac.il)
Date: 01/30/05
- Next message: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Previous message: kalinabears_at_iinet.net.au: "Re: Using a .SO library with Inline"
- Next in thread: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Reply: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2005 06:02:46 -0800
Hi,
For a couple of weeks I trying to install some perl modules in a new
sparc/solaris 9 server between them are DBD::mysql . The fault is well
know because I found a lot of messages in the different forums mysql
website and goolge comp.perl.lang and another less know forums belong
to sun. It's clear that the fault is something connected with linkage
stage in the test stage when perl try to load the module. I use a perl
interpreter I compiled from source with gcc, I thought it may solve the
problem in some sites people said it solved the problem. Also there are
people said that a new mysql server compiled by them solved the problem
but there were cases that this doesn't solve the problem. I successed
to install many modules in this interpreter as LWP,DBI and GD. The GD
had problems too but Lincoln Stern found an error in a compilation
flag, I think the error came from the Config.pm but people fixed it in
the Makefile.PL . In the DBD::mysql I think is same problem , some
flag passed to the linker is bad but I don't success to fix it.
I configure the make as it was recommended by the install document
pointing to the correct gcc linker, I copied the mysql include files
and libraries to /usr/local/include and /usr/local/lib to avoid
detection includes or libraries problems. I set
LD_LIBRARY_PATH=/usr/local/mysql/lib/mysql:/usr/local/lib . All the
programs and libraries are 32bit I checked it by myself using file
order.
perl Makefile.PL --libs="-L/usr/local/lib -R/usr/local/lib -R/usr/lib
-L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib
-R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib
-R/usr/local/BerkeleyDB.4.2/lib -L/usr/local/mysql/lib/mysql
-lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2 -lgcc"
My mysql library looks well, every dynamic or static library is there,
there many library dynamic versions I don't know why. I use mysql
4.0.21 binary pkg from sunfree site.
-rw-r--r-- 1 root bin 15448 Oct 31 10:08 libdbug.a
-rw-r--r-- 1 root bin 33496 Oct 31 10:09 libheap.a
-rw-r--r-- 1 root bin 13204 Oct 31 10:08 libmerge.a
-rw-r--r-- 1 root bin 286760 Oct 31 10:09 libmyisam.a
-rw-r--r-- 1 root bin 23184 Oct 31 10:09 libmyisammrg.a
-rw-r--r-- 1 root bin 328620 Oct 31 10:07 libmysqlclient.a
-rwxr-xr-x 1 root bin 1011 Oct 31 10:07 libmysqlclient.la
lrwxrwxrwx 1 root other 24 Jan 18 14:46 libmysqlclient.so
-> libmysqlclient.so.12.0.0
lrwxrwxrwx 1 root other 24 Dec 29 15:27
libmysqlclient.so.10 -> libmysqlclient.so.10.0.0
-rwxr-xr-x 1 root bin 152664 Oct 31 2002
libmysqlclient.so.10.0.0
lrwxrwxrwx 1 root other 24 Dec 29 15:27
libmysqlclient.so.12 -> libmysqlclient.so.12.0.0
-rwxr-xr-x 1 root bin 163820 Apr 9 2004
libmysqlclient.so.12.0.0
-rw-r--r-- 1 root bin 337396 Oct 31 10:07
libmysqlclient_r.a
-rwxr-xr-x 1 root bin 1055 Oct 31 10:07
libmysqlclient_r.la
-rw-r--r-- 1 root bin 121848 Oct 31 10:07 libmystrings.a
-rw-r--r-- 1 root bin 250028 Oct 31 10:08 libmysys.a
-rw-r--r-- 1 root bin 108332 Oct 31 10:08 libnisam.a
-rw-r--r-- 1 root bin 5288 Oct 31 10:09 libvio.a
Compilation looks ok, common warnings but it doesn't leave with error
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/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int/auto/DBI/
-I/usr/local/mysql/include/mysql -DDBD_MYSQL_WITH_SSL
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9004\"
-DXS_VERSION=\"2.9004\" -fPIC
"-I/usr/local/lib/perl5/5.8.6/sun4-solaris-64int/CORE" dbdimp.c
dbdimp.c: In function `mysql_db_FETCH_attrib':
dbdimp.c:1458: warning: cast from pointer to integer of different size
dbdimp.c: In function `mysql_st_FETCH_attrib':
dbdimp.c:2148: warning: cast from pointer to integer of different size
/bin/perl -p -e "s/~DRIVER~/mysql/g"
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int/auto/DBI//Driver.xst
> mysql.xsi
/bin/perl /usr/local/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.6/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line
196
Warning: duplicate function definition 'rows' detected in mysql.xs,
line 294
gcc -c
-I/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int/auto/DBI/
-I/usr/local/mysql/include/mysql -DDBD_MYSQL_WITH_SSL
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9004\"
-DXS_VERSION=\"2.9004\" -fPIC
"-I/usr/local/lib/perl5/5.8.6/sun4-solaris-64int/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/local/lib:/usr/lib" /bin/perl myld gcc -G
-L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so
-L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib
-R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib
-R/usr/local/ssl/lib -L/usr/local/mysql/lib/mysql -lmysqlclient
-lposix4 -lcrypt -lgen -lsocket -lnsl -lm
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2 -lgcc
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.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Mysql.3
Manifying blib/man3/Bundle::DBD::mysql.3
But the test fault, each test send the following message. I set the
debug flag in the perl dynaloader but I can't see any special problem
in the defined PATH to the libraries.
t/dbdadmin.........DynaLoader.pm loaded
(/fs/www/w2w7/share/DBD-mysql-2.9004/blib/lib
/fs/www/w2w7/share/DBD-mysql-2.9004/blib/arch
/usr/local/lib/perl5/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/5.8.6
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl/5.8.5
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl .
/usr/local/lib/perl5/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/5.8.6
/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris-64int
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl .,
/usr/local/lib /usr/lib /usr/ccs/lib)
DynaLoader::bootstrap for DBI (auto/DBI/DBI.so)
DynaLoader::bootstrap for DBD::mysql (auto/DBD/mysql/mysql.so)
install_driver(mysql) failed: Can't load
'/fs/www/w2w7/share/DBD-mysql-2.9004/blib/arch/auto/DBD/mysql/mysql.so'
for module DBD::mysql: ld.so.1: /usr/local/bin/perl5.8.6: fatal:
relocation error: file
/fs/www/w2w7/share/DBD-mysql-2.9004/blib/arch/auto/DBD/mysql/mysql.so:
symbol mysql_get_parameters: referenced symbol not found at
/usr/local/lib/perl5/5.8.6/sun4-solaris-64int/DynaLoader.pm line 230.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/dbdadmin.t line 74
t/dbdadmin.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-21
Failed 21/21 tests, 0.00% okay
I solved the problem installing the ActiveState perl interpreter and I
installed the DBD::mysql from his binary distribution using ppm
program. The GD module I compiled again, with the fixed compilation
flag was easy to install it in the activestate interpreter. First also
I tried to compile DBD::mysql in this distribution I found the same
problem.
Anyway I tried to understand what is wrong in the perl interpreter
compiled by me and another 2 binary packages from sunfree I used before
to install DBD::mysql I didn't find a good answer. I found that the
linker parameters in the activestate interpreter and myself interpreter
are different. I played with parameters in the Config.pm but
no way anything changed, the faults is there. I both cases installation
by compilation fail but activeperl has binary modules distribution it
really save many people, the problem is that active state has not every
perl module ready to install, in my case GD for solaris is not their
distribution .
ActivePerl linker def given by perl -V
Linker and Libraries:
ld='gcc', ldflags =' '
libpth=/usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R
/usr/local/ActivePerl-5.8/lib/5.8.6/sun4-solaris-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-G'
my perl linker def given by perl -V
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
- Next message: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Previous message: kalinabears_at_iinet.net.au: "Re: Using a .SO library with Inline"
- Next in thread: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Reply: Bill Karwin: "Re: fault installing DBD::mysql in solaris 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|