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
It works fine for a simple hello world sample with Scala 2.11.12/2.12.10:
$ git clone -b graalvm-ce-java8-native-image --single-branch [email protected]:plokhotnyuk/jsoniter-scala.git
...
$ cd jsoniter-scala/jsoniter-scala-examples
...
$ sbt clean +assembly
...
$ /usr/lib/jvm/graalvm-ce-java8/bin/native-image --no-server --no-fallback --allow-incomplete-classpath -H:UnsafeAutomaticSubstitutionsLogLevel=3 -H:+ReportExceptionStackTraces --report-unsupported-elements-at-runtime -jar target/scala-2.12/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.jar
...
$ time ./jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT
Hello, World!
real 0m0,001s
user 0m0,001s
sys 0m0,000s
But it cannot be compiled to the native image with Scala 2.13.1:
$ /usr/lib/jvm/graalvm-ce-java8/bin/native-image --no-server --no-fallback --allow-incomplete-classpath -H:UnsafeAutomaticSubstitutionsLogLevel=3 -H:+ReportExceptionStackTraces --report-unsupported-elements-at-runtime -jar target/scala-2.13/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.jar
...
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0xb0): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x188): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x198): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x200): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x250): undefined reference to `Java_sun_misc_Unsafe_defineAnonymousClass'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x328): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x538): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x600): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x670): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x7b8): undefined reference to `Java_sun_misc_Unsafe_defineClass'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0x918): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0xaf0): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
/tmp/SVM-2002383037456502398/jsoniter-scala-examples-assembly-0.1.0-SNAPSHOT.o:(.data+0xbd0): undefined reference to `Java_java_lang_invoke_MethodHandle_invokeBasic'
collect2: error: ld returned 1 exit status
at com.oracle.svm.hosted.image.NativeBootImageViaCC.write(NativeBootImageViaCC.java:382)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:652)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Image build request failed with exit status 1
The text was updated successfully, but these errors were encountered:
It works fine for a simple hello world sample with Scala 2.11.12/2.12.10:
But it cannot be compiled to the native image with Scala 2.13.1:
The text was updated successfully, but these errors were encountered: