lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.1k stars 253 forks source link

java.lang.UnsatisfiedLinkError on macOS 10.15 Catalina #153

Closed odaira closed 3 years ago

odaira commented 4 years ago

ant test often fails with UnsatisfiedLinkError on macOS 10.15 Catalina, due to the increased security check by the OS. I am now looking into how to fix/workaround this issue.

[junit4:junit4]    > Throwable #1: java.lang.UnsatisfiedLinkError: /private/var/folders/4f/bm4w64yd5l19v7hvl_ggb5s40000gp/T/liblz4-java-1921444583983850495.dylib: dlopen(/private/var/folders/4f/bm4w64yd5l19v7hvl_ggb5s40000gp/T/liblz4-java-1921444583983850495.dylib, 1): no suitable image found.  Did find:
[junit4:junit4]    >    /private/var/folders/4f/bm4w64yd5l19v7hvl_ggb5s40000gp/T/liblz4-java-1921444583983850495.dylib: code signature in (/private/var/folders/4f/bm4w64yd5l19v7hvl_ggb5s40000gp/T/liblz4-java-1921444583983850495.dylib) not valid for use in process using Library Validation: library load disallowed by system policy
[junit4:junit4]    >    at __randomizedtesting.SeedInfo.seed([FE6FAF6136F9074E:5E10FA2287163300]:0)
[junit4:junit4]    >    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[junit4:junit4]    >    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
[junit4:junit4]    >    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
[junit4:junit4]    >    at java.lang.Runtime.load0(Runtime.java:809)
[junit4:junit4]    >    at java.lang.System.load(System.java:1086)
[junit4:junit4]    >    at net.jpountz.util.Native.load(Native.java:139)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4JNI.<clinit>(LZ4JNI.java:29)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4JNICompressor.compress(LZ4JNICompressor.java:36)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4Factory.<init>(LZ4Factory.java:207)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4Factory.instance(LZ4Factory.java:51)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4Factory.nativeInstance(LZ4Factory.java:91)
[junit4:junit4]    >    at net.jpountz.lz4.LZ4Test.testRoundTrip(LZ4Test.java:242)
...
odaira commented 4 years ago

I have not seen this problem with the released version of lz4-java 1.7.0. I'll keep this open for a while, as I have not identified the root cause yet.

odaira commented 3 years ago

I haven't seen this error on macOS 11.4 Big Sur, either.