This is a discussion on dlopen behaviour on HP-UX within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi, I have two libs lib1.sl and lib2.sl and lib2.sl depends on lib1.sl (verifed from ldd ouput on lib2.sl). ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have two libs lib1.sl and lib2.sl and lib2.sl depends on lib1.sl (verifed from ldd ouput on lib2.sl). and say the libraries are in /satya directory So the libraries are /satya/lib1.sl /satya/lib2.sl On Solaris, dlopen(/satya/lib1.sl) followed by dlopen(/satya/lib2.sl) succeeds since lib1.sl is already loaded.This succeeds on linux also. But the same thing fails on HP saying that it cannot find lib1.sl I dont want to depend on SHLIB_PATH setting or making similar links in /usr/lib. Also I dont want to give RPATH setting to the executable during linking as I cannot hardcode run-path to /satya. One more finding is, runpath setting to executable didn't help me. I have to specify run-path setting to the library(lib2.sl) itself. Thanks for any help. Satya |
| ||||
| satya <nandu_patchava@yahoo.co.in> wrote: |Hi, |I have two libs lib1.sl and lib2.sl and lib2.sl depends on lib1.sl |(verifed from ldd ouput on lib2.sl). |and say the libraries are in /satya directory |So the libraries are |/satya/lib1.sl |/satya/lib2.sl |On Solaris, dlopen(/satya/lib1.sl) followed by dlopen(/satya/lib2.sl) succeeds |since lib1.sl is already loaded.This succeeds on linux also. |But the same thing fails on HP saying that it cannot find lib1.sl |I dont want to depend on SHLIB_PATH setting or making similar links in /usr/lib. |Also I dont want to give RPATH setting to the executable during linking |as I cannot hardcode run-path to /satya. |One more finding is, runpath setting to executable didn't help me. |I have to specify run-path setting to the library(lib2.sl) itself. If you are going to dlopen the path to lib1.sl yourself, why don't you just drop the link dependency from lib2.sl to lib1.sl? That explicit dependency seems both pointless and troublesome. -- Mike Stroyan, mike.stroyan@hp.com |