Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem [v2]
On Wed, 27 Oct 2021 17:27:41 GMT, Mandy Chung wrote: >> On, macOS 11.x, system libraries are loaded from dynamic linker cache. The >> libraries are no longer present on the filesystem. >> `NativeLibraries::loadLibrary` checks for the file existence before calling >> `JVM_LoadLibrary`. Such check no longer applies on Big Sur. This >> proposes that on macOS >= 11, it will skip the file existence check and >> attempt to load a library for each path from java.library.path and system >> library path. > > Mandy Chung has updated the pull request incrementally with two additional > commits since the last revision: > > - Adjust parsing os.version to handle no dot version in case it's allowed > - Exclude building exeLibraryCache.c on other platforms except macOS This came up on panama-dev a bunch of time now. In fact, in the panama use case this would make sense for other systems as well. For instance on linux systems, there's a bunch of known library names in gnu/lib-names.h which programs can depend on, but for which System::load/loadLibrary cannot be used - as they are neither library names, nor paths - for instance "libm.so.6". - Marked as reviewed by mcimadamore (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6127
Re: RFR: JDK-8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem [v2]
> On, macOS 11.x, system libraries are loaded from dynamic linker cache. The > libraries are no longer present on the filesystem. > `NativeLibraries::loadLibrary` checks for the file existence before calling > `JVM_LoadLibrary`. Such check no longer applies on Big Sur. This proposes > that on macOS >= 11, it will skip the file existence check and attempt to > load a library for each path from java.library.path and system library path. Mandy Chung has updated the pull request incrementally with two additional commits since the last revision: - Adjust parsing os.version to handle no dot version in case it's allowed - Exclude building exeLibraryCache.c on other platforms except macOS - Changes: - all: https://git.openjdk.java.net/jdk/pull/6127/files - new: https://git.openjdk.java.net/jdk/pull/6127/files/e034029f..710925b5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=6127=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=6127=00-01 Stats: 12 lines in 5 files changed: 2 ins; 3 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/6127.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6127/head:pull/6127 PR: https://git.openjdk.java.net/jdk/pull/6127