Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't load Oarcle.so

12 views
Skip to first unread message

Daniel Teklu

unread,
May 12, 2005, 11:02:42 AM5/12/05
to dbi-...@perl.org
We installed DBI , DBD::Oarcle and 9.2 Oracle client. And this is run , we get this error.

./oracletest.pl

install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: /export/home/oracle/product/9.2.0/lib/libclntsh.so.9.0: wrong ELF class: ELFCLASS64 at /usr/local/lib/perl5/5.8.6/sun4-solaris/DynaLoader.pm line 230.

at (eval 1) line 3

Compilation failed in require at (eval 1) line 3.

Any ideas?

Thanks in advance


Ron Reidy

unread,
May 12, 2005, 11:26:09 AM5/12/05
to Daniel Teklu, dbi-...@perl.org
Daniel,

1. Is your Oracle environment set (ORACLE_HOME, ORACLE_SID, etc.)?
2. Are the permissions correct for the .so files?
3. Are these files physically located in the directories referenced in the message?

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

./oracletest.pl

Any ideas?

Thanks in advance


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Tim

unread,
May 12, 2005, 12:35:58 PM5/12/05
to Daniel Teklu, dbi-...@perl.org
On Thu, May 12, 2005 at 11:02:42AM -0400, Daniel Teklu wrote:
> We installed DBI , DBD::Oarcle and 9.2 Oracle client. And this is run , we get this error.
>
> install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: /export/home/oracle/product/9.2.0/lib/libclntsh.so.9.0: wrong ELF class: ELFCLASS64 at /usr/local/lib/perl5/5.8.6/sun4-solaris/DynaLoader.pm line 230.

Try googling for

"wrong ELF class: ELFCLASS64" DBD::Oracle

Tim.

David

unread,
May 12, 2005, 11:11:54 AM5/12/05
to dbi-...@perl.org
On Thu, May 12, 2005 at 11:02:42AM -0400, Daniel Teklu wrote:
> We installed DBI , DBD::Oarcle and 9.2 Oracle client. And this is run , we get this error.
>
> ./oracletest.pl
>
> install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.8.6/sun4-solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: /export/home/oracle/product/9.2.0/lib/libclntsh.so.9.0: wrong ELF class: ELFCLASS64 at /usr/local/lib/perl5/5.8.6/sun4-solaris/DynaLoader.pm line 230.

Looks like your are trying to link a 32-bit library/perl executable
against a 64-bit library. Try to change your LD_LIBRARY_PATH variable
to include /export/home/oracle/product/9.2.0/lib32 (or something like
that) rather than /export/home/oracle/product/9.2.0/lib. If your
installation does not include 32-bit libraries, you may need to install
them.

dd
--
David Dooling

Matthew Ramadanovic

unread,
May 12, 2005, 2:06:15 PM5/12/05
to Daniel Teklu, dbi-...@perl.org

My guess is that you probably need to set some environmental variables. I
was running into this problem with a stored proc and got around it by having
my perl script call another after setting the variables :

$ENV{ORACLE_HOME} = '/export/home/oracle/9.x'; #or whatever
$ENV{ORACLE_SID} = 'yoursid'; #or whatever
$ENV{LD_LIBRARY_PATH} = 'your LD Lib path'; #or whatever
$ENV{ORACLE_BASE} = '/export/home/oracle'; #or whatever your base is
$ENV{TNS_ADMIN} = '/export/home/'; #or whatever your real value is

$result = `somenewscriptwithdbi.pl`;

-Matt

> -----Original Message-----
> From: Daniel Teklu [mailto:DTe...@alm.com]
> Sent: Thursday, May 12, 2005 11:03 AM
> To: dbi-...@perl.org
> Subject: Can't load Oarcle.so
>

> We installed DBI , DBD::Oarcle and 9.2 Oracle client. And this is run , we
> get this error.
>
> ./oracletest.pl
>
> install_driver(Oracle) failed: Can't load
> '/usr/local/lib/perl5/site_perl/5.8.6/sun4-
> solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1:
> /usr/local/bin/perl: fatal:
> /export/home/oracle/product/9.2.0/lib/libclntsh.so.9.0: wrong ELF class:
> ELFCLASS64 at /usr/local/lib/perl5/5.8.6/sun4-solaris/DynaLoader.pm line
> 230.
>

Mark Buffington

unread,
Jun 7, 2005, 11:21:18 AM6/7/05
to dbi-...@perl.org
(Note: My environment- Solaris8, Perl-5.8.3 64bit, DBI-1.48 and Oracle 9.2.0 64bit)

I had a similar problem when building DBD-Oracle-1.16 . Finally solved the problem with
the following flag on the Makefile configure step, "perl Makefile.PL -r=build64" It
seemed to have become confused on how to figure out if it should make as 32 or 64.
Same make on DBD-Oracle-1.15 didn't require the 'build64' flag. I'm *not* a 'make'
guru, just found this by banging my head. :)

Don't know if this is the same problem or not. Hope this helps someone.

-- Mark B.
-- ma...@gsu.edu

My Original errors were:

...
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/apps/sysora/9.2.0/lib:/apps/sysora/9.2.0/rdbms/lib"
/opt/SUNWspro/bin/cc -G -xarch=v9 -L/usr/lib/sparcv9 -L/usr/ccs/lib/sparcv9
-L/opt/SUNWspro/WS6U1/lib/v9 -L/usr/local/lib Oracle.o dbdimp.o oci8.o cc
-Xa -xstrconst -xF -xarch=v8 -xchip=ultra -W2,-AKNR_S -W2,-Rglobal_hoist
-Wc,-Qdelay-speculate -Wc,-Qdepgraph-safe_spec_load=3 -W2,-Rloop -errtags=yes
-v -K PIC -L/opt/SUNWcluster/lib -R/opt/SUNWcluster/lib
-L/apps/sysora/9.2.0/rdbms/lib32/ -L/apps/sysora/9.2.0/lib32/
-lclntsh `cat /apps/sysora/9.2.0/lib32/ldflags`
`cat /apps/sysora/9.2.0/lib32/sysliblist` -R/apps/sysora/9.2.0/lib32 -laio
-lposix4 -lkstat -lm -lthread -o blib/arch/auto/DBD/Oracle/Oracle.so
ld: fatal: file Oracle.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
gmake: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
{myunixsystemname} #

0 new messages