scala-cli
scala-cli copied to clipboard
Support for aarch64/arm64 linux
Is your feature request related to a problem? Please describe. Scala-cli cannot be installed on Raspberry Pi 400 running Bullseye arm64/aarch64 using SDKMAN!
Describe the solution you'd like Please add support for building scala-cli on aarch64 linux and provide packages for SDKMAN!.
Describe alternatives you've considered I tried to build it myself using the source files, but the build stops with an error message.
Additional context
$ uname -a
Linux raspberrypi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64 GNU/Linux
$ sdk install scalacli
Stop! scalacli 0.1.2 is not available. Possible causes:
* 0.1.2 is an invalid version
* scalacli binaries are incompatible with your platform
* scalacli has not been released yet
Tip: see all available versions for your platform:
$ sdk list scalacli
Error while building:
$ ./mill cli.nativeImage
Compiling /home/pi/Projects/pi/scala-cli/project/deps.sc
Compiling /home/pi/Projects/pi/scala-cli/project/settings.sc
Compiling /home/pi/Projects/pi/scala-cli/project/publish.sc
Compiling /home/pi/Projects/pi/scala-cli/build.sc
[1/489] de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState
[25/489] stubs.compile
[info] compiling 2 Java sources to /home/pi/Projects/pi/scala-cli/out/stubs/compile/dest/classes ...
[info] done compiling
[39/489] stubs.publishLocalNoFluff
Publishing Artifact(org.virtuslab.scala-cli,stubs,0.1.3-SNAPSHOT) to ivy repo /home/pi/Projects/pi/scala-cli/out/repo/0.1.3-SNAPSHOT
[66/489] runner[2.13.8].compile
1 targets failed
runner[2.13.8].compile java.io.IOException: Cannot run program "scala-cli" (in directory "/home/pi/Projects/pi/scala-cli"): error=2, Datei oder Verzeichnis nicht gefunden
java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
os.proc.proc$lzycompute$1(ProcessOps.scala:128)
os.proc.proc$1(ProcessOps.scala:122)
os.proc.spawn(ProcessOps.scala:135)
os.proc.call(ProcessOps.scala:76)
ammonite.$file.project.settings$ScalaCliCompile.$anonfun$compile$2(settings.sc:730)
mill.define.ApplyerGenerated.$anonfun$zipMap$5(ApplicativeGenerated.scala:13)
mill.define.Task$MappedDest.evaluate(Task.scala:396)
java.io.IOException: error=2, Datei oder Verzeichnis nicht gefunden
java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
os.proc.proc$lzycompute$1(ProcessOps.scala:128)
os.proc.proc$1(ProcessOps.scala:122)
os.proc.spawn(ProcessOps.scala:135)
os.proc.call(ProcessOps.scala:76)
ammonite.$file.project.settings$ScalaCliCompile.$anonfun$compile$2(settings.sc:730)
mill.define.ApplyerGenerated.$anonfun$zipMap$5(ApplicativeGenerated.scala:13)
mill.define.Task$MappedDest.evaluate(Task.scala:396)
$ ./scala-cli
native-image launcher not built yet.
In order to build it, go in /home/pi/Projects/pi/scala-cli, and run
./mill cli.nativeImage
Okay, my bad. You need to have scala-cli installed in order to build scala-cli. The build error goes away after installing the Java version of scala-cli.
@josefwegner Thanks for reporting, For now, scala-cli doesn't support aarch64/arm64 architecture. In the future, scala-cli will be distributed also on this architecture, stay tuned.
Yea, you need to install scala-cli to build scala-cli. I think that Scala CLI should change that. So, for scala-cli will be used to build scala-cli only on architecture, where scala-cli was published. I will open a PR.
More and more people are getting MacBook M1 laptops thus making it more urgent.
Here is available launcher for Linux Aarch64.
Thank you very much. The aarch64 version works great on my Raspberry Pi 400. I worked through the scala-cli tutorial without any issues.