I want to run a binary from inside a ksh script

  • Follow


Hi All,

I am trying to run a C++ binary (solaris 8.0 64bit) inside a ksh
script:
Here's the content of the script:
#!/usr/bin/ksh
set LD_LIBRARY_PATH<some_path>:$LD_LIBRARY_PATH;

InventoryXmlReport <some_params>;
################End of script


I am trying to set the LD_LIBRARY_PATH param before running the binary
(InventoryXmlReport).  but it doesn't work :-(.  The error message I
get is:

InventoryXmlReport.sh -t I -s 2004
ld.so.1: /home/sameerd/dev/cal/bin/InventoryXmlReport: fatal:
libsystem.so: open failed: No such file or directory
But the libsystem.so library is in the LD_LIBRARY_PATH.

Thanks in advance for your help.

Sil
0
Reply thelinuxguy1997 7/16/2004 1:48:45 AM

silviu wrote:
> Hi All,
> 
> I am trying to run a C++ binary (solaris 8.0 64bit) inside a ksh
> script:
> Here's the content of the script:
> #!/usr/bin/ksh
> set LD_LIBRARY_PATH<some_path>:$LD_LIBRARY_PATH;
> 
> InventoryXmlReport <some_params>;
> ################End of script
> 
> 
> I am trying to set the LD_LIBRARY_PATH param before running the binary
> (InventoryXmlReport).  but it doesn't work :-(.  The error message I
> get is:
> 
> InventoryXmlReport.sh -t I -s 2004
> ld.so.1: /home/sameerd/dev/cal/bin/InventoryXmlReport: fatal:
> libsystem.so: open failed: No such file or directory
> But the libsystem.so library is in the LD_LIBRARY_PATH.
> 
> Thanks in advance for your help.


export LD_LIBRARY_PATH=...


use export instead of set.

to debug, use env(1) inside the script before running your program:

env | grep LD_LIBRARY_PATH

you'll see that your program does not set the environment variable
properly.

-- 
Lev Walkin
vlm@lionet.info
0
Reply Lev 7/16/2004 1:54:40 AM


1 Replies
453 Views

(page loaded in 0.001 seconds)

Similiar Articles:













7/23/2012 11:42:50 AM


Reply: