sbt:testt> nativeImage
[info] Compiling 1 Scala source to /tmp/tmp.jPSIv0tyLa/testt/target/scala-2.13/classes ...
[error] stack trace is suppressed; run last nativeImage for the full output
[error] (nativeImage) java.nio.file.NoSuchFileException: /tmp/tmp.jPSIv0tyLa/testt/target/native-image-internal/manifest.jar
[error] Total time: 5 s, completed 30 Aug 2020, 01:36:15
sbt:testt> last nativeImage
[error] java.nio.file.NoSuchFileException: /tmp/tmp.jPSIv0tyLa/testt/target/native-image-internal/manifest.jar
[error] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
[error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
[error] at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
[error] at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
[error] at java.base/java.nio.file.Files.newOutputStream(Files.java:219)
[error] at sbtnativeimage.NativeImagePlugin$.createManifestJar(NativeImagePlugin.scala:186)
[error] at sbtnativeimage.NativeImagePlugin$.$anonfun$projectSettings$20(NativeImagePlugin.scala:143)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (nativeImage) java.nio.file.NoSuchFileException: /tmp/tmp.jPSIv0tyLa/testt/target/native-image-internal/manifest.jar
Creating the native-image-internal subdirectory fixes the problem.
In a plain new sbt project with the configuration from the README plus
I got the following error:
Creating the
native-image-internal
subdirectory fixes the problem.Installation:
GraalVM Version 20.2.0 (Java Version 11.0.8)