Build Storm from Source
This guide shows you how to obtain the source code of Storm and build it. This installation method is recommended if you either
- want to make changes to the Storm code base,
- can not use a supported package manager (Homebrew, AUR), or
- need to avoid overhead from virtualization due to Docker or VM usage.
While compiling the source code is not always a breeze (depending on your operating system), we spent some effort on making this process as easy as possible.
Supported Operating Systems
Currently, we provide support for
- macOS on either x86- or ARM-based CPUs
- Debian 12 and higher
- Ubuntu 22.04 and higher
- Arch Linux
which are known to enable the easy installation of Storm. Other Linux distributions are likely to work too, but it may take significant effort to get the required versions of the dependencies up and running. Building on Windows is currently not supported and we recommend to use either a Docker container or VM image.
Dependencies
We are going to assume that all necessary dependencies have been installed on the machine in default locations so they can be found by our build machinery.
If you just want to run Storm and you want to run it natively on your machine, then we recommend installing it via a package manager or using the Docker container. However, if you want or need to make changes to the Storm code base, you have to obtain the source code and build it yourself. While this is not always a breeze (depending on your operating system), we spent some effort on making this process as easy as possible.
Obtaining the Source Code
The source code of the latest stable release can be downloaded from GitHub. You can either clone the git repository
$ git clone -b stable https://github.com/moves-rwth/storm.git
or download a zip archive with the latest stable release:
$ wget https://github.com/moves-rwth/storm/archive/stable.zip
$ unzip stable.zip
or obtain one of the archived versions available at
If you want the most recent version of Storm rather than the stable version, you can replace the -b stable
with -b master
when cloning the repository or use the archive https://github.com/moves-rwth/storm/archive/master.zip, respectively.
In the following, we will use STORM_DIR
to refer to the root directory of Storm. If you want, you can set an environment variable to ease the following steps via
$ export STORM_DIR=<path to Storm root>
Before proceeding with the following steps, make sure that you have set up all dependencies as required.
Configuration Step
Below, we are going to build a standard version of Storm. There are plenty of configuration options, please check our configuration guide if you want to build a non-standard version. Most notably, you will have to set additional options if you want to include solvers that are not shipped with Storm (for example Gurobi or MathSAT). However, the defaults should be suitable in most cases.
Switch to the directory STORM_DIR
and create a build folder that will hold all files related to the build (in other words, building is done out-of source, in-source builds are strongly discouraged and are likely to break). Finally change to the build
directory.
$ cd $STORM_DIR
$ mkdir build
$ cd build
Then, use cmake to configure the build of Storm on your system by invoking
$ cmake ..
Check the output carefully for errors and warnings. If all dependencies are properly installed and found, you are ready to build Storm and move to the next step. In case of errors, check the dependencies, consult the troubleshooting guide and, if necessary, file an issue.
Build Step
If the configuration step went smoothly, the compilation step should run through.
To compile all of Storm’s binaries including all tests, enter
$ make
To only build the binaries (available from version 1.1 on), enter
$ make binaries
If you just want to compile Storm’s main command-line interface, typing make storm-cli
suffices. To see which targets you need to build, we refer to the table of available executables.
If you have multiple cores at your disposal and at least 8GB of memory, you can execute
make storm-cli -j${NUMBER_OF_CORES}
to speed up compilation.
Adding Storm to your Path optional
If you want to be able to run Storm from anywhere, you may want to add it to your path (in the tutorial on how to run Storm this is assumed). You can do so, by
$ export PATH=$PATH:$STORM_DIR/build/bin
where $STORM_DIR
is the environment variable set earlier.
Test Step optional
We recommend to execute it to verify that Storm produces correct results on your platform. Invoking
$ make check
will build and run the tests. In case of errors, please do not hesitate to file an issue.