RPATHS in binaries

Andrew Haley aph at redhat.com
Mon Jul 23 09:02:01 UTC 2012


On 07/20/2012 07:27 PM, Kelly O'Hair wrote:

> The only other solution I see is for the 3rd party library to have
> an RPATH of $ORIGIN, and then toss the 3rd party library into the
> jdk's jre/lib/<arch> directory (or a softlink to it).  Or maybe into
> jre/lib/<arch>/thirdparty with an RPATH $ORIGIN/..  But that means
> modifying the jdk install area, which is sometimes not a good idea.

Indeed, and it's quite impossible in the cases that are causing us
problems because the shared library in question is distributed in a
jarfile and extracted at runtime.  Setting RPATH is the only way to
get it to work, I think.  However, I note that on Linux use of
DT_RPATH is deprecated.  DT_RUNPATH, which doesn't override the use of
LD_LIBRARY_PATH, is better.

Andrew.



More information about the build-dev mailing list