Integrated: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object

2024-04-17 Thread Suchismith Roy
On Wed, 21 Feb 2024 11:32:41 GMT, Suchismith Roy wrote: > Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) This pull request has now been integrated.

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-17 Thread Suchismith Roy
On Mon, 15 Apr 2024 13:58:38 GMT, Jaikiran Pai wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Files copy > > I'll let Mandy and others familiar with this area and AIX do the f

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v29]

2024-04-17 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-17 Thread Suchismith Roy
On Wed, 17 Apr 2024 10:42:46 GMT, Martin Doerr wrote: > Please take a look at Mandy's suggestions. I think they make sense. Done. Sorry i missed it. I got notified that the patch had got approved so i went ahead with integrate. - PR Comment:

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v28]

2024-04-17 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with two additional commits since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:06:54 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Files copy > > test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFro

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v13]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:05:24 GMT, Martin Doerr wrote: >> src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 40: >> >>> 38: * This method returns false so that loading of shared library >>> continues if >>> 39: * libname.so is not present. >>> 40: */ >> >>

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with three additional commits since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v26]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:48:54 GMT, Magnus Ihse Bursie wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Files copy > > src/java.base/aix/classes/jdk/internal/loader/ClassLoade

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 13:36:17 GMT, Jaikiran Pai wrote: > The test seems to be working fine then based on the output you noted. It > catches the issue (by failing) when the source change proposed in this PR is > absent and then verifies the change works as expected (by passing). Yes. Passes

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 13:00:57 GMT, Jaikiran Pai wrote: > > Thanks. I tried with a different shared object. > > If you undo the changes that are being proposed in this PR in the > `src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java` class > (only undo that class changes), then

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v24]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 08:30:57 GMT, Suchismith Roy wrote: >>> > Thanks! This looks like a good idea. Only the directory handling needs >>> > some modification. This version tries to load >>> > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrar

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v23]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Thu, 11 Apr 2024 18:29:36 GMT, Suchismith Roy wrote: > > > Thanks! This looks like a good idea. Only the directory handling needs > > > some modification. This version tries to load > > > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/scr

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-11 Thread Suchismith Roy
On Thu, 11 Apr 2024 17:08:49 GMT, Suchismith Roy wrote: > > Thanks! This looks like a good idea. Only the directory handling needs some > > modification. This version tries to load > > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/scratch/0/na

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-11 Thread Suchismith Roy
On Wed, 10 Apr 2024 16:46:30 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-11 Thread Suchismith Roy
On Wed, 10 Apr 2024 16:46:30 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-10 Thread Suchismith Roy
On Wed, 10 Apr 2024 16:46:30 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-10 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v21]

2024-04-10 Thread Suchismith Roy
On Wed, 10 Apr 2024 15:40:02 GMT, Martin Doerr wrote: > JTREG usually places libraries here: > > https://github.com/openjdk/jdk/blob/279ed0ddd505fb3052b818f755b4b220ed5557e6/make/test/JtregNativeJdk.gmk#L47 > > > Files can get copied by `Files.copy`: >

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v21]

2024-04-10 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v20]

2024-04-10 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v19]

2024-04-10 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v18]

2024-04-09 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with two additional commits since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v17]

2024-04-09 Thread Suchismith Roy
On Mon, 8 Apr 2024 19:45:14 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> test change > > test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFro

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v17]

2024-04-08 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v16]

2024-04-08 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v15]

2024-04-08 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v14]

2024-04-08 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

Re: RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v13]

2024-04-08 Thread Suchismith Roy
On Fri, 5 Apr 2024 18:14:36 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

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

2024-04-05 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with three additional commits since the last

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

2024-04-05 Thread Suchismith Roy
On Fri, 5 Apr 2024 17:38:50 GMT, Mandy Chung wrote: >> Suchismith Roy has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - update tests >> - update tests > > test/jdk/ja

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

2024-04-05 Thread Suchismith Roy
On Fri, 5 Apr 2024 16:18:11 GMT, Mandy Chung wrote: >> Suchismith Roy has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - spaces >> - nits and move file to aix directory > > test/jdk/ja

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

2024-04-05 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with two additional commits since the last

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

2024-04-05 Thread Suchismith Roy
On Fri, 5 Apr 2024 08:58:34 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

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

2024-04-05 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with two additional commits since the last

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

2024-04-05 Thread Suchismith Roy
On Thu, 4 Apr 2024 17:38:31 GMT, Mandy Chung wrote: >> test/jdk/java/lang/RuntimeTests/loadLibrary/LoadLibraryTestAIX.java line 38: >> >>> 36: } catch (Exception e) { >>> 37: throw new RuntimeException("LoadLibraryTestAIX : could not >>> load libperfstat.a"+e); >>> 38:

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

2024-04-04 Thread Suchismith Roy
On Thu, 4 Apr 2024 11:13:43 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has

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

2024-04-04 Thread Suchismith Roy
On Thu, 4 Apr 2024 10:43:35 GMT, Suchismith Roy wrote: >> Hotspot loads it like this: >> https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/hotspot/os/aix/libperfstat_aix.cpp#L76 >> Are you sure it is supposed to be loaded without member specifica

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

2024-04-04 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-04-04 Thread Suchismith Roy
On Thu, 4 Apr 2024 10:30:08 GMT, Martin Doerr wrote: > Hotspot loads it like this: > > https://github.com/openjdk/jdk/blob/b9da14012da5f1f72d4f6e690c18a43e87523173/src/hotspot/os/aix/libperfstat_aix.cpp#L76 > > > Are you sure it is supposed to be loaded without member specification? Yes i

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

2024-04-04 Thread Suchismith Roy
On Thu, 4 Apr 2024 09:41:50 GMT, Suchismith Roy 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 consis

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

2024-04-04 Thread Suchismith Roy
On Wed, 3 Apr 2024 07:35:46 GMT, Suchismith Roy wrote: >> Hello @suchismith1993, >> >>> > I adjust the comments which also answer your question. Please add an >>> > AIX-only test to verify this behavior. >>> >>> By test you mean provide t

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

2024-04-03 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-04-03 Thread Suchismith Roy
On Tue, 2 Apr 2024 08:36:15 GMT, Jaikiran Pai wrote: > test/jdk/java/lang/RuntimeTests/loadLibrary I see. Thank you. Got to check some test cases files and how they are structured. For this case, i feel the use case would be to have a pure .a file. Usually there is not such pure .a files

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

2024-04-02 Thread Suchismith Roy
On Mon, 1 Apr 2024 18:27:45 GMT, Mandy Chung wrote: > I adjust the comments which also answer your question. Please add an AIX-only > test to verify this behavior. By test you mean provide the use case for pure .a files ? - PR Comment:

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

2024-04-01 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-04-01 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-04-01 Thread Suchismith Roy
On Thu, 28 Mar 2024 16:57:59 GMT, Mandy Chung wrote: > `System::loadLibrary("systeminfo")` should call `JVM_LoadLibrary` with > "/usr/lib/libsysteminfo.so" argument (let the .a file exists under > "/usr/lib") which in turn calls `os::dll_load`. JDK-8320005 changed > `os::dll_load` to first

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

2024-03-27 Thread Suchismith Roy
On Wed, 27 Mar 2024 17:34:22 GMT, Mandy Chung wrote: >> libsystemInfo.a is one use case ,i got after discussion with our teams, >> which actually raised this issue in J9. So there are cases where pure .a >> files exist. > > AFAICT from your fix for >

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

2024-03-27 Thread Suchismith Roy
On Wed, 27 Mar 2024 17:20:22 GMT, Suchismith Roy wrote: >>> I think we both mean that the if (name.contains("(")) block should get >>> removed. >> >> Because of the VM support, we can remove `mapAlternativeName` completely. > > Oh ok.Yes i have

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

2024-03-27 Thread Suchismith Roy
On Wed, 27 Mar 2024 17:27:43 GMT, Suchismith Roy wrote: >> Oh ok.Yes i have removed that now. You mean ,load library wont support it, >> but load will be able to support it since the loadLibraryIfPresent is >> returned false now. >> >> Now the loadLibrary can

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

2024-03-27 Thread Suchismith Roy
On Wed, 27 Mar 2024 17:19:31 GMT, Mandy Chung wrote: >>> We are not supporting that. Are you referring to the comment in the code ? >>> Yeah it should be resconstruction of libname(member_name).so , which is the >>> first filename the classLoader constructs. >> >> Note that

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

2024-03-27 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request with a new target base due to a merge or a rebase. The pul

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

2024-03-27 Thread Suchismith Roy
On Wed, 27 Mar 2024 16:44:34 GMT, Mandy Chung wrote: > > So we should keep the mapAlternativeName for atleast .so to .a > > mapping(without any members mentioned). > > "libname.so(member_name)" is not a valid library name. No reason why > `System.load` has to support it. We are not

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

2024-03-27 Thread Suchismith Roy
On Tue, 26 Mar 2024 21:11:09 GMT, Mandy Chung wrote: >> src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 68: >> >>> 66: int dotIndex = name.lastIndexOf('.'); >>> 67: String memberName = >>> name.substring(openBracketIndex,dotIndex); >>> 68:

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

2024-03-27 Thread Suchismith Roy
On Tue, 26 Mar 2024 21:11:09 GMT, Mandy Chung wrote: >> src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 68: >> >>> 66: int dotIndex = name.lastIndexOf('.'); >>> 67: String memberName = >>> name.substring(openBracketIndex,dotIndex); >>> 68:

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

2024-03-26 Thread Suchismith Roy
On Mon, 25 Mar 2024 20:02:16 GMT, Mandy Chung wrote: > dcstartup fails because it fails to load an agent library specified via > `-agentlib:am_ibm_16` that was fixed by JDK-8320005. I assume that's what you > referred to "J9 had for a long time". This does not use > `System::loadLibrary`.

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

2024-03-25 Thread Suchismith Roy
On Mon, 25 Mar 2024 18:43:33 GMT, Mandy Chung wrote: > Do you expect if developers start to package shared objects in the format of > archive objects? If so, it would be reasonable to support #1 for > compatibility. Yes. I agree. We should keep this compatibility for entire flow from

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

2024-03-25 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with four additional commits since the last

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

2024-03-23 Thread Suchismith Roy
On Sat, 23 Mar 2024 00:46:45 GMT, Maurizio Cimadamore wrote: > I'd like to uplevel the discussion a bit. This PR started off to tweak the > way in which `System::load` worked in AIX. We then discussed a bunch of > options, talked about `Symbol::libraryLookup` and verified that this lookup >

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

2024-03-22 Thread Suchismith Roy
On Thu, 21 Mar 2024 22:04:28 GMT, Maurizio Cimadamore wrote: > This problem seems relatively similar to what happens for versioned library > names on e.g. linux distributions - e.g. `libclang.so.2`. In such cases users > are stuck between a rock and a hard place: using >

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

2024-03-22 Thread Suchismith Roy
On Thu, 21 Mar 2024 22:23:02 GMT, Maurizio Cimadamore wrote: > For this reason, the only thing that would make sense for `loadLibrary` to > support is `clang` which will be expanded (by `mapLibraryName`) to > `clang(libclang.so)`. But, even assuming this works: wouldn't we still have > an

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

2024-03-22 Thread Suchismith Roy
On Thu, 21 Mar 2024 22:23:02 GMT, Maurizio Cimadamore wrote: > > (I'm pessimistic) > > To summarize: I think that allowing version-specific names (even if > surrounded by parenthesis) in `System::loadLibrary` would be very odd. After > all, `System::loadLibrary` doesn't support versioned

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

2024-03-22 Thread Suchismith Roy
On Thu, 21 Mar 2024 17:06:23 GMT, Jaikiran Pai wrote: >>> But there is no actual file named libclang.a(libclang.so.16) in the >>> filesystem. >> So when the check is done if file exists, it fails,i.e it checks for >> libclang.a(libclang.so.16). >> >> I'll let Mandy and others more

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

2024-03-22 Thread Suchismith Roy
On Thu, 21 Mar 2024 20:29:16 GMT, Mandy Chung wrote: > As @jaikiran suggests, `loadLibraryOnlyIfPresent()` should return false for > AIX as the file does not exist. The library implementation may need to adjust > as the current implementation uses a file path name. Had kept it as true, as it

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

2024-03-21 Thread Suchismith Roy
On Thu, 21 Mar 2024 15:51:59 GMT, Suchismith Roy wrote: >>> Do you mean some application code is calling the `System.loadLibrary()` >>> method with such values? >> >> Yes we are trying to install liblcang and also jextract and it fails with >> erro

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

2024-03-21 Thread Suchismith Roy
On Tue, 19 Mar 2024 10:01:31 GMT, Suchismith Roy wrote: >>> > In AIX, we have an usecase where shared libraries have certain member >>> > objects to be referred to. E.g libclang.a(shr_64.o) . >>> >>> Would you happen to know any official documen

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

2024-03-19 Thread Suchismith Roy
On Tue, 19 Mar 2024 09:58:04 GMT, Suchismith Roy wrote: >>> In AIX, we have an usecase where shared libraries have certain member >>> objects to be referred to. E.g libclang.a(shr_64.o) . >> >> Would you happen to know any official documentation whic

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

2024-03-19 Thread Suchismith Roy
On Mon, 18 Mar 2024 17:40:04 GMT, Jaikiran Pai wrote: > > In AIX, we have an usecase where shared libraries have certain member > > objects to be referred to. E.g libclang.a(shr_64.o) . > > Would you happen to know any official documentation which explains that AIX > syntax? >

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

2024-03-18 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-03-18 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last

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

2024-03-18 Thread Suchismith Roy
On Mon, 18 Mar 2024 17:24:05 GMT, Jaikiran Pai wrote: >> Suchismith Roy has updated the pull request incrementally with seven >> additional commits since the last revision: >> >> - remove space >> - remove debug print lines >> - remove debug

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

2024-03-18 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with seven additional commits since the last

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

2024-03-14 Thread Suchismith Roy
Allow support for both .a and .so files in AIX. If .so file is not found, allow fallback to .a extension. JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) - Commit messages: - Add support for AIX dynamic libraries in Class Loader Changes: