Closed agilecreativity closed 4 years ago
Thanks for the report. Use java8 for the time being. I will try it with java 11 when I get a chance.
Just curious as to the reason to compile it against graal java 11? Just to be up to date?
No particular reason really. But just happen to download it first. Now I am back to use Java 8 and it works perfectly. Thanks
Have recreated this. And narrowed it down to this piece of code inside clojure that is triggering it:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Reflector.java#L49
I have a working branch for babashka and sci with jdk11. The workarounds are:
copy Reflector.java with a fix for JDK11 (avoid discovering a method dynamically based on the runtime version).
Copy this file into java-src
for each project you're going to use with JDK11 and compile it yourself, just to be sure it's going to override the Clojure one on the classpath.
Sci depends on a package called borkdude/sci.impl.reflector
which has been patched for jdk11:
With these two fixes it should work. See:
https://github.com/borkdude/sci/compare/jdk11
JDK11 is work in progress for babashka. The issue about it is here: https://github.com/borkdude/babashka/issues/120
The only remaining issue is packaging java.nio
files in reflection.json doesn't work on JDK11 with macOS. This should be fixed in graalvm 20.
Fixed in v0.1.8
First of all, thanks for the great project.
When trying to build with
graalvm-ce-java11-19.3.0
on OSX it seems to be error. It works perfectly when trying withgraalvm-ce-java8-19.3.0
. I will add the stacktrace of the problem once I have test this again soon. This is the result of running the following command: My environment:... Printing initializer configuration to /Users/bchoomnuan/apps/retrogradeorbit--bootleg/reports/initializer_configuration_20191218_213958.txt [Use -Dgraal.LogFile= to redirect Graal log output to a file.]
[thread:24] scope: ForkJoinPool-2-worker-7
[thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis
Context: StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
Context: AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
[thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles
Context: StructuredGraph:4820{HotSpotMethod<Invokers$Holder.invoke_MT(Object, Object, Object, Object)>}
Exception raised in scope ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:483)
at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:194)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1793)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1682)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1630)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1615)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5168)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3286)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3093)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:977)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:871)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:221)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:340)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:511)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)