![]() Inspecting the Netlib code showed that it used System.loadLibrary to attempt to load the appropriately-configured BLAS library. the way I discovered this issue was while attempting to get the OSX Accelerate LibVec BLAS implementation to load via Netlib in Spark Netlib kept complaining that it can't find the native BLAS libraries. As a result, valid dynamic libraries that otherwise open fine via dlopen(.) fail with UnsatisfiedLinkError in current versions of the JDK. Tracing the execution of System.loadLibrary shows that the offending check happens at (tested on OpenJDK 11 and 17, Oracle JDK 17 and 18-ea) where File.exists(.) is used to check whether the library file is present on the filesystem before attempting to load it. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache." "Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. ![]() According to the Big Sur release notes in , ![]() The new dynamic linker cache introduced by OSX Big Sur creates problems with previous code which checks for the existence of a library file in the filesystem before attempting to load it with dlopen(.). OSX Big Sur no longer ships with copies of the libraries on the filesystem and therefore attempts to load a native library via System.loadLibrary no longer works. OpenJDK 17, OpenJDK 11, Oracle JDK 17, Oracle JDK 18-ea
0 Comments
Leave a Reply. |