[PATCH] Update RPATH to make loading libjawt possible
Kumar Srinivasan
kumar.x.srinivasan at oracle.COM
Thu Aug 9 12:39:55 UTC 2012
Hello Omair,
> 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?e
No on window the %PATH% variable is used to load all dynamic libraries.
>
> 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) ?
Yes if jdk6 is used to exec jdk7+, the launcher will set the
LD_LIBRARY_PATH to
protects itself from jdk6's LLP, and exec itself.
Please see
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/d8dfd1a0bd8d
I don't know what --enable-new-dtags is and what it does.
>
> 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.
jdk8 will need to be built and tested with your changes!. I will try to
apply your patch and
submit it to our build system, when I get a spare cycle.
Thanks
Kumar
>
> Thanks,
> Omair
More information about the build-dev
mailing list