Anyone tried building `graalvm` native app from <k...
# ktor
r
Anyone tried building
graalvm
native app from ktor-samples lately? I'm trying to use Kotln 2.0.0 and JDK 22 but the native-image process fails with lots of error messages about different classes (
ch.qos.logback.classic.*
,
kotlinx.coroutines.CoroutineName,
org.slf4j.*
).
a
I cannot reproduce the problem with Kotlin 2.0.0 and OpenJDK GraalVM CE 21.0.1+12.1 by running the
gradlew nativeCompile
command. What exact version of JDK do you use?
r
I've installed
22.0.1-graal
with sdkman
a
To make it work add the following lines to the
named("main")
block of the
graalvmNative
extension:
Copy code
buildArgs.add("--initialize-at-build-time=ch.qos.logback.classic.Logger")
buildArgs.add("--initialize-at-build-time=kotlinx.coroutines")
buildArgs.add("--initialize-at-build-time=org.slf4j.helpers")
I've filed an issue.
👍 1