Install from source

Prerequisites

  • C++ compiler (choose either one below)

    • gcc ≥ 15

    • clang ≥ 20

  • ROOT ≥ 6.32 (optional)

  • CMake ≥ 3.28

  • Conan ≥ 2.8.0

  • nodejs ≥ 22.9.0 (optional)

Warning

DO NOT USE Conda to install ROOT. Either install ROOT from your system package mamanger or build and install it from the source.

Install prerequisites

MacOS

Use Homebrew to install the prerequisites:

sudo brew update
sudo brew install llvm cmake conan nodejs root

Fedora 41

sudo dnf update
sudo dnf install -y cmake clang root conan nodejs

Debian-based Linux (Debian, Ubuntu, Mint, etc.)

Since Debian-based distros only provide outdated software, installing the prerequisites software for Debian based distros is the most complicated. Therefore, it’s highly recommended to use the pre-built package from the Download the project.

All dependent programs have to be installed either from source and some can be installed from a third-party package manager like Conda.

To install Conda, please check this instruction:

To install CMake, conan and nodejs with conda:

conda install -c conda-forge cmake nodejs conan

The rest of prerequisites, namely gcc and clang compilers, have to be installed from their source. Please check the following links for their installation:

Build the project

Step 1: Clone the latest version

git clone -b [latest version] https://github.com/YanzhaoW/srs-control.git
cd srs-control
git submodule update --init

Step 2: Build the source

cmake --workflow --preset default

or

cmake --preset default -DCMAKE_INSTALL_PREFIX=[/usr/local] [optional settings]
cmake --build ./build --target install -- -j[nproc]

Speed up the building process

The building process could take a long time at the first time because the package manager (conan) needs to build the dependencies from the source as well. Thus, if your system can provide these dependencies, it may be faster to first install the pre-built binaries from your system package manager:

dnf install boost-devel protobuf-devel protobuf-lite-devel protobuf-compiler

Then enable the USE_SYSTEM_LIBRARIES with CMake:

cmake --preset default -DCMAKE_INSTALL_PREFIX=[/usr/local] -DUSE_SYSTEM_LIBRARIES=ON
cmake --build ./build --target install -- -j[nproc]

Please check this page about the “optional settings”: