luben / zstd-jni

JNI binding for Zstd
Other
809 stars 165 forks source link

Unsupported OS/arch, cannot find /linux/armv8l/libzstd-jni-1.5.2-3.so or load zstd-jni-1.5.2-3 from system libraries (arm64-v8l) #232

Open kwind opened 1 year ago

kwind commented 1 year ago

hi luben, I try to use zstd-jni (1.5.2-3) lib in my android project in Android studio IDE, so I import this lib with gradle like: dependencies { ..... implementation "com.github.luben:zstd-jni:1.5.2-3@aar" testImplementation "com.github.luben:zstd-jni:1.5.2-3" ..... }

run the android test in my phone, the following error message:

09-22 15:58:35.062 28334 29896 W System.err: Caused by: java.lang.UnsatisfiedLinkError: BundleClassLoader[/data/user/0/com.eg.android.AlipayGphone/app_plugins/android-sniper-20220922-153246.jar] couldn't find "libzstd-jni-1.5.2-3.so" 09-22 15:58:35.062 28334 29896 W System.err: Unsupported OS/arch, cannot find /linux/armv8l/libzstd-jni-1.5.2-3.so or load zstd-jni-1.5.2-3 from system libraries. Please try building from source the jar or providing libzstd-jni-1.5.2-3 in your system. 09-22 15:58:35.062 28334 29896 W System.err: at java.lang.Runtime.loadLibrary0(Runtime.java:1011) 09-22 15:58:35.062 28334 29896 W System.err: at java.lang.System.loadLibrary(System.java:1657) 09-22 15:58:35.062 28334 29896 W System.err: at com.github.luben.zstd.util.Native.load(Native.java:87) 09-22 15:58:35.063 28334 29896 W System.err: at com.github.luben.zstd.util.Native.load(Native.java:55) 09-22 15:58:35.063 28334 29896 W System.err: at com.github.luben.zstd.ZstdInputStreamNoFinalizer.(ZstdInputStreamNoFinalizer.java:23) 09-22 15:58:35.063 28334 29896 W System.err: ... 17 more

luben commented 1 year ago

This looks something new, in the aar we have a build for arm64-v8a. Do you know what is arm64-v8l? When it was introduced? Is it compatible with v8a?

VladRassokhin commented 1 year ago

armv8l seems to be Cortext-A32: ARMv8.0-A, 32-bit only.

UPD armv8b is also 32 bit, big-endian, though I've never seen such devices

luben commented 1 year ago

Hmm, I guess I have to update my Android studio, or mess with the config to enable that target