How to build and run zinc (scala incremental compiler) on ubuntu

786 views Asked by At

I have downloaded zinc and run

  sbt universal:packageZipTarball

per the (sparse ..) README.md

Afterwards we see a "zinc" binary here:

$ find . -name zinc -executable -type f ./src/universal/bin/zinc

So trying to run this:

src/universal/bin/zinc -scala-home /home/ubuntu/scala-2.11.7 -nailed -start

Gives a loop that finally bails:

+ attempts=31
+ sleep 0.1
+ check_port 3030
+ can_netcat
+ type -P nc
+ check_port_netcat 3030
+ nc -z -n -w 1 127.0.0.1 3030
+ [[ 31 -eq 0 ]]
+ attempts=30
+ sleep 0.1
+ check_port 3030
+ can_netcat
+ type -P nc
+ check_port_netcat 3030

.. etc until attempts reaches 0 ait which point:

+ return 1
+ exitcode=1
+ false
+ exit 1

I also tried running this via sudo - no difference. so .. what is the magic to get zinc to start? I am on ubuntu.

1

There are 1 answers

0
VonC On

As a workaround, you can now try (Dec. 2016, one year later) the Linux version of the Scala IDE 4.5: see its release notes.

It does include zinc, the stand-alone version of sbt’s incremental compiler and can be used as an alternative to scalac. Meaning Scala IDE uses incremental compilation.

http://scala-ide.org/resources/images/sdk-4.0.0.png