I am trying to port my app to linux/aarch64 and getting this exception:
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: no zstd-jni-1.5.6-3 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
Unsupported OS/arch, cannot find /linux/aarch_64/libzstd-jni-1.5.6-3.so or load zstd-jni-1.5.6-3 from system libraries. Please try building from source the jar or providing libzstd-jni-1.5.6-3 in your system. [in thread "Thread-25"]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2458)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2063)
at com.github.luben.zstd.util.Native$1.run(Native.java:70)
at com.github.luben.zstd.util.Native$1.run(Native.java:68)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at com.github.luben.zstd.util.Native.loadLibrary(Native.java:68)
at com.github.luben.zstd.util.Native.load(Native.java:118)
at com.github.luben.zstd.util.Native.load(Native.java:86)
at com.github.luben.zstd.Zstd.<clinit>(Zstd.java:12)
at org.apache.pinot.segment.local.io.compression.ZstandardCompressor.maxCompressedSize(ZstandardCompressor.java:53)
at org.apache.pinot.segment.local.io.compression.TestCompression.lambda$testConcurrent$0(TestCompression.java:108)
at java.base/java.lang.Thread.run(Thread.java:1583)
Although I see that we do have a binary for aarch64 in the jar at path linux/aarch64/libzstd-jni-1.5.6-3.so, the code, however, looks for it in aarch_64 instead of aarch64.
Zstd loads the the following native library: /linux/aarch_64/libzstd-jni-1.5.6-3.so
I am trying to port my app to
linux/aarch64
and getting this exception:Although I see that we do have a binary for
aarch64
in the jar at pathlinux/aarch64/libzstd-jni-1.5.6-3.so
, the code, however, looks for it inaarch_64
instead ofaarch64
.Zstd loads the the following native library:
/linux/aarch_64/libzstd-jni-1.5.6-3.so
In code, this name is derived using:
And osArch() basically reads the env var os.arch:
I checked this, it returns
aarch64
in my container so why is it looking foraarch_64
then?