Fixing the dreaded "wrong ELF class: ELFCLASS64" error with DBD::Oracle on Solaris
- From: "planetjeff" <planetjeff@xxxxxxxxxxxxx>
- Date: 8 Dec 2006 13:58:02 -0800
(Solaris 9, Perl 5.8.5, DBD::Oracle 1.19, Oracle 10g)
Anybody else experience this problem? If so, this may work for you!
I was able to download, build and install the DBD::Oracle module, as
long as my LD_LIBRARY_PATH specifically called out the lib32 library.
However, whenever a user needed to use the module, even if they had
their environment setup correctly, they got this error:
install_driver(Oracle) failed: Can't load
'/lba_system/usr/local/perl5.8.5/lib/site_perl/5.8.5/sun4-solaris/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: ld.so.1: perl5.8.5: fatal:
/lba_ora1/app/oracle/10g_102/lib/libclntsh.so.10.1: wrong ELF class:
ELFCLASS64 at
/lba_system/usr/local/perl5.8.5/lib/5.8.5/sun4-solaris/DynaLoader.pm
line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./INT_build_changes.p line 25
The problem stems from having a 32-bit version of Perl, and Oracle
using 64-bit libraries in the .../lib path. I googled for the
solution, getting undesirable recommendations such as rebuilding Perl,
manually changing the Oracle directory names, etc.
Finally, I hit upon a nifty fix: pass the Oracle 32-bit build rules to
the module! Here's how (requires manual build rather than default CPAN
make):
perl Makefile.PL -m
/lba_ora1/app/oracle/10g_102/rdbms/demo/demo_rdbms32.mk
That's it! No need to even modify the Makefile.PL. Check the output
of the command, you'll see the LDFLAGS are now setup correctly. Then
just do the normal make, test, install. To use, you still must have
the .../lib32 directory in your LD_LIBRARY_PATH, but at least it works
now.
Just giving back to the community...
jeff
.
- Prev by Date: Re: Perl lib version not match executable version
- Next by Date: Re: Connecting to more than one Oracle database
- Previous by thread: Perl lib version not match executable version
- Next by thread: DBD::Oracle 1.19 failing to make
- Index(es):
Relevant Pages
|