M
Moritz Karbach
Hi experts,
I'd like to run a program out of a perl script. The program needs a special
library path, which I'd very much like to set inside the perl script. Here
is what I tried:
--- perl script ---
#!/usr/bin/perl -w
$ENV{'LD_LIBRARY_PATH'} .= ":" . `pwd`;
exec 'ldd', 'fplist';
--- output ---
....
libreadline.so.4 => /lib/libreadline.so.4 (0x40a9a000)
....
That is, the fplist program still uses the system library instead of using
the one in the working directory. It works, if I do it completely on the
shell:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
$ ldd fplist
....
libreadline.so.4 =>
/afs/desy.de/user/m/mkarbach/h1/grid/h1mcjobwrapper/libreadline.so.4
(0x40a9a000)
....
Can anybody tell me, what the problem is?
Thanks,
- Moritz
I'd like to run a program out of a perl script. The program needs a special
library path, which I'd very much like to set inside the perl script. Here
is what I tried:
--- perl script ---
#!/usr/bin/perl -w
$ENV{'LD_LIBRARY_PATH'} .= ":" . `pwd`;
exec 'ldd', 'fplist';
--- output ---
....
libreadline.so.4 => /lib/libreadline.so.4 (0x40a9a000)
....
That is, the fplist program still uses the system library instead of using
the one in the working directory. It works, if I do it completely on the
shell:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
$ ldd fplist
....
libreadline.so.4 =>
/afs/desy.de/user/m/mkarbach/h1/grid/h1mcjobwrapper/libreadline.so.4
(0x40a9a000)
....
Can anybody tell me, what the problem is?
Thanks,
- Moritz