First off, my apologies if this is a well discussed issue. I've had a hard time finding archives and I researched what I could.
I'm using:
Red Hat 9 (Shrike)
Perl 5.8.0 (from the RedHat install)
Oracle 9.0.1 (installed onto RedHat 8, but just kept as we migrated up to RedHat 9).
DBI installed just fine and passed all tests.
DBD has been giving me a serious headache. The errors that show up look like:
Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load '/usr/lib/perl5/5.8.0/DBD-Oracle-1.14/blib/arch/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: /oracle/product/9.0.1/lib/libclntsh.so.9.0: undefined symbol: __cmpdi2 at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
I've researched this pretty thoroughly and it looks like this is no new error to the DBD. It seems that this is a pretty common error, as a matter of fact. I have set LD_LIBRARY_PATH, added $ORACLE_BIN to the path. I've seen suggestions to include "-lgcc" but this no longer seems to be the way to go, as I can't find this library anywhere on my system. I've tried both "shared" and "shared-libgcc" in the linker and the latter only things to make things worse (I can't get libclntsh to compile at all with that option as there are all kinds of unresolved externals).
I have a sneaking suspicion that my problem lies in installation of Oracle in an older version of Red Hat. For what it is worth, Oracle runs fine all by itself (local and networked access).
HELP!!!!
TIA,
William Fishburne
Tim.
Thanks,
William Fishburne
P.S.--Right now, I'm looking at loading Oracle 8 on another box, attempting to compile and then moving the binaries...
So, any volunteers to write up a README.linux (in the style of the
other README.<platform>) that I can include in the distribution to
reduce the pain of those who follow the same path?
Tim.
On Tue, May 20, 2003 at 09:22:30AM -0400, William Fishburne wrote:
> FIXED!
>
> Many thanks to Stephen Clouse who pointed me in the right general
> direction. This error (undefined symbol: __cmpdi2) comes up when Oracle
> isn't properly linked to the libgcc.a library. In version 8, this was
> correctd by changing the SYSLIBS entry in $ORACLE_HOME/bin/genclntsh to
> include "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2 -lgcc". I had tried this
> with no success as when this program was then run, the error "unable to
> find libgcc" was generated. Of course, this was the library I was trying
> to describe!
>
> It turns out that now it is necessary to edit the same file and append
> "`gcc -print-libgcc-file-name`" (including the backquotes!). If you do
> this and then run "genclntsh", the libclntsh is properly generated and the
> linkage with DBD::Oracle proceeds properly. All my tests succeeded, so I'm
> back in business.
>
> Thanks for the quick action, WHAT A GREAT LIST!
>
> William Fishburne