quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

`WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports` when building native image

Open rsvoboda opened this issue 2 years ago • 5 comments

Describe the bug

WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports when building native image using GraalVM 22.2.0

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /Users/rsvoboda/.sdkman/candidates/java/22.2.r17-grl/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Duser.country=GB -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature -H:-ParseOnce -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -J-Djava.awt.headless=true -H:FallbackThreshold=0 --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.localization=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED code-with-quarkus-1.0.0-SNAPSHOT-runner -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
========================================================================================================================
GraalVM Native Image: Generating 'code-with-quarkus-1.0.0-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing...                                                                                   (10.1s @ 0.32GB)

The warning is not present when using GraalVM 21.3.0 Java 17 CE

Expected behavior

No warning

Actual behavior

WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports when building native image

How to Reproduce?

  • get app from https://code.quarkus.io/
  • use GraalVM 22.2.0 Java 17 CE (or GraalVM 22.2.0 Java 11 CE)
  • run mvn clean package -Dnative
  • check the log right after mative-image command

Output of uname -a or ver

macOS Monterey

Output of java -version

GraalVM 22.2.0 Java 17 CE

GraalVM version (if different from Java)

GraalVM 22.2.0 Java 17 CE

Quarkus version or git rev

2.11.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

rsvoboda avatar Aug 16 '22 10:08 rsvoboda

/cc @geoand, @gsmet

rsvoboda avatar Aug 16 '22 10:08 rsvoboda

cc @zakkak @galderz

geoand avatar Aug 16 '22 10:08 geoand

This is an upstream GraalVM issue, it is not related to Quarkus.

$ native-image --version  
GraalVM 22.2.0 Java 17 CE (Java Version 17.0.4+8-jvmci-22.2-b06)

$ native-image HelloWorld
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
==============================================================================================
GraalVM Native Image: Generating 'helloworld' (executable)...
==============================================================================================
...

The issue is tracked upstream in https://github.com/oracle/graal/issues/4789

zakkak avatar Aug 16 '22 10:08 zakkak

This is fixed in the contemporary 22.3-dev (e.g. 22.3.0-dev47e81a3a38f5) + Q 2.13.2. Closing.

Karm avatar Oct 13 '22 07:10 Karm

@Karm this was appearing as "fixed" in 22.2-dev as well. The issue came up after the release because of the way upstream GraalVM CE packaged things. I suggest we wait for the actual release to close the issue.

zakkak avatar Oct 13 '22 08:10 zakkak

22.3 is now out and AFAIK the issue no longer manifests.

zakkak avatar Nov 30 '22 12:11 zakkak