[PATCH] Update RPATH to make loading libjawt possible (was: Re: RPATHS in binaries)

Omair Majid omajid at redhat.com
Wed Aug 8 23:08:10 UTC 2012


Hi Kumar,

On 07/23/2012 11:19 AM, Kumar Srinivasan wrote:
> My suggestion is to see if System.loadLibrary can be used, this will 
> bode well for the modularization effort.

I discussed this with the folks at awt-dev and they would prefer to
avoid loading as much as possible. They are strongly against always
preloading libjawt.so.

> If this *must*  be added to RPATH in which case, append this last to
> ensure we don't break  anything.

Yes, the awt folks have asked me to use this approach. The attached
patch updates the RPATH in the launchers to add the arch dir to RPATH.

A couple of questions:

1. I am not sure if this problem exists on windows or on other operating
systems and what sort of fixes are appropriate there. How do I deal with
this?

2. This patch uses RPATH (and not RUNPATH). This makes it impossible to
use LD_LIBRARY_PATH to override the linker path. I don't see any
potential dangerous effects (pretty much all libraries in the have an
RPATH), and I suspect it's even intentional (so JDK6 can exec JDK7 with
an LD_LIBRARY_PATH set and things will continue working). Does OpenJDK
support platforms with RUNPATH (-Wl,--enable-new-dtags) ?

3. I cant seem to get http://hg.openjdk.java.net/jdk8/build to build. It
seems to be missing a number of fixes needed to build with newer
versions of gcc and glibc. The patch applies to both jdk8/build and
jdk7u/jdk7u-dev. I have only build with 7.

Thanks,
Omair


More information about the build-dev mailing list