We have encountered (a while ago) an issue with NativeLibraries.loadLibrary failing on some operating systems like NetBSD (see hernanponcedeleon/Dat3M#835).
Fixing this is easy on our side by falling back to System.loadLibrary.
try {
NativeLibraries.loadLibrary(libName);
} catch (Exception e) {
System.loadLibrary(libName);
}
However, I think this could be integrated directly into NativeLibraries.loadLibrary which already has a fallback call to System.loadLibrary(name):
// In NativeLibraries
public static void loadLibrary(String name) {
Optional<Path> path = findPathForLibrary(name);
if (path.isPresent()) {
System.load(((Path)path.orElseThrow()).toAbsolutePath().toString());
} else {
System.loadLibrary(name);
}
}
Just execute the else-case if the then-case throws an exceptions.
If you do not want to change this on your side, feel free to close this issue.
We have encountered (a while ago) an issue with
NativeLibraries.loadLibraryfailing on some operating systems like NetBSD (see hernanponcedeleon/Dat3M#835).Fixing this is easy on our side by falling back to
System.loadLibrary.However, I think this could be integrated directly into
NativeLibraries.loadLibrarywhich already has a fallback call toSystem.loadLibrary(name):Just execute the else-case if the then-case throws an exceptions.
If you do not want to change this on your side, feel free to close this issue.