Spoofax can be run on macOS, Linux, and Windows. Building is directly supported on macOS and Linux. Building on Windows is supported through the Windows Subsystem for Linux (Bash on Windows).
The following tools are required to build and develop Spoofax:
- Git 1.8.2 or higher
Required to check out the source code from our GitHub repositories. Instructions on how to install Git for your platform can be found here: http://git-scm.com/downloads.
If you run macOs and have Homebrew installed, you can install Git by executing
brew install git. Confirm your Git installation by executing
- Java JDK 8 or higher
Required to build and run Java components. The latest JDK can be downloaded and installed from: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
On macOs, it can be a bit tricky to use the installed JDK, because Apple by default installs JRE 6. To check which version of Java you are running, execute the
java -versioncommand. If this tells you that the Java version is 1.8, everything is fine. If not, the Java version can be set with a command. After you have installed JDK, execute:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Such an export is not permanent. To make it permanent, add that line to
~/.bashrcor equivalent for your OS/shell (create the file if it does not exist), which will execute it whenever a new shell is opened.
Confirm your JDK installation and version by executing
- Python 3.4 or higher
Python scripts are used to orchestrate the build. Instructions on how to install Python for your platform can be found here: https://www.python.org/downloads/.
If you run macOs and have Homebrew installed, you can install Python by executing
brew install python3. Confirm your Python installation by executing
python --version, depending on how your package manager sets up Python.
During the build, Pip will install some Python dependencies into a virtual environment. No extra Python dependencies are required for this (with one small exception, see the note below). The latest version of Pip will automatically be installed inside the virtual environment.
Debian and derivatives (like Ubuntu) do not include the full standard library when installing Python (bug 1290847), so you will need to install
python3-venvto make sure the virtual environment can be created.
- Maven 3.5.4 or higher (except Maven 3.6.1 and 3.6.2)
Required to build most components of Spoofax. Our Maven artifact server must also be registered with Maven since the build depends on artifacts from previous builds for bootstrapping purposes. We explain how to install and set up Maven in the next section.
- Maven Daemon 0.6.0 or higher
- Required run a full build of Spoofax with some speedup. This is a separate project and is not installed with Maven. Install as instructed here: https://github.com/mvndaemon/mvnd#how-to-install-mvnd.
- Required on macOS to be able to run the
implodePTlegacy binaries. On macOS with Homebrew installed, you can install them by running
brew install coreutils.
- Required on macOS Catalina, Big Sur, and newer to be able to run the
implodePTlegacy binaries. Install it though the Docker for Mac website.