-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Describe the issue
#4614 introduces an unconditional dependency on jdk.vm.ci.hotspot.HotSpotJDKReflection
and jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.getReflection()
which are not available in OpenJDK 11.
Both dependencies were introduced by https://bugs.openjdk.org/browse/JDK-8220623 which has not been backported to upstream OpenJDK 11, thus breaking Mandrel builds which are based on upstream OpenJDK 11 builds.
Steps to reproduce the issue
git clone git@github.com:graalvm/mandrel-packaging.git
cd mandrel-packaging
export JAVA_HOME=path/to/java
$JAVA_HOME/bin/java -ea build.java --mx-home path/to/mx --mandrel-repo path/to/graal
Describe GraalVM and your environment:
- GraalVM version: 9922836
- JDK major version: OpenJDK 11.0.16+7
- OS: Fedora 36
- Architecture: AMD64
More Details:
The build fails with:
Building com.oracle.svm.native.jvm.posix_amd64 with Ninja... [dependency svm-jvmfuncs-fallback-builder updated]
Fatal error: com.oracle.svm.util.ReflectionUtil$ReflectionUtilError: java.lang.NoSuchMethodException: jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.getReflection()
at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:82)
at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:69)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.annotation.SubstrateAnnotationExtracter.<clinit>(SubstrateAnnotationExtracter.java:118)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageClassLoaderSupport.<init>(NativeImageClassLoaderSupport.java:157)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.installNativeImageClassLoader(NativeImageGeneratorRunner.java:180)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:123)
Caused by: java.lang.NoSuchMethodException: jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.getReflection()
at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475)
at org.graalvm.nativeimage.base/com.oracle.svm.util.ReflectionUtil.lookupMethod(ReflectionUtil.java:74)
... 5 more
Error: Image build request failed with exit status 1
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Failed, exit code: 1
at OperatingSystem.exec(build.java:1678)
at build.buildAgents(build.java:227)
at build.main(build.java:209)
Caused by: java.lang.RuntimeException: Failed, exit code: 1
at OperatingSystem.exec(build.java:1663)
at build.buildAgents(build.java:227)
at build.main(build.java:209)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:404)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:179)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:119)
Error: Process completed with exit code 1.