Installing perl DBD::mysql

  • Follow


Greetings

I am having a problem installing the perl modules for DBI and DBD via
CPAN. The make is failing thus:

/opt/SUNWspro/bin/cc -c
-I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI/
-I/usr/local/mysql/include -xO3 -mt -D_FORTEC_ -xarch=v9
-DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"3.0002\"
-DXS_VERSION=\"3.0002\" -KPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE"   mysql.c
"mysql.xs", line 631: 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="/usr/lib" /usr/local/bin/perl myld /opt/SUNWspro/bin/cc
-G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -L/usr/local/lib
dbdimp.o  mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so
-L/usr/local/mysql/lib -lmysqlclient -lz -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'
  /usr/ccs/bin/make  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Bundle summary: The following items in bundle Bundle::DBD::mysql had
installation problems:
  Mysql DBD::mysql

Can anyone at least identify this as a Solaris problem and not some
other package? It is trying to load libraries from mysql, which I
installed as a 64bit Solaris binary from the mysql website. (I'll try a
cross-post to the mysql forum.)

Thanks

Mike

0
Reply michael.muratet (5) 11/15/2005 4:57:40 PM

muratet sez:
> Greetings
>
> I am having a problem installing the perl modules for DBI and DBD via
> CPAN.

What kind of Solaris is that? The general rule for installing
CPAN modules that need .so glue is "first compile and install
perl".

This may've changed in Solaris 10, I haven't had time to play
with it yet.

> ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64

You're trying to link 64-bit dbdimp.o with something that is
32-bit. Recompile with appropriate -xarch.

Dima
-- 
"Mirrors and copulation are abominable because they increase the number of
entities."                                        -- corollary to Occam's Razor
0
Reply Dimitri 11/15/2005 5:26:54 PM


muratet <michael.muratet@operon.com> wrote:
> LD_RUN_PATH="/usr/lib" /usr/local/bin/perl myld /opt/SUNWspro/bin/cc
> -G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -L/usr/local/lib
> dbdimp.o  mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so
> -L/usr/local/mysql/lib -lmysqlclient -lz -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

Looks like the linker is failing because it was trying to combine both
32bit and 64bit objects together.  

Only one or the other can be combined.  If the installation is all 32,
then your new compiles must be also.  Ditto for 64.  

> Can anyone at least identify this as a Solaris problem and not some
> other package? It is trying to load libraries from mysql, which I
> installed as a 64bit Solaris binary from the mysql website. (I'll try a
> cross-post to the mysql forum.)

You can't combine a 64bit library with a 32bit library in the same
executable. 

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >
0
Reply Darren 11/15/2005 5:46:48 PM

2 Replies
446 Views

(page loaded in 0.043 seconds)

Similiar Articles:













7/23/2012 4:22:22 PM


Reply: