Unix Technical Forum

dlopen behaviour on HP-UX

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). ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 06:21 PM
satya
 
Posts: n/a
Default dlopen behaviour on HP-UX

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 06:21 PM
Mike Stroyan
 
Posts: n/a
Default Re: dlopen behaviour on HP-UX

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com