Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #481

rpath for library loading

From Philipp Kraus <philipp.kraus@flashpixx.de>
Newsgroups comp.os.linux.development.system
Subject rpath for library loading
Date 2012-12-17 09:53 +0100
Organization 1&1 Internet AG
Message-ID <kamm8q$rc7$1@online.de> (permalink)

Show all headers | View raw


Hello,

I hope somebody can explain me a little bit the loader process for 
shared libraries.
I have got a library "libmylib.so", this depends on some other libs. I 
have set the rpath
to "./". If I run "ldd libmylib.so" all depend libraries will be found. 
I do not need to setup
any environment variables. All *.so files are in the same directory.

If I load my "libmylib.so" in my application I get an error that the 
depend libraries are not
found. IMHO the rpath flag tells the library in which directory the 
library should be found, so
in my case rpath is "./" the library should be found relative to 
"libmylib.so" eg:

/home/my/lib/libmylib.so
/home/my/lib/libmydepend.so

ldd libmylib.so shows
    libmydepend.so => ./libmydepend.so

So on loading libmylib.so the libmydepend.so should be also loaded
Do I understand it correct?

Thanks

Phil

Back to comp.os.linux.development.system | Previous | NextNext in thread | Find similar


Thread

rpath for library loading Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-12-17 09:53 +0100
  Re: rpath for library loading Richard Kettlewell <rjk@greenend.org.uk> - 2012-12-17 10:42 +0000
    Re: rpath for library loading Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-12-17 13:36 +0100
      Re: rpath for library loading Richard Kettlewell <rjk@greenend.org.uk> - 2012-12-17 13:26 +0000
      Re: rpath for library loading Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-12-17 15:03 +0000

csiph-web