RFR: 8166189: Fix for Bug 8165524 breaks AIX build

Volker Simonis volker.simonis at gmail.com
Sat Sep 17 15:11:04 UTC 2016


Not sure if that's a good idea. You can have a custom launcher which
doesn't use libjli.so and I don't think we want to make libjvm.so
dependent on libjli.so.


On Fri, Sep 16, 2016 at 7:47 PM, Chris Bensen <chris.bensen at oracle.com> wrote:
> I assume libjvm.so has access to dlopen and dlsym? Can the AIX
> implementation of dladdr live in libjli.so and libjvm.so load it from there?
>
> Chris
>
>
> On Sep 16, 2016, at 10:34 AM, Volker Simonis <volker.simonis at gmail.com>
> wrote:
>
> Hi Christoph,
>
> I think your change is fine as a quick-fix to fix the build. But
> you're completely right that this should be reworked in the long term.
> I hate to see that we now have the third version of these routines in
> the OpenJDK. Unfortunately a clean solution is not trivial.
>
> libjli is not linked against libjvm because libjli is actually used to
> load libjvm. So we can not put the dladdr routines for AIX there. But
> I think we should at least consolidate the two versions which will be
> in the class library after your change. Initially I intentionally put
> porting_aix.{c,h} into jdk/aix/porting with the intent to make it
> available to ALL jdk native libraries.
>
> Unfortunately, with the source code reorganization due to the modular
> changes, the common, top-level aix repository had to go away and the
> code was moved to src/java.desktop/aix/native/libawt/porting_aix.c.
> With the reorganized, modularized source code layout and build system
> it is not possible to share code between modules. We somehow have to
> fix this although I currently don't know how. IF somebody has an idea,
> please let me know :)
>
> Regarding your change:
>
> - can you please move
>
> +#if defined(_AIX)
> +#include "java_md_aix.h"
> +#endif
> +
>
> from java_md_common.c to the end of
> java.base/unix/native/libjli/java_md.h. It will then be automatically
> included into java_md_common.c trough java.h which includes java_md.h
>
> Also, this version of dladdr is inherently not thread safe. I don't
> think that's a problem here, but it would be nice if you could quickly
> check if that's indeed true.
>
> Besides that, looks good.
>
> Thanks for fixing,
> Volker
>
>
>
>
> On Fri, Sep 16, 2016 at 11:58 AM, Langer, Christoph
> <christoph.langer at sap.com> wrote:
>
> Hi,
>
> the fix for https://bugs.openjdk.java.net/browse/JDK-8165524 breaks the AIX
> build as function dladdr is not available on AIX.
>
> There already exist ports of that API in hotspot and awt. With the proposed
> change I duplicate the awt port to libjli. This is maybe only a quick fix -
> eventually we should think about consolidating and using the hotspot port in
> all places by exporting it from libjvm.so for AIX.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8166189
> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8166189.0/
>
> Thanks
> Christoph
>
>
> -----Original Message-----
> From: core-libs-dev [mailto:core-libs-dev-bounces at openjdk.java.net] On
> Behalf
> Of Kumar Srinivasan
> Sent: Montag, 12. September 2016 22:57
> To: core-libs-dev <core-libs-dev at openjdk.java.net>; Mandy Chung
> <mandy.chung at oracle.com>; Chris Bensen <chris.bensen at oracle.com>
> Subject: RFR: 8165524: Better detect JRE that Linux JLI will be using
>
> Hello,
>
> I am sponsoring this changeset for Chris Bensen of the java packager
> team, please review  fix for the launcher to  better locate java.home.
>
> http://cr.openjdk.java.net/~ksrini/8165524/
>
> Thanks
> Kumar
>
>
>


More information about the core-libs-dev mailing list