-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Native compile [GraalVM] #11298
Native compile [GraalVM] #11298
Conversation
Caused by: java.lang.module.InvalidModuleDescriptorException: Unsupported major.minor version 66.0 |
Uhoh. I went back to Java 21 in |
With Java 21, the image compiles fine, but cannot be started: koppor@DESKTOP-KAK953S MINGW64 /c/git-repositories/jabref/build/native/nativeCompile (nativecompile)
$ ./JAbRef.exe
Messages are not initialized before accessing key: Display help on command line options
LOGGER ERROR: Service implementation 'org.tinylog.writers.ConsoleWriter' has no matching constructor
Exception in thread "main" java.lang.NullPointerException
at org.jabref.logic.l10n.Localization.lookup(Localization.java:146)
at org.jabref.logic.l10n.Localization.lang(Localization.java:58)
at org.jabref.cli.JabRefCLI.getOptions(JabRefCLI.java:184)
at org.jabref.cli.JabRefCLI.<init>(JabRefCLI.java:33)
at org.jabref.Launcher.main(Launcher.java:59)
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH) |
Current hint: // Source: https://github.com/tinylog-org/tinylog/issues/145#issuecomment-603430594
task generateConfiguration(type: Exec) {
group = "graal"
description = "Run application to generate the configuration for native image"
dependsOn build
commandLine project.gradle.gradleUserHomeDir.toPath().resolve("caches/com.palantir.graal/$graalVmVersion/graalvm-ce-$graalVmVersion/bin/java"), "-agentlib:native-image-agent=config-output-dir=" + project.buildDir.toPath().resolve("resources/main/META-INF/native-image"), "-cp", sourceSets.main.runtimeClasspath.getAsPath(), javaMainClass
doFirst {
mkdir project.buildDir.toPath().resolve("resources/main/META-INF/native-image")
}
} |
Requires palantir graal plugin for gradle |
I don't think so. The path starts with plantir, but the content seems to be the real GraalVM. Thus, the paths "just" need to ne adapted to recent GraalVM. |
MWE project to try out a fix: https://github.com/shoneslab/graal-logging (referenced from tinylog-org/tinylog#145 (comment)) |
This needs to be adressed: oracle/graal#7682 |
Co-authored-by: Carl Christian Snethlage <[email protected]>
Doesn't use Toolchain. Think, we already managed to compile using GraalVM, but have issues with our file access |
Tinylog "official" "guide": https://github.com/tinylog-org/tinylog-graal-example |
The build of this PR is available at https://builds.jabref.org/pull/11298/merge. |
Current error:
|
Might be related oracle/graal#673 |
At #11510, we even introduced more reflection. Closing and re-opening at koppor, because it will take more time. |
Howto
nativeCompile
.TODOs
.class.getResource
(because of Cannot open native image resource using Path, NativeImageResourceFileSystemProvider not initialised oracle/graal#7682 (comment)) (see cad404c)Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)