Hello,
I got a problem with multiple oracle client installations on a machine. We run an
application which currently needs to
run with the Oracle 8.1.5 client libraries. Our Perl 5.6.1 DBD::Oracle was built
against 8.1.6 libraries and I know that
it fails using the 8.1.5 libraries.
My problem currently is that we have to start a perl script being forked from an
application which has LD_LIBRARY_PATH set
to use the 8.1.5 libraries. I wanted to modify the LD_LIBRARY_PATH variable in my perl
script in the BEGIN block but it
does not work. I don't understand why it still looks for the 8.1.5 libraries. And
breaks!
This is the flag from
/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/mk.pm how it was
built:
-L/opt/ivas/oracle/product/8.1.6/lib/
I recall reading in the DBI mailing list about being able to modify the
LD_LIBRARY_PATH in the BEGIN block. Is this no
longer valid?
Thanks for any kind of help,
.kai
PS: The current workaround is wrapping this perl script in a shell script, which gives
some additional overhead but
works. I would like to understand why the plain perl version does not work for me...
PPS: Here is some additional information
> echo $LD_LIBRARY_PATH
/opt/ivas/oracle/product/8.1.5/lib:/usr/openwin/lib
> /opt/ivas/noctools/bin/perl -MDBI -e 'print $DBI::VERSION'
1.21
> /opt/ivas/noctools/bin/perl -MDBD::Oracle -e 'print $DBD::Oracle::VERSION'
1.12
> cat test.pl
#!/opt/ivas/noctools/bin/perl -w
BEGIN {
$ENV{'ORACLE_HOME'} = "/opt/ivas/oracle/product/8.1.6";
$ENV{'LD_LIBRARY_PATH'} = $ENV{'ORACLE_HOME'} . "/lib";
}
use DBI;
use DBD::Oracle;
> ./test.pl
Can't load
'/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/Oracle.so' for
module DBD::Oracle: ld.so.1: /opt/ivas/noctools/bin/perl: fatal: relocation error:
file /opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/Oracle.so:
symbol KI_DES8Strong: referenced symbol not found at
/opt/ivas/perl.5.6.1/lib/5.6.1/sun4-solaris/DynaLoader.pm line 206.
at ./test.pl line 9
Compilation failed in require at ./test.pl line 9.
BEGIN failed--compilation aborted at ./test.pl line 9
> truss -e -t open test.pl 2> /tmp/truss.out
> cat /tmp/truss.out
execve("test.pl", 0xFFBEFA24, 0xFFBEFA34) argc = 3
...
LD_LIBRARY_PATH=/opt/ivas/oracle/product/8.1.5/lib:/usr/openwin/lib
VERSION=8.1.5
MACHTYPE=sparc-sun-solaris
ORACLE_HOME=/opt/ivas/oracle/product/8.1.5 LOGNAME=ivas
OSTYPE=solaris
...
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.5/lib/libsocket.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libsocket.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libsocket.so.1", O_RDONLY) = 3
open("/opt/ivas/oracle/product/8.1.5/lib/libnsl.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libnsl.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libnsl.so.1", O_RDONLY) = 3
open("/opt/ivas/oracle/product/8.1.5/lib/libdl.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libdl.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
open("/opt/ivas/oracle/product/8.1.5/lib/libm.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libm.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libm.so.1", O_RDONLY) = 3
open("/opt/ivas/oracle/product/8.1.5/lib/libc.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libc.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 3
open("/opt/ivas/oracle/product/8.1.5/lib/libmp.so.2", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libmp.so.2", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libmp.so.2", O_RDONLY) = 3
open("/usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1", O_RDONLY) = 3
open64("test.pl", O_RDONLY) = 3
....
open64("/opt/ivas/perl.5.6.1/lib/5.6.1/DBI.pm", O_RDONLY) Err#2 ENOENT
open64("/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBI.pm", O_RDONLY) = 4
....
open("/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/DBI/DBI.so",
O_RDONLY) = 5
....
open64("/opt/ivas/perl.5.6.1/lib/5.6.1/sun4-solaris/DBD/Oracle.pm", O_RDONLY) Err#2
ENOENT
open64("/opt/ivas/perl.5.6.1/lib/5.6.1/DBD/Oracle.pm", O_RDONLY) Err#2 ENOENT
open64("/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBD/Oracle.pm",
O_RDONLY) = 4
open("/opt/ivas/perl.5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/Oracle.so",
O_RDONLY) = 4
[ It should have looked for the 8.1.6 version here...]
open("/opt/ivas/oracle/product/8.1.5/lib/libclntsh.so.8.0", O_RDONLY) = 4
[ This will not work due to conflicting versions, would have worked with the first so
being 8.1.6]
open("/opt/ivas/oracle/product/8.1.5/lib/libwtc8.so", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libwtc8.so", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libwtc8.so", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/libgen.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libgen.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libgen.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libgen.so.1", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/libsched.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libsched.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libsched.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libsched.so.1", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/libaio.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libaio.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libaio.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libaio.so.1", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/librt.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/librt.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/librt.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/librt.so.1", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/libkstat.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libkstat.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libkstat.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libkstat.so.1", O_RDONLY) = 4
open("/opt/ivas/oracle/product/8.1.5/lib/libthread.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/openwin/lib/libthread.so.1", O_RDONLY) Err#2 ENOENT
open("/opt/ivas/oracle/product/8.1.6/lib/libthread.so.1", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libthread.so.1", O_RDONLY) = 4
open64("/opt/ivas/perl.5.6.1/lib/5.6.1/sun4-solaris/Carp/Heavy.pm", O_RDONLY) Err#2
ENOENT
open64("/opt/ivas/perl.5.6.1/lib/5.6.1/Carp/Heavy.pm", O_RDONLY) = 4
--
Kai Jendrian (mailto:[EMAIL PROTECTED]) - http://www.jendrian.de