-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support static linking of JNI libs #827
Comments
@FroMage this improvement is on our TODO list. Thanks for the report! |
I think you now do this already via the |
That statically links libc and zlib specifically, but not anyhting else, IIUC. |
FWIW I think resolving this would also resolve #1336. |
@lvh thanks for the response, I'll update the docs via a PR to express this next to the |
FWIW 19.3.0 at least fixes the libsunec case and I think maybe it just lets you link anything now? |
Closing issue since 19.3. we depend on static linking of JNI libs of the JDK. If there are issues with specific JNI libs that cause problems please open individual issues for them. |
@olpaw is there any documentation on how to use that feature? There's a JNI doc in the repo but it's pretty outdated (still mentions SubstrateVM, for one) :) concretely: let's say I have a JNI library (ideally the JNI library is actually jnr-ffi), how do I build a native image that uses it? |
@lvh did you manage to use a static library with a statically built native image? I'm trying to add support for Brotli4j, so far by using
But all attempts to load the library with Thanks in advance for any suggestions / help |
Nope, sorry. |
ATM when using SSL we must run with
-Djava.library.path=$GRAALVM_HOME/jre/lib/amd64
to get thelibsunec.so
, but that's asymmetrical to the rest of the JDK which is statically linked in the executable. Could we get an option to statically link specified JNI libs into the executable to avoid that external runtime dependency?The text was updated successfully, but these errors were encountered: