-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
"USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM= false" is broken with JDK 21 #7712
Comments
Hi @geofjamg could you give us the OS specifications you're working with? Thank you. |
uname -a
Darwin mbp-de-xxx.home 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64 |
But I don't think it is an issue specific to the OS. I have same exception on a Linux Ubuntu AMD64. |
Hi @geofjamg, there seems to be an issue with the link you provided for the project. It says page not found. Can you double check it please? |
I switched the repo to public. Is it ok now? |
@geofjamg Yes it's public now thank you. Our team is working on this. |
You no longer need to run this command "export USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=false" when using graalvm-jdk-21.0.1+12.1. It is deprecated. This should solve the issue you're facing with graalvm-jdk-21.0.1+12.1. |
Thank you, indeed it works. I only had to add "--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.c=ALL-UNNAMED" to the native image command in my real application (no idea why it is not needed in the simple test case). Otherwise I get the error: > java.lang.IllegalAccessError: class com.powsybl.python.commons.Directives (in unnamed module @0x730e5763) cannot access class com.oracle.svm.core.c.ProjectHeaderFile (in module org.graalvm.nativeimage.builder) because module org.graalvm.nativeimage.builder does not export com.oracle.svm.core.c to unnamed module @0x730e5763 This is related to this dependency that is needed to get access to <dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
<version>${graalvm.version}</version>
<scope>provided</scope>
</dependency> Is it something expected? It was not needed with JDK 17. |
@selhagani if I can suggest some changes:
|
Hi @geofjamg thanks for the suggestions! I will share them with our dev team. |
Hi all,
Even with a very simple project like this one: https://github.com/geofjamg/buggraalvm
When we compile to a shared library using Oracle GraalVM JDK 21 (graalvm-jdk-21.0.1+12.1)
We get the error:
The same project compiles perfectly with Oracle GraalVM JDK 17.
The text was updated successfully, but these errors were encountered: