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

Compatibility with graalvm native-image #55

Open
willcohen opened this issue Nov 22, 2019 · 0 comments
Open

Compatibility with graalvm native-image #55

willcohen opened this issue Nov 22, 2019 · 0 comments

Comments

@willcohen
Copy link
Contributor

Now that graal 19.3 is out and LTS, I tried to use this library in a graalvm native-image, which leads to errors like this:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.uber.h3core.NativeMethods.getRes0Indexes([J)V [symbol: Java_com_uber_h3core_NativeMethods_getRes0Indexes or Java_com_uber_h3core_NativeMethods_getRes0Indexes___3J]
        at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:145)
        at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
        at com.uber.h3core.NativeMethods.getRes0Indexes(NativeMethods.java)
        at com.uber.h3core.H3Core.getRes0Indexes(H3Core.java:1021)

It appears that some guidance to native-image is needed for JNI and that there are partially-automated ways to generate the needed configuration, which become available to downstream users too if the config is included in the library's jar.

It isn't as simple as just using the agent on the build and testing tasks, but I'll look some more and see what it takes to generate an appropriate jni-config.json.

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

No branches or pull requests

1 participant