You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the error below while building in WSL using the instructions in the readme. As suggested, in the message, I added --report-unsupported-elements-at-runtime to graalVMNativeImageOptions in build.sbt.
graalVMNativeImageOptions ++=Seq(
"--no-fallback",
"--enable-url-protocols=https",
"--report-unsupported-elements-at-runtime"//<-- added this
),
I've managed to do a couple of updates, and it runs much faster than the version I had (probably one of the first releases) which is great, but there's probably a landmine floating around somewhere just waiting to blow up.
I guess the question is, should we add this option to the build? It seems to work, but if somebody adds something that uses reflection or some other unsupported feature, it might be good to know at build time - it doesn't look like there's any warning when building with this option.
[info] ========================================================================================================================
[info] GraalVM Native Image: Generating 'scala-update' (executable)...
[info] ========================================================================================================================
[info] [1/7] Initializing... (19.0s @ 0.27GB)
[info] Version info: 'GraalVM 22.3.0 Java 19 CE'
[info] Java version info: '19.0.1+10-jvmci-22.3-b08'
[info] C compiler: gcc (linux, x86_64, 9.4.0)
[info] Garbage collector: Serial GC
[info] 1 user-specific feature(s)
[info] - com.oracle.svm.polyglot.scala.ScalaFeature
[info] [2/7] Performing analysis... [**] (47.5s @ 5.17GB)
[info] 17,895 (89.55%) of 19,984 classes reachable
[info] 23,613 (65.24%) of 36,192 fields reachable
[info] 83,623 (47.42%) of 176,347 methods reachable
[info] 366 classes, 201 fields, and 2,106 methods registered for reflection
[error] Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing java.lang.invoke.MutableCallSite.setTarget(java.lang.invoke.MethodHandle)
[error] Parsing context:
[error] at java.lang.invoke.MutableCallSite.setTarget(MutableCallSite.java:155)
[error] at scala.reflect.internal.util.AlmostFinalValue.toggleOnAndDeoptimize(AlmostFinalValue.java:45)
[error] at scala.reflect.internal.util.StatisticsStatics.enableDebugAndDeoptimize(StatisticsStatics.java:36)
[error] at scala.tools.nsc.settings.ScalaSettings.$anonfun$debug$1(ScalaSettings.scala:456)
[error] at scala.tools.nsc.settings.ScalaSettings.$anonfun$debug$1$adapted(ScalaSettings.scala:456)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:153)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureFlowsGraphCreated(MethodTypeFlow.java:83)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.getOrCreateMethodFlowsGraph(MethodTypeFlow.java:65)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultVirtualInvokeTypeFlow.java:109)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:562)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:488)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
[error] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[error] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[error] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
[error] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840)
[error] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
[error] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
[error] Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.InternalError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Error loading a referenced type: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.invoke.MethodHandleNatives.setCallSiteTargetNormal(CallSite, MethodHandle) is reachable
[error] To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
The text was updated successfully, but these errors were encountered:
I got the error below while building in WSL using the instructions in the readme. As suggested, in the message, I added
--report-unsupported-elements-at-runtime
tograalVMNativeImageOptions
inbuild.sbt
.I've managed to do a couple of updates, and it runs much faster than the version I had (probably one of the first releases) which is great, but there's probably a landmine floating around somewhere just waiting to blow up.
I guess the question is, should we add this option to the build? It seems to work, but if somebody adds something that uses reflection or some other unsupported feature, it might be good to know at build time - it doesn't look like there's any warning when building with this option.
[info] ========================================================================================================================
[info] GraalVM Native Image: Generating 'scala-update' (executable)...
[info] ========================================================================================================================
[info] [1/7] Initializing... (19.0s @ 0.27GB)
[info] Version info: 'GraalVM 22.3.0 Java 19 CE'
[info] Java version info: '19.0.1+10-jvmci-22.3-b08'
[info] C compiler: gcc (linux, x86_64, 9.4.0)
[info] Garbage collector: Serial GC
[info] 1 user-specific feature(s)
[info] - com.oracle.svm.polyglot.scala.ScalaFeature
[info] [2/7] Performing analysis... [**] (47.5s @ 5.17GB)
[info] 17,895 (89.55%) of 19,984 classes reachable
[info] 23,613 (65.24%) of 36,192 fields reachable
[info] 83,623 (47.42%) of 176,347 methods reachable
[info] 366 classes, 201 fields, and 2,106 methods registered for reflection
[error] Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing java.lang.invoke.MutableCallSite.setTarget(java.lang.invoke.MethodHandle)
[error] Parsing context:
[error] at java.lang.invoke.MutableCallSite.setTarget(MutableCallSite.java:155)
[error] at scala.reflect.internal.util.AlmostFinalValue.toggleOnAndDeoptimize(AlmostFinalValue.java:45)
[error] at scala.reflect.internal.util.StatisticsStatics.enableDebugAndDeoptimize(StatisticsStatics.java:36)
[error] at scala.tools.nsc.settings.ScalaSettings.$anonfun$debug$1(ScalaSettings.scala:456)
[error] at scala.tools.nsc.settings.ScalaSettings.$anonfun$debug$1$adapted(ScalaSettings.scala:456)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:153)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureFlowsGraphCreated(MethodTypeFlow.java:83)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.getOrCreateMethodFlowsGraph(MethodTypeFlow.java:65)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.typestate.DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultVirtualInvokeTypeFlow.java:109)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:562)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:488)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
[error] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
[error] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[error] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[error] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
[error] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840)
[error] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
[error] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
[error] Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.InternalError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Error loading a referenced type: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.invoke.MethodHandleNatives.setCallSiteTargetNormal(CallSite, MethodHandle) is reachable
[error] To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
The text was updated successfully, but these errors were encountered: