Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not load FFI provider (Centos 7 and lmdbjava 0.8.3) #234

Open
at055612 opened this issue Feb 28, 2024 · 0 comments · May be fixed by #235
Open

could not load FFI provider (Centos 7 and lmdbjava 0.8.3) #234

at055612 opened this issue Feb 28, 2024 · 0 comments · May be fixed by #235

Comments

@at055612
Copy link
Contributor

When running lmdbjava 0.8.3 on Centos 7 we are seeing the following error when lmdbjava attempts to load the lmdb library. This is a critical bug as it is preventing all use of LMDB.

It is working fine on 0.8.2 and 0.8.3 when used with other OSs (e.g. arch, alpine).

I believe it is related to this issue on jffi which is a dependency of jnr-ffi as used by lmdbjava.
jnr/jffi#138

It appears that they have fixed the issue so I will raise a PR to uplift jnr-ffi to the latest version.

Exception in thread "main" java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
        at jnr.ffi.provider.InvalidProvider$1.loadLibrary(InvalidProvider.java:49)
        at jnr.ffi.LibraryLoader.load(LibraryLoader.java:420)
        at jnr.ffi.LibraryLoader.load(LibraryLoader.java:399)
        at org.lmdbjava.Library.<clinit>(Library.java:125)
        at org.lmdbjava.Env$Builder.open(Env.java:521)
        at org.lmdbjava.Env$Builder.open(Env.java:547)
        at lmdbjava.testbed.App.run(App.java:44)
        at lmdbjava.testbed.App.main(App.java:25)
Caused by: java.lang.UnsatisfiedLinkError: could not get native definition for type `POINTER`, original error message follows: java.lang.UnsatisfiedLinkError: Unable to execute or load jffi binary stub from `/tmp`. Set `TMPDIR` or Java property `java.io.tmpdir` to a read/write path that is not mounted "noexec".
/xxxxxxxx/xxxxxxxxx/jffi3458157951401511179.so: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /xxxxxx/xxxxxxx/jffi3458157951401511179.so)
        at com.kenai.jffi.internal.StubLoader.tempLoadError(StubLoader.java:555)
        at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:454)
        at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:330)
        at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:618)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:467)
        at com.kenai.jffi.Init.load(Init.java:68)
        at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:50)
        at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:46)
        at com.kenai.jffi.Foreign.getInstance(Foreign.java:104)
        at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
        at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
        at com.kenai.jffi.Type.resolveSize(Type.java:155)
        at com.kenai.jffi.Type.size(Type.java:138)
        at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:198)
        at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48)
        at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:77)
        at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:49)
        at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:73)
        at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:60)
        at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
        at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
        at java.base/java.lang.Class.newInstance(Class.java:645)
        at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
        at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57)
        at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
        at jnr.ffi.LibraryLoader.create(LibraryLoader.java:89)
        at org.lmdbjava.Library.<clinit>(Library.java:125)
        at org.lmdbjava.Env$Builder.open(Env.java:521)
        at org.lmdbjava.Env$Builder.open(Env.java:547)
        at lmdbjava.testbed.App.run(App.java:44)
        at lmdbjava.testbed.App.main(App.java:25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant