On Fri, 4 Apr 2008, Aidan Gauland wrote:

Okay, I tried writing a wrapper script that sets LD_LIBRARY_PATH to a colon
seperated list of directories, where I have put the .so files, but this
doesn't seem to work.  I tried it in an emulator without any of the libraries
it needs, and it complained about not being able to find the .so files.

Can you post the script? Or appropriate chunks of it?

What scripting language?

For *sh languages usually environment variables do not make it into
any subprocesses unless the variables has been exported.

eg.

#!/bin/bash
LD_LIBRARY_PATH=/home/gaul/lib

./myProg

probably won't work.

To see this try...

#!/bin/bash
LD_LIBRARY_PATH=/home/gaul/lib

strace -o tlog -v -s 1024 ./myProg

less tlog

Then you can see what environment variables went by.

This...
#!/bin/bash
export LD_LIBRARY_PATH=/home/gaul/lib

./myProg


or I believe this...

#!/bin/bash
LD_LIBRARY_PATH=/home/gaul/lib ./myProg

should work.


Since this is getting a little off topic now, where should I go for further
help with this?


This is about using Linux, and you're in Canterbury... so in my
personal opinion you're bang on topic and I'm happy to have a go at
helping you.

The only question is whether you'll get the best answer here!

If you don't, other excellent resources are the gcc-help mailing list
and www.linuxquestions.org




John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : [EMAIL PROTECTED]
New Zealand

Reply via email to