aliBuild-like builder for NA6PRoot and its dependencies
Project description
na6pbuild
A standalone build tool for NA6PRoot and all its dependencies, inspired by ALICE's aliBuild.
Quick start
# 1. Install na6pbuild (from NA6PRoot repository root)
pip install .
# 2. Check that your system has the required tools
na6pbuild doctor
# 3. Build everything (downloads sources automatically)
na6pbuild build na6proot
# 4. Load the environment
source ~/na6pbuild_sw/env.sh
# 5. Run the simulation
mkdir tst && cd tst
na6psim -n 5 -g $NA6PROOT_ROOT/share/test/genbox.C+
If you prefer editable/developer install:
pip install -e .
Commands
| Command | Description |
|---|---|
na6pbuild build [PKG ...] |
Build packages and their dependencies (default: na6proot) |
na6pbuild list |
Show all packages, their versions and build status |
na6pbuild env [PKG ...] |
Print shell export statements to load the environment |
na6pbuild clean PKG [...] |
Delete build artifacts and install prefix for a package |
na6pbuild doctor |
Check that all required system tools/libraries are present |
Common options
| Option | Description |
|---|---|
--work-dir DIR / -w DIR |
Directory for sources, builds and installs (default: ~/na6pbuild_sw, or $NA6PBUILD_WORK_DIR) |
--jobs N / -j N |
Parallel build jobs (default: number of CPU cores) |
--force / -f |
Rebuild even if already installed |
--<pkg>-version VER |
Override the version of a specific package |
Packages and dependency graph
boost ──────────────────────────────────────────► na6proot
fmt ────────────────────────────────────────────► na6proot
└─► fairlogger ──────────────────────► na6proot
root (needs boost) ─────────────────────────────► na6proot
└─► vmc ─────────────────────► na6proot
└─► vgm (+ geant4) ──────────► na6proot
└─► hepmc3 ──────────────────► na6proot
└─► pythia8 ────────► na6proot
geant4 ─────────────────────────────────────────► na6proot
└─► geant4vmc (root+vmc+vgm) ──────────► na6proot
Default versions
| Package | Default version |
|---|---|
| Boost | 1.84.0 |
| fmt | 10.2.1 |
| FairLogger | 1.11.1 |
| ROOT | 6.32.02 |
| Geant4 | 11.2.2 |
| VMC | 2.1 |
| VGM | 5.3 |
| Geant4VMC | 6.6 |
| HepMC3 | 3.2.7 |
| Pythia8 | 8312 |
Override any version on the command line:
python3 na6pbuild/na6pbuild build --root-version 6.30.06 na6proot
or via environment variables:
ROOT_VERSION=6.30.06 python3 na6pbuild/na6pbuild build na6proot
Work directory layout
~/na6pbuild_sw/
sources/ # unpacked source trees
builds/<pkg-ver>/ # CMake build directories
sw/<pkg>/<ver>/ # installation prefixes
logs/<pkg>.log # build logs
env.sh # generated environment script
.na6pbuild_state.json # build state tracker
System prerequisites
Run na6pbuild doctor to check. Required system packages (Ubuntu/Debian names):
cmake git curl make g++ pkg-config
libssl-dev libxml2-dev libxerces-c-dev libexpat-dev
libhdf5-dev python3-dev
libx11-dev libxpm-dev libxft-dev libxext-dev # for ROOT graphics
Recipes
Each package has a shell recipe in na6pbuild/recipes/<pkg>.sh. A recipe receives:
| Variable | Description |
|---|---|
$BUILD_AREA |
Work directory root |
$INSTALL_PREFIX |
Where to install this package |
$JOBS |
Parallel build jobs |
$<PKG>_VERSION |
Version being built |
Inside a recipe you can call na6pbuild_prefix <pkg> to get the install prefix of any already-built dependency:
ROOT_DIR="$(na6pbuild_prefix root)/cmake"
FlukaVMC (optional)
FlukaVMC requires a licensed copy of FLUKA and cannot be downloaded automatically. If you have it:
- Install FlukaVMC manually to some prefix (e.g.
~/fluka_vmc). - Pass
-DFlukaVMC_DIR=~/fluka_vmc/lib/cmake/FlukaVMCwhen building na6proot:# Edit na6pbuild/recipes/na6proot.sh and add the -DFlukaVMC_DIR line, # then rebuild with --force: python3 na6pbuild/na6pbuild build --force na6proot
Troubleshooting
ROOT build fails with read jobs pipe: Bad file descriptor
This is typically a GNU Make jobserver issue inside ROOT's optional clad plugin build.
na6pbuild disables clad in the ROOT recipe to avoid it.
If you already started a failed ROOT build, clean and rebuild ROOT:
na6pbuild clean root
na6pbuild build root
Then continue with NA6PRoot:
na6pbuild build na6proot
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file na6pbuild-0.1.0.tar.gz.
File metadata
- Download URL: na6pbuild-0.1.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92221d60812d8522fdd16c0eb005f28ed94002f984153e6473b27496620c5f49
|
|
| MD5 |
313bf7b1b52f0c1b0d9ab7a3e0c027d6
|
|
| BLAKE2b-256 |
bb51d17721a2f7668aad1bf1724647d5a62a81ccdff6f8a558c030535c01144f
|
File details
Details for the file na6pbuild-0.1.0-py3-none-any.whl.
File metadata
- Download URL: na6pbuild-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86cc599653c0d8d3a51162cbbef1fb63df1f085e81d5b6fad6cf5105a9cffc4f
|
|
| MD5 |
4ab22c56097b37c29ebadaa01308384f
|
|
| BLAKE2b-256 |
c80d77a4806a3a2f77f6f747e33bfd4c650aed7bc7f6c18d112c4a9fe6d68052
|