RBC_Template 0.1.0 build 5fb9afb
Workspace master specification — safety-related railway software around an ERTMS Radio Block Centre (RBC), CENELEC EN 50128 / SIL 4
Loading...
Searching...
No Matches
RBC_Template workspace: tool requirements

What you need installed to build and test this workspace, on macOS or Linux. Versions below are taken directly from the projects' own build files (cmake_minimum_required, requires-python, requirements.txt), not guessed - see the grep command next to each if you want to re-check it yourself after a change.

This is a dependency reference, not a how-to - see CLAUDE.md for the workspace layout and GEMINI.md for command examples. ./bootstrapWorkspace.sh assumes everything in section 1 below is already installed; it only clones/builds, it does not install compilers or runtimes for you - run ./installDependencies.sh first if you're starting from a bare macOS or Ubuntu/Fedora machine (sections 1-2 below by default; --with-analysis-tools/--with-workspace-tools add sections 4-5; see its own --help).

1. Required for any build

Tool Minimum version Why Check
CMake 3.16 Every C project (cmake_minimum_required(VERSION 3.16)) cmake --version
A C99 compiler any C99-capable AppleClang (Xcode CLT) on macOS, gcc/clang on Linux - CMAKE_C_STANDARD 99 throughout cc --version
git any recent Every subproject is its own repo; submodules for the top-level RBC_Template repo git --version
bash 3.2+ Every .sh script in this workspace is deliberately written to bash 3.2 (macOS's default, no associative arrays) - a newer bash works too, just isn't required bash --version
Python 3.9+ RBC_Test_Sim_Core/RBC_Test_Sim_Train/RBC_Test_Sim_IL/RBC_Test_Sim_CTC's own requires-python = ">=3.9"; also runs every build/test script's own venv creation python3 --version

find . -name CMakeLists.txt -exec grep -H cmake_minimum_required {} \; and find . -name pyproject.toml -exec grep -H requires-python {} \; are the exact greps behind the CMake/Python rows above.

macOS**: install Xcode Command Line Tools (xcode-select --install) - this alone provides cc/clang, git, and system headers. CMake and Python are not bundled with Xcode CLT; get them via Homebrew (brew install cmake python3) or python.org.

Linux**: sudo apt-get install build-essential cmake python3 python3-venv git (Debian/Ubuntu) or sudo dnf install gcc gcc-c++ cmake python3 git (Fedora/RHEL). python3-venv specifically - Debian/Ubuntu split it out of the base python3 package; every build/test script here creates its own venv (python3 -m venv ...) and fails immediately without it.

2. Required for the Robot Framework test suites

Tool Minimum version Why Check
Robot Framework 7.0 test/RBC_Test_Env/robot/requirements.txt (robotframework>=7.0) - installed automatically into a venv by runDockerTests.sh/runLocalTests.sh/runScenario.sh, not something you install yourself (auto-installed)
Docker any recent, with the Compose v2 plugin runDockerTests.sh, setupDockerTestEnv.sh, docker-compose.yml - every script in this workspace uses docker compose (the v2 CLI plugin, space not hyphen), never the standalone docker-compose v1 binary docker compose version

Docker is only needed for runDockerTests.sh and the containers/fault_injection Robot suites specifically - those genuinely need real containers (restart, network partition). runLocalTests.sh (the rbc_scenario suite against plain local processes) needs nothing from this section beyond Python.

macOS**: Docker Desktop bundles Compose v2 - no separate install.

Linux**: install the docker-compose-plugin package alongside Docker Engine (Docker's own install docs cover this per-distro) - a bare apt install docker.io/dnf install docker sometimes omits it, which shows up as docker compose (space) failing with "unknown command" even though plain docker works.

Docker Engine on Ubuntu (also inside WSL2)

Docker's official apt repository, in an Ubuntu terminal:

for p in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove -y $p; done
sudo apt-get update && sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo ${UBUNTU_CODENAME:-$VERSION_CODENAME}) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER # then open a new terminal
docker run --rm hello-world

The docker-compose-plugin is the important package: the scripts call docker compose (with a space).

Windows with WSL2

The scripts are bash and are tested on macOS and Ubuntu only; run everything from inside WSL, not from Windows.

  1. PowerShell as administrator: wsl --install -d Ubuntu, reboot if asked, open the Ubuntu terminal.
  2. Docker: either Docker Desktop for Windows with "Use the WSL 2 based engine" and WSL integration enabled for your Ubuntu distribution, or Docker Engine installed inside Ubuntu as above. Do not use both in the same distribution. Inside Ubuntu, engine installs need systemd: put [boot] and systemd=true in /etc/wsl.conf, then run wsl --shutdown in PowerShell and reopen Ubuntu.
  3. Clone the workspace under the Linux home directory (~/workspace/RBC_Template), never under /mnt/c: shell scripts break on Windows line endings and file access there is very slow. If you clone with Windows git, run git config core.autocrlf false first.
  4. Run ./bootstrapWorkspace.sh (clones every product at its branch tip) and ./installDependencies.sh (compilers and tools; apt is supported).
  5. Give WSL enough memory for the ten test containers and the image builds, about 6 to 8 GB, in UserProfile%\.wslconfig: [wsl2], memory=8GB, processors=4, then wsl --shutdown.
  6. From test/RBC_Test_Env: ./etc/scripts/setupDockerTestEnv.sh build, start, then ./etc/scripts/runDockerTests.sh (add --full for fault injection).

If python3 -m venv fails during the Robot setup, install python3-venv.

3. Optional: cross-compilation toolchains

Only needed if you're building for a platform other than the one you're running on (build.sh platform <target> / build.sh all / build.sh release, or the Docker multi-arch path). A plain local build/test loop (cmake -S . -B build in any C project, or runLocalTests.sh) needs none of this - it uses your host's own native compiler directly.

Toolchain project What it provides macOS install Linux install
platform/toolchains/Platform_Toolchain_MacOS/ Pinned native macOS compiler (AppleClang + optional Homebrew GCC) Xcode CLT (required) + brew install gcc (optional) N/A - macOS-only by design, see its own CLAUDE.md
platform/toolchains/Platform_Toolchain_Linux/ Cross-compilers targeting Linux aarch64/arm/x86_64/i686, glibc and musl brew install (its setup.sh taps messense/macos-cross-toolchains) setup.sh falls back to apt/dnf install instructions (own sudo, not run for you) - coverage is uneven, see its CLAUDE.md's "Linux support" section for exactly which arch/libc combinations apt/dnf actually cover
platform/toolchains/Platform_Toolchain_QNX/ QNX cross-compiler wiring Scaffold only - needs a licensed QNX SDP you provide yourself, not fetchable by any script here same
platform/toolchains/Platform_Toolchain_FreeRTOS/ Bare-metal ARM (Cortex-M) arm-none-eabi-gcc + vendored FreeRTOS-Kernel source brew install arm-none-eabi-gcc@8 setup.sh falls back to apt-get install gcc-arm-none-eabi or dnf install arm-none-eabi-gcc-cs arm-none-eabi-newlib (own sudo, not run for you)

Run each toolchain project's own ./setup.sh after installing its prerequisite above - see that project's own CLAUDE.md for what it actually does (all four are idempotent, gitignored bin//lib// include/, safe to re-run after an update).

4. Optional: static analysis, docs, coverage, sanitizers

All of these are auto-detected (find_program(...) in platform/Platform_RTE/CMakeLists.txt) - a missing one just skips that CMake target with a message, never fails the build.

Tool Used by macOS Linux
cppcheck cmake --build build --target cppcheck (MISRA-relevant static analysis) brew install cppcheck apt-get install cppcheck / dnf install cppcheck
Doxygen cmake --build build --target doc brew install doxygen apt-get install doxygen / dnf install doxygen
gcovr platform/Platform_RTE/scripts/coverage.sh brew install gcovr (or pip install gcovr) apt-get install gcovr / pip install gcovr
Valgrind ctest -T memcheck (RTE_ENABLE_*/MEMORYCHECK_COMMAND auto-detection) not available - Valgrind doesn't support Apple Silicon/modern macOS; ASan/UBSan (below) are the macOS equivalent apt-get install valgrind / dnf install valgrind
ASan / UBSan -DRTE_ENABLE_ASAN=ON / -DRTE_ENABLE_UBSAN=ON built into AppleClang - no install built into gcc/clang - no install

5. Optional: workspace/version-control tooling

Tool Used by Install
gh (GitHub CLI) bootstrapWorkspace.sh (clones every subproject) brew install gh (macOS) / your distro's package or cli.github.com (Linux) - then gh auth login
Conan Every project's own conanfile.py (conan create .) - the alternative to the plain dist/ convention, see CLAUDE.md's Conan section pip install conan (any platform - Conan is a Python package, not OS-specific)

6. Quick check

cmake --version && cc --version && git --version && bash --version && python3 --version
docker compose version # only if you need the Docker test env
gh --version # only if you need bootstrapWorkspace.sh

If all of section 1 (plus Docker for the Docker test path) is present, ./bootstrapWorkspace.sh and runLocalTests.sh/runDockerTests.sh should run end to end. Sections 3-5 are additive - nothing in this workspace hard-fails at configure time because one of those is missing.

./installDependencies.sh (workspace root) installs sections 1-2 for you via Homebrew/apt/dnf, with --with-analysis-tools/--with-workspace-tools flags for sections 4-5 - see its own --help/header comment for exactly what it does and does not do on each platform.