Installing DBD::mysql fails in Solaris

Installing DBD::mysql fails in Solaris

am 29.12.2003 10:33:55 von Leos Tovarek

--0-1057794144-1072690435=:55011
Content-Type: text/plain; charset=us-ascii

Dear All,


Could anybody help me to install DBD::mysql in my Solaris box please ?

I have:
====================================================
# uname -a
SunOS aaa2 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Fire-280R

# perl -v
This is perl, v5.6.1 built for sun4-solaris-64int

# mysql --v
mysql Ver 12.22 Distrib 4.0.17, for sun-solaris2.9 (sparc)

# cc -V
cc: Sun C 5.5


I did:
====================================================
# cd DBD-mysql-2.9003
# perl Makefile.PL
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
libs (mysql_config) = -xarch=v9 -L/usr/local/mysql/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (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.39 installed in /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/DBI
Writing Makefile for DBD::mysql

# make
cc -c -I/usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/DBI -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -KPIC "-I/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE" dbdimp.c
cc -c -I/usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/DBI -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -KPIC "-I/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE" mysql.c
"mysql.xs", line 351: warning: implicit function declaration: is_prefix
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/lib" /usr/bin/perl myld cc -G dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/mysql/mysql.so
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql/mysql.so'
#

====================================================

I don't understand why the loader doesn't like 64b module when (AFAIK) everything was created with 64b version. Couldn't it be due to unknown "-xarch=v9" or unavailable "is_prefix" function ?

I tried to install it both myself and with "cpan", I tried also "static" version as adviced in DBD html documentation but the results were the same.. :((

Could you help please ?

Thank you so much.

Regards,

Leos.




---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--0-1057794144-1072690435=:55011--

Re: Installing DBD::mysql fails in Solaris

am 29.12.2003 12:51:13 von Jochen Wiedmann

Leos Tovarek wrote:

> LD_RUN_PATH="/lib" /usr/bin/perl myld cc -G dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
> ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64
> ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/mysql/mysql.so

You are obviously mixing 32 bit and 64 bit binaries. For example, your
MySQL may be compiled for 64 bit and Perl for 32 bit or vice versa. This
problem typically happens when using precompiled binaries, for example
from www.mysql.com.

The suggested solution is to compile everything for yourself (at least
the MySQL client libraries, see the --without-server option of configure,
the Perl interpreter, and the drivers) and with the same settings.


Jochen

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Installing DBD::mysql fails in Solaris

am 29.12.2003 12:51:13 von Jochen Wiedmann

Leos Tovarek wrote:

> LD_RUN_PATH="/lib" /usr/bin/perl myld cc -G dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
> ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64
> ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/mysql/mysql.so

You are obviously mixing 32 bit and 64 bit binaries. For example, your
MySQL may be compiled for 64 bit and Perl for 32 bit or vice versa. This
problem typically happens when using precompiled binaries, for example
from www.mysql.com.

The suggested solution is to compile everything for yourself (at least
the MySQL client libraries, see the --without-server option of configure,
the Perl interpreter, and the drivers) and with the same settings.


Jochen

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Installing DBD::mysql fails in Solaris

am 30.12.2003 10:14:27 von Leos Tovarek

--0-1120807458-1072775667=:36278
Content-Type: text/plain; charset=us-ascii

Dear Jochen,


Thank you very much for your advice. It really worked: I took mysql source, compiled it by cc using "--without-server" option and DBD:mysql installation passed through OK
as the linkage editor had no 32 and 64-bit modules mixed. ;))

Best regards,


Leos.








---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--0-1120807458-1072775667=:36278--

Re: Installing DBD::mysql fails in Solaris

am 30.12.2003 10:14:27 von Leos Tovarek

--0-1120807458-1072775667=:36278
Content-Type: text/plain; charset=us-ascii

Dear Jochen,


Thank you very much for your advice. It really worked: I took mysql source, compiled it by cc using "--without-server" option and DBD:mysql installation passed through OK
as the linkage editor had no 32 and 64-bit modules mixed. ;))

Best regards,


Leos.








---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--0-1120807458-1072775667=:36278--