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
What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ): --> Ubuntu
What package are you building (e.g. docker, rpm, ...): --> Docker
What version has your build tool (find out with e.g. rpm --version): --> Docker version 19.03.3, build a872fc2
What is your target system (e.g. Ubuntu 16.04, CentOS 7): --> Ubuntu 16.04
Expected behaviour
"sbt 'show graalvm-native-image:packageBin generates the native image'"
Actual behaviour
sbt 'show graalvm-native-image:packageBin'
[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from ${HOME}/.sbt/1.0/plugins
[info] Loading settings for project graal-test-build from plugins.sbt ...
[info] Loading project definition from ${HOME}/graal-test-app/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to graal-test (in build file:${HOME}/graal-test-app/)
[info] Updating ...
[info] Packaging ${HOME}/graal-test-app/target/scala-2.12/graal-test_2.12-0.1.0-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Wrote ${HOME}/graal-test-app/target/scala-2.12/graal-test_2.12-0.1.0-SNAPSHOT.pom
[info] Main Scala API documentation to ${HOME}/graal-test-app/target/scala-2.12/api...
[info] Compiling 16 Scala sources to ${HOME}/graal-test-app/target/scala-2.12/classes ...
model contains 40 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging ${HOME}/graal-test-app/target/scala-2.12/graal-test_2.12-0.1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging ${HOME}/graal-test-app/target/scala-2.12/graal-test_2.12-0.1.0-SNAPSHOT.jar ...
[info] Done packaging.
[error] java.io.IOException: Cannot run program "native-image" (in directory "${HOME}/graal-test-app/target/graalvm-native-image"): error=2, No such file or directory
[error] at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
[error] at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:102)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$anonfun$runBuffered$1(ProcessBuilderImpl.scala:150)
[error] at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
[error] at sbt.internal.util.BufferedLogger.buffer(BufferedLogger.scala:101)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:150)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:116)
[error] at com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin$.buildLocal(GraalVMNativeImagePlugin.scala:102)
[error] at com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin$.$anonfun$scopedSettings$7(GraalVMNativeImagePlugin.scala:68)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Caused by: java.io.IOException: error=2, No such file or directory
[error] at java.lang.UNIXProcess.forkAndExec(Native Method)
[error] at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
[error] at java.lang.ProcessImpl.start(ProcessImpl.java:134)
[error] at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[error] at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:102)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$anonfun$runBuffered$1(ProcessBuilderImpl.scala:150)
[error] at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
[error] at sbt.internal.util.BufferedLogger.buffer(BufferedLogger.scala:101)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:150)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:116)
[error] at com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin$.buildLocal(GraalVMNativeImagePlugin.scala:102)
[error] at com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin$.$anonfun$scopedSettings$7(GraalVMNativeImagePlugin.scala:68)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (Graalvm-native-image / packageBin) java.io.IOException: Cannot run program "native-image" (in directory "${HOME}/graal-test-app/target/graalvm-native-image"): error=2, No such file or directory
[error] Total time: 53 s, completed Dec 6, 2019 11:28:53 AM
hi @pascals-ager
thanks for your detailed issue. It seems that you configured on the GraalVMNativeImagePlugin. This just a Format plugin, which doesn't configure any application specific build. You should try to add the JavaAppPackaging archetype plugin
Do you have graal installed? There indicates you haven't
[error] java.io.IOException: Cannot run program "native-image" (in directory "${HOME}/graal-test-app/target/graalvm-native-image"): error=2, No such file or directory
My bad, I assumed that this was going to pull a docker base image with graal installation and run the "native-image" command inside it. I see the err in my assumption now. Thank you. I will try with a local graal installation.
Information
rpm --version
): --> Docker version 19.03.3, build a872fc2Expected behaviour
"
sbt 'show graalvm-native-image:packageBin
generates the native image'"Actual behaviour
plugins.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.5.1")
build.sbt
Am I missing something? Are there some special permissions that need to be set up?
The text was updated successfully, but these errors were encountered: