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

Suchismith Roy sroy at openjdk.org
Thu Apr 11 18:32:47 UTC 2024


On Thu, 11 Apr 2024 17:08:49 GMT, Suchismith Roy <sroy at openjdk.org> 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/native/libawt_headless.so", but it should load "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/java/lang/RuntimeTests/loadLibrary/aix/AIXLoadLibraryDriver/native/libfoobar.a".
> 
> > 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/native/libawt_headless.so", but it should load "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/java/lang/RuntimeTests/loadLibrary/aix/AIXLoadLibraryDriver/native/libfoobar.a".
> 
> I am facing the same error. But i do not understand why is it resolved to libawt_headless.so .

 stdout: [attempting to load library foobar
];
 stderr: [Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /home/hotspot/openjdk/jdk-suchi/jdk1/build/aix-ppc64-server-fastdebug/test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix_LoadAIXLibraryFromArchiveObject_java/scratch/0/native/libawt_headless.so
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2406)
        at java.base/java.lang.Runtime.load0(Runtime.java:852)
        at java.base/java.lang.System.load(System.java:2030)
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:259)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:251)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2435)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
        at java.base/java.lang.System.loadLibrary(System.java:2068)
        at LoadAIXLibraryFromArchiveObject$LoadLibraryApp.main(LoadAIXLibraryFromArchiveObject.java:52)
]
 exitValue = 1

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

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


More information about the core-libs-dev mailing list