C
Christian Eriksson
Hi!
I have a problem using the environment variable LD_LIBRARY_PATH in my
perl script. Everything works fine when I set it at the command prompt
and then runs my perl script like this:
presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql
presto1@S0222035> ldd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix.so
libifsql.so => /SSW/informix/sdk2.50/lib/esql/libifsql.so
libifasf.so => /SSW/informix/sdk2.50/lib/libifasf.so
libifgen.so => /SSW/informix/sdk2.50/lib/esql/libifgen.so
libifos.so => /SSW/informix/sdk2.50/lib/esql/libifos.so
libifgls.so => /SSW/informix/sdk2.50/lib/esql/libifgls.so
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => /SSW/informix/sdk2.50/lib/esql/libifglx.so
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUS/lib/libc_psr.so.1
and running
presto1@S0222035> ./ins_rutin.pl presto db-ladd-lan06
presto1@S0222035> echo $?
0
executes without error messages and carries out the expected
operations against the database.
On the other hand, when I have a LD_LIBRARY_PATH like
presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools
and instead adds a row setting LD_LIBRARY_PATH in the perl script
$ENV{"LD_LIBRARY_PATH"}="/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql";
invoking the script gives this
presto1@S0222035> ./ins_rutin.pl presto db-ladd-lan06
install_driver(Informix) failed: Can't load
'/usr/perl5/5.6.1/site_perl/sun4-sol
aris/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1:
/usr/bin/
perl: fatal: libifsql.so: open failed: No such file or directory at
/usr/perl5/5
..6.1/sun4-solaris/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where
expected
at ./ins_rutin.pl line 35
Why does this happen?
Some info:
presto1@S0222035> perl -v
This is perl, v5.6.1 built for sun4-solaris
presto1@S0222035> uname -a
SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
/Christian Eriksson
I have a problem using the environment variable LD_LIBRARY_PATH in my
perl script. Everything works fine when I set it at the command prompt
and then runs my perl script like this:
presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql
presto1@S0222035> ldd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix.so
libifsql.so => /SSW/informix/sdk2.50/lib/esql/libifsql.so
libifasf.so => /SSW/informix/sdk2.50/lib/libifasf.so
libifgen.so => /SSW/informix/sdk2.50/lib/esql/libifgen.so
libifos.so => /SSW/informix/sdk2.50/lib/esql/libifos.so
libifgls.so => /SSW/informix/sdk2.50/lib/esql/libifgls.so
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => /SSW/informix/sdk2.50/lib/esql/libifglx.so
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUS/lib/libc_psr.so.1
and running
presto1@S0222035> ./ins_rutin.pl presto db-ladd-lan06
presto1@S0222035> echo $?
0
executes without error messages and carries out the expected
operations against the database.
On the other hand, when I have a LD_LIBRARY_PATH like
presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools
and instead adds a row setting LD_LIBRARY_PATH in the perl script
$ENV{"LD_LIBRARY_PATH"}="/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql";
invoking the script gives this
presto1@S0222035> ./ins_rutin.pl presto db-ladd-lan06
install_driver(Informix) failed: Can't load
'/usr/perl5/5.6.1/site_perl/sun4-sol
aris/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1:
/usr/bin/
perl: fatal: libifsql.so: open failed: No such file or directory at
/usr/perl5/5
..6.1/sun4-solaris/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where
expected
at ./ins_rutin.pl line 35
Why does this happen?
Some info:
presto1@S0222035> perl -v
This is perl, v5.6.1 built for sun4-solaris
presto1@S0222035> uname -a
SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
/Christian Eriksson