RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v8]

Suchismith Roy sroy at openjdk.org
Thu Apr 4 10:00:01 UTC 2024


On Thu, 4 Apr 2024 09:41:50 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

> > Hello @suchismith1993,
> > > Usually there is not such pure .a files that comes packaged with the OS. They are provided by some applications. So i am not sure how i can make the tests consistent for such cases.
> > > Do you have any suggestions here ?
> > 
> > 
> > Within the JDK repo, some tests require test specific native libraries (like in your case here). It appears that the JDK build infrastructure has ability to compile native code (`foo.c` for example) into a native library. However that build infrastructure doesn't appear to be flexible enough to support the case where you would have to run AIX specific commands to generate a `.a` file. So the approach of generating a test specific `.a` file doesn't look promising right now (it could still be possible, but I don't know how big a build change that would require).
> > So taking a step back - I see that https://bugs.openjdk.org/browse/JDK-8313616 introduced the ability to dealing with `.a` files on AIX from within the hotspot area. In that commit https://github.com/openjdk/jdk/pull/15204/files I see that there are references to a couple of `.a` files - for example `libodm.a` and `libperfstat.a`. Are those `.a` expected to be present on certain AIX systems? Perhaps your new test could use either of those in the test? There was also a mention of `libclang.a` on AIX, previously in this discussion. Maybe that could be used in the test?
> 
> I found libperfstat as the only example that is purely an archive files as part of AIX, after trying out multiple archives under /usr/lib. I am facing an issue to run the test ,but unable to set the library path to /usr/lib. I see the existing test case has libawt as part of jdk itself . Can i set -Djava.library.path while running jtreg test case ?

-Djava.library.path=/home/hotspot/openjdk/jdk-suchi/jdk1/build/aix-ppc64-server-fastdebug/images/test/jdk/jtreg/native  
I see from logs, this is the path being set to, Which is not the intended path. Not sure how the other test is working.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2036730865


More information about the core-libs-dev mailing list