1

Okay, so I was trying to install a combination of the CGI module, DBI module, and DBD::Oracle driver using CPANM on a 64bit Solaris 11 machine with an Oracle11g database.

I installed that latest version of Perl using Perlbrew, updated CPANM, and then did the following...

cpanm -v -f -i CGI
cpanm -v -f -i DBI

And both of those modules installed fine, the DBI did have a small test error (t/zvxnp_85gofer.t) when I tried to install it normally, but the force install seemed to work.

So then I went to try to install the final part that I needed:

cpanm -v -f -i DBD::Oracle

And this was the error that came out towards the end of the installation...

Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/rdbms/lib" gcc  -G -L/usr/gnu/lib -fstack-protector Oracle.o  dbdimp.o  oci8.o  -o blib/arch/auto/DBD/Oracle/Oracle.so     \
   -L/opt/oracle/rdbms/lib/ -lclntsh -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -R/opt/oracle/rdbms/lib -laio -lposix4 -lkstat -lm -lpthread   \

ld: fatal: file /opt/oracle/rdbms/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
FAIL
! Installing DBD::Oracle failed. See /home/oracle/.cpanm/build.log for details.

I'm guessing just from the wrong ELF class: ELFCLASS64 it has to do with some mismatch between the 64 bit binaries that exist and that this driver requires the 32 bit binaries to install? Some research has indicated that I need to find the lib32 directory to continue the installation, but I can't seem to find it.

I did:

echo $ORACLE_HOME ---> /opt/oracle/rdbms
ls $ORACLE_HOME

That returned the following directories...

apex              emcli             mgw               rdbms
assistants        has               network           relnotes
bin               hs                nls               root.sh
ccr               ide               oc4j              scheduler
cdata             install           odbc              slax
cfgtoollogs       install.platform  olap              sqldeveloper
clone             instantclient     ons               sqlj
config            inventory         OPatch            sqlplus
crs               j2ee              opmn              srvm
csmig             javavm            oracore           sysman
css               jdbc              oraInst.loc       timingframework
ctx               jdev              ord               ucp
cv                jdk               oui               uix
dbs               jlib              owb               utl
dc_ocm            ldap              owm               wwg
deinstall         lib64             perl              xdk
demo              log               plsql
diagnostics       md                precomp
dv                mesg              racg

So I see a lib64, but no lib or lib32. Has anyone ever had this problem before, found a solution to it, or know how I could continue from here?

This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81

2 Answers2

2

please take a look at 1271236.1 and 883702.1 at oracle.com. It will explain how to get the 32bit libraries for 11i client installation.

MichaelN
  • 1,734
  • 11
  • 6
  • @MichaelIN Maybe this is a silly question, but how would I go about finding those? I just did a quick google search as well as did a search on the oracle.com homepage and could not find any results. – This 0ne Pr0grammer Jun 08 '12 at 18:11
  • 1
    they're on oracle.com site. basically the gist of of the docs are that the client software as of 11i comes separated and installing the 64bit server installs doesn't provide the 32bit libraries. you will need to install the 32bit client http://download.oracle.com/otn/solaris/oracle11g/R2/solaris.sparc64_11gR2_client32.zip to get the 32bit libraries. – MichaelN Jun 08 '12 at 18:25
  • Ah okay. Thank you very much for that. Will look into it now. – This 0ne Pr0grammer Jun 08 '12 at 18:34
2

I had the same issue. Fixed it by doing ./Configure -es -Dprefix=$HOME/usr/local -Dcc=gcc -Duse64bitall -Dusethreads for perl install

j0k
  • 22,600
  • 28
  • 79
  • 90
Anup A
  • 36
  • 1