Installer for srcML, srcDiff, srcReader, srcMove, srcReader developer environments. Easy to configure for your development environment. Manage all your projects related to srcML in one place.
The official srcML and srcDiff build instructions can be extremely difficult to set up. Quirks with Cmake, Ninja, and directories paths are all handled automatically.
Think of it as a friendly guideline for installing srcML and srcDiff on a normal Debian/Ubuntu Linux setup. You can download these, run them in sequence, and change them where they don't work. Update these templates if requirements change.
This repo bundles many scripts:
prereq_install_ubuntu.shInstalls all packages needed to build srcML + srcDiff from source (including Kitware’s CMake).build_srcML.shBuilds srcML using its officialci-ubuntupreset and installs it locally into a workspace directory.build_srcDiff.shBuilds srcDiff against the locally-installed srcML and handles the required submodule updates.
Includesh configuration for debug adapter protocols.
These scripts are meant to make things reproducible, simple, and non-destructive. Everything installs into your chosen workspace — no system-wide pollution.
-
Clone this repo anywhere you want:
git clone git@github.com:NickStafford2/SrcMLBuildTemplate.git cd srcMLBuildTemplate -
Make all scripts executable:
chmod +x prereq_install_ubuntu.sh build_srcML.sh build_srcDiff.sh test_src_tools.sh
-
Install prerequisites (only needed once per system):
./prereq_install_ubuntu.sh
-
Build srcML:
./build_srcML.sh
This uses the upstream “ci-ubuntu” CMake preset and installs into:
./srcML-installNo sudo, nothing system-wide.
-
Build srcDiff:
./build_srcDiff.sh
This script:
- ensures the srcDiff repo exists
- pulls/update submodules (mandatory)
- configures using
-DsrcML_DIR=.../srcML-install/share/cmake/srcml - builds using Ninja
- These scripts intentionally reinstall nothing system-wide except CMake (which Ubuntu often ships outdated).
- If you’re using CI, containers, or want a reproducible local build, this setup removes most friction.
- If something breaks, it’s likely upstream — not here. At least now you’ll get a readable error instead of a cryptic one.
- Only tested on Ubuntu 24.04/22.04.
- Requires
sudoonce (for package install + Kitware repo). - The scripts expect a sane workspace layout, but they don’t enforce it — they just use the directory they’re in unless you pass a path explicitly.
These scripts are “guidelines” — not gospel — but if the official instructions let you down, this should get you from zero to a working srcML/srcDiff setup with far fewer headaches.
If you find a bug, feel free to fix it and pretend I wrote it correctly the first time.