Object Box alpine support?

234 Views Asked by At

I am trying to build android project in CI/CD environment in alpine distrib with eclipse temurin jdk-11 and the following error happened during unit tests :

         java.lang.LinkageError: [ObjectBox] Loading native library failed, please report this to us: vendor=Alpine,os=linux,os.arch=amd64,model=64,linux=true,machine=x86_64
         at io.objectbox.internal.NativeLibraryLoader.<clinit>(NativeLibraryLoader.java:129)
         at io.objectbox.BoxStore.<init>(BoxStore.java:262)
         at io.objectbox.BoxStoreBuilder.build(BoxStoreBuilder.java:541)
         Caused by:
         java.lang.UnsatisfiedLinkError: .../libobjectbox-jni-linux-x64.so: Error relocating /lib/ld-linux-x86-64.so.2: unsupported relocation type 37
             at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
             at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
             at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
             at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
             at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
             at java.base/java.lang.Runtime.load0(Runtime.java:768)
             at java.base/java.lang.System.load(System.java:1837)
             at io.objectbox.internal.NativeLibraryLoader.<clinit>(NativeLibraryLoader.java:86)

I didn't find anything in Object box documentation about alpine support.

I am expecting to have information about object box support for alpine distribution

1

There are 1 best solutions below

0
On

When googling "unsupported relocation type 37 alpine" this is the best I found:

If you want to use one or more files on Alpine Linux which were compiled on a glibc based operating system, then you are responsible for ensuring that all of the shared libraries they need are available at runtime.

Source: https://github.com/sgerrand/alpine-pkg-glibc/issues/157

Also, please try to gather more info using ldd on the ObjectBox binary library, similar to what is done in the linked issue.

Not great, but maybe a start?