|
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
|
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).
| 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.
| 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's official apt repository, in an Ubuntu terminal:
The docker-compose-plugin is the important package: the scripts call docker compose (with a space).
The scripts are bash and are tested on macOS and Ubuntu only; run everything from inside WSL, not from Windows.
If python3 -m venv fails during the Robot setup, install python3-venv.
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).
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 |
| 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) |
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.