-rpath and ldconfig

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

-rpath and ldconfig

Roger Oberholtzer
I have an application that runs on a diskless openSUSE. It gets rebooted
often. The application uses libraries that are in a directory that is
mounted via NFS. The mount works and all libs are present.

The application is linked with -rpath /opt/rsoft/lib to tell where to
look for DSOs. For some reason, some of the libraries in /opt/rsoft/lib
will not be found until ldconfig is run. Why? I have checked that the
binary contains the directory:

$ objdump -x checkstream |grep RPATH
  RPATH                /opt/rsoft/lib

The library that is not found is referenced by another library that is
linked to the app. These are libraries from intel (intel Performance
Primitives), so I do not control how they themselves are built.

Could it be that RPATH applies to the binary and the libraries it has
references to, but does not apply to libraries loaded by these
libraries?

Or have I missed something?

This is on openSUSE 11.2.

Yours sincerely,

Roger Oberholtzer

Ramböll RST / Systems

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696
[hidden email]
________________________________________

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden
www.rambollrst.se


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: -rpath and ldconfig

Philipp Thomas-3
Am 24.05.2013 13:25, schrieb Roger Oberholtzer:

> The application is linked with -rpath /opt/rsoft/lib to tell where to
> look for DSOs. For some reason, some of the libraries in /opt/rsoft/lib
> will not be found until ldconfig is run. Why?
[...]
> The library that is not found is referenced by another library that is
> linked to the app. These are libraries from intel (intel Performance
> Primitives), so I do not control how they themselves are built.

See  'info (ld.info.gz)Options' for information on what -rpath does. To
me it looks like a bug. Your best bet would be to ask on
[hidden email], the second best bet asking on opensuse-programming.
BTW, have you checked the Intel libraries for what rpath they might
contain? BTW2, there is a utility called chrpath that lets you
manipulate the rpath in a binary, though a new rpath can only be as long
as the original. chrpath is mostly used for removing any rpath from
binaries built for packages without having to mess with Makefiles and such.

hth
Philipp


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]