JDK-8170635 -- adding a base library to java

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu May 23 16:21:10 UTC 2024


On 2024-05-16 11:34, Suchismith Roy wrote:

> Hi Magnus
> Could you provide an existing PR/implementation I can refer from ?
>
There is no such previous all-encompassing library to just "copy". In 
fact, the core problem here is that we are even missing such a place to 
put common code.

This is not a suitable beginner's bug in the JDK. Solving this is as 
much about politics and policy as about a technical implementation.

/Magnus

> Thanks
> Suchismith Roy
>
> *From: *build-dev <build-dev-retn at openjdk.org> on behalf of Suchismith 
> Roy <Suchismith.Roy at ibm.com>
> *Date: *Wednesday, 8 May 2024 at 11:47 PM
> *To: *Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>, Thomas Stüfe 
> <thomas.stuefe at gmail.com>
> *Cc: *build-dev at openjdk.org <build-dev at openjdk.org>
> *Subject: *[EXTERNAL] RE: JDK-8170635 -- adding a base library to java
>
> Thanks for the reply @Magnus Ihse Bursie Is there any example of PRs 
> which create such libraries that I can refer to ? Is OSAL similar to 
> how os. cpp is defined and respective platforms implement them ? From: 
> Magnus Ihse Bursie <magnus. ihse. bursie@ oracle. com>
>
> ZjQcmQRYFpfptBannerStart
>
> *This Message Is From an External Sender *
>
> This message came from outside your organization.
>
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/AdhS1Rd-!-_FV_jY-Xk9bWls5LkTAMRolu--mVCfFT62NUiAr6uTAaHK_Uj80ADQPMZF5hepJJDlyrLYM6RePibMU4Y6qqCHB_FyMAOMT1-6w51TnhKgk5P1piB28UTKawX9Nsf0fQPvOcpq_0c90XA$>
>
> Report Suspicious<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/AdhS1Rd-!-_FV_jY-Xk9bWls5LkTAMRolu--mVCfFT62NUiAr6uTAaHK_Uj80ADQPMZF5hepJJDlyrLYM6RePibMU4Y6qqCHB_FyMAOMT1-6w51TnhKgk5P1piB28UTKawX9Nsf0fQPvOcpq_0c90XA$>
>
> ZjQcmQRYFpfptBannerEnd
>
> Thanks for the reply @Magnus Ihse Bursie 
> <mailto:magnus.ihse.bursie at oracle.com>
> Is there any example of PRs which create such libraries that I can 
> refer to ?
> Is OSAL similar to how os.cpp is defined and respective platforms 
> implement them ?
>
> *From: *Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
> *Date: *Tuesday, 7 May 2024 at 6:18 PM
> *To: *Thomas Stüfe <thomas.stuefe at gmail.com>, Suchismith Roy 
> <Suchismith.Roy at ibm.com>
> *Cc: *build-dev at openjdk.org <build-dev at openjdk.org>
> *Subject: *[EXTERNAL] Re: JDK-8170635 -- adding a base library to java
>
> On 2024-05-06 16:36, Thomas Stüfe wrote:
>
> > Not sure if you meant to address this mail to a specific person. I
> > assume with proposal you mean this:
> > 
> https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html ?
> >
> > If yes, my proposal was to move dladdr out of the OpenJDK code base
> > into an independent library that would be maintained by IBM,
> > hopefully, and would be a prerequisite for building the JDK.
> > If no, whose proposal did you mean?
>
> Oh, this is an old bug you're picking up Suchismith!
>
> I read through the discussion from 2016. It seems that the suggestion to
> make an external 3rd party library was only supported by Thomas, and
> that the general agreement among the other participants was that we
> should have a general, base-level "OSAL" (OS abstraction library) in the
> JDK, that could be used by both Hotspot and libjli, as well as other JDK
> libraries.
>
> Creating such a library would be a much larger effort than just adding a
> AIX implementation of dladdr to it, if it existed. The current structure
> of the JDK does not readily lend itself to such a library, neither in
> terms of source code layout nor build system.
>
> With that said, I do think it would be good if we had such a library.
> There are more cases than the AIX dladdr issue that is duplicated, like
> jio_snprintf() and friends. This has actually caused some headaches when
> doing static builds, since duplication of these functions are not
> allowed when creating a single linked instance. (The current duplication
> in dynamic libraries is just ugly and bad programming, not a compilation
> error.)
>
> But it is a much larger question than just fixing an AIX issue.
>
> /Magnus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20240523/9c5fa070/attachment-0001.htm>


More information about the build-dev mailing list