RFR: 8166189: Fix for Bug 8165524 breaks AIX build

Kumar Srinivasan kumar.x.srinivasan at oracle.com
Wed Sep 21 13:38:05 UTC 2016

On 9/16/2016 10:34 AM, Volker Simonis 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 :)

Why doesn't AIX support a Standard C API that most other
*nix based OS'es support ?



> 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