If you are interested in building third party modules then you have to build a version of Rack from source. You will not be able to use a binary version of Rack.
There are three main variations depending on whether you want to build the latest (development) version, a release version, or a specific 'commit'.
WARNING: Running these commands in the same place as an existing Rack installation will wipe out a previous installation. Use at your own risk and backup anything you want to keep or run the commands in a safe location (e.g. a new directory).
Building the development (dev) version gives you the latest and greatest but also potential instability. Some third party module developers work with the dev version so if you want to see what they are working on prior to both Rack and their next binary releases then building the dev version is your only option.
It is actually the simplest of the three options to build:
rm -rf Rack # Remove previous Rack installation (if exists)
git clone https://github.com/VCVRack/Rack.git # Clone the Rack GitHub repository
cd Rack # Change to the Rack directory
git submodule update --init --recursive # Retrieve submodule repositories
make dep # Build the dependencies
make # Build Rack
Many third party module developers build their modules against the most recent release version, rather than the development version.
When a binary version of Rack is released the source that builds that version is tagged with a release version signifier, for example, v0.4.0.
To build a release version you still clone the main repository but then 'checkout' the specific version you want from the repository's history:
rm -rf Rack # Remove previous Rack installation (if exists)
git clone https://github.com/VCVRack/Rack.git # Clone the Rack GitHub repository
cd Rack # Change to the Rack directory
git checkout v0.4.0 # Checkout version 0.4.0
git submodule update --init --recursive # Retrieve submodule repositories
make dep # Build the dependencies
make # Build Rack
The checkout command will produce an output like this:
Note: checking out 'v0.4.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
This is nothing to worry about, just ignore it and carry on.
You may find that when you build the latest development version that something is unstable, or that the third party modules that you were using yesterday are no longer working in the latest version. You can go back to a previous version in the repository's history with another type of checkout command.
On Rack's GitHub page you will find a list of commits. After finding what you think might be the historical point you wish to return to you can click the clipboard icon to copy the identifying string ('hash') and paste it into your terminal:
rm -rf Rack # Remove previous Rack installation (if exists)
git clone https://github.com/VCVRack/Rack.git # Clone the Rack GitHub repository
cd Rack # Change to the Rack directory
git checkout b31d4fb5ed873a0763fc4a451838603780db4e45 # Checkout specific commit
git submodule update --init --recursive # Retrieve submodule repositories
make dep # Build the dependencies
make # Build Rack
The build process for make may be parallelised across multiple processor cores by issuing the command 'make -jN' where N is the number of cores in your CPU(s). You don't have to use all your cores but the more you use the faster the build process will become.
A good rule of thumb for the fastest build is N+1 (the plus one being the master make process, which does not use up any processor time once it sends out the parallel build instruction to the cores). Logical cores are just as usable as physical cores. Thus, for example, many modern i5 processors are quad-core and thus the build command would be ‘make -j5'; many modern i7 processors are quad-core with 'hyper-threading', meaning that whilst they have four physical cores, they have eight logical cores, thus the build command would be 'make -j9'.
In the build scripts on this site you can easily produce a version for you own system by opening the script in a text editor and searching and replacing all the occurrences of ' -j9' with, for example, ' -j5'. (Alternatively, just run the vanilla build script, which does not parallelise the build, and go and make a coffee.)
On the Scripts page you will find scripts that build Rack for release and development versions.