kb-1000 / mc-image

Minecraft as a native executable using GraalVM native-image
Mozilla Public License 2.0
25 stars 0 forks source link

It no longer works with latest GraalVM #3

Open MenacingPerson opened 1 year ago

MenacingPerson commented 1 year ago

Please fix this, I installed GraalVM EE 17 through the graalvm website, when I run it like so:

$ PATH="$HOME/graalvm-ee-java17-22.3.1/bin:$PATH"
$ ./gradlew assemble

This is the error message:

> Task :mc-image-substgen:compileKotlin
'compileJava' task (current target is 17) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
w: /home/arch/mc-image/mc-image-substgen/src/main/kotlin/de/kb1000/mcimage/substgen/GenerateGLInvokers.kt: (210, 17): Name shadowed: name
w: /home/arch/mc-image/mc-image-substgen/src/main/kotlin/de/kb1000/mcimage/substgen/Util.kt: (22, 1): Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types

> Task :mc-image-lib:substgen
Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot=/home/arch/.config/java
Exception in thread "main" java.lang.NoClassDefFoundError: com/oracle/svm/core/annotate/Uninterruptible
        at de.kb1000.mcimage.substgen.GenerateCallbackBackendKt.generateCallbackBackend(GenerateCallbackBackend.kt:62)
        at de.kb1000.mcimage.substgen.Main.main(Main.kt:28)
Caused by: java.lang.ClassNotFoundException: com.oracle.svm.core.annotate.Uninterruptible
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        ... 2 more

> Task :mc-image-lib:substgen FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mc-image-lib:substgen'.
> Process 'command '/home/arch/graalvm-ee-java17-22.3.1/bin/java'' finished with non-zero exit value 1
kb-1000 commented 1 year ago

GitHub apparently didn't think it's worth sending me notifications, I'm sorry for replying this late... I'm unsure what could be causing this, it's compiling just fine if you run the Gradle part without GraalVM, and this library is fetched from Maven Central rather than grabbed from the GraalVM install. (the actual native-image build part runs outside Gradle as described in the readme, and you're supposed to pass the location using the GRAAL_HOME variable, not PATH)