Installing O2 and O2Physics
ALICE software has several dependencies: aliBuild takes care of downloading them for you. aliBuild can also automatically download precompiled binaries if possible.
Follow the instructions here. Do not follow "build the packages" on that page.
Prepare your source code
We assume your work area is
Start with a clean shell where you are not in an
Create the directory and move to it (all the following commands need to be executed in this folder):
mkdir -p ~/alice cd ~/alice
Download O2 and O2Physics:
aliBuild init O2@dev aliBuild init O2Physics@master
If you perform
ls under your work directory, you will see the packages you have downloaded via
aliBuild init, plus an
alidist directory contains software recipes, telling aliBuild how the software is built. Your
alidist directory and your software source code are Git directories managed by you: you need
to keep them up-to-date manually.
Check your prerequisites
aliDoctor will warn you that some packages have to be built as they could not be found from the system.
Build and rebuild
aliBuild build O2Physics
See the Troubleshooting section for debugging tips if the build fails.
Use your local software installations
You will not find the packages you have built immediately available on your shell: we provide a tool
alienv that configures your shell according to the packages you want to load.
capable of switching between different versions of the same package without a hassle.
List your available packages with:
Load the latest version you have built of a package (O2Physics for instance):
alienv enter O2Physics/latest
⚠️ Dependencies are loaded automatically. Do not attempt to load O2 or ROOT as well, you will
find them automatically in the environment!
alienv enter is verbose and will inform you about the
loaded packages if you have doubts.
alienv enter command drops you to a new shell. Unload the packages by simply exiting it with
Building partially for development using ninja
This requires that the O2Physics build succeeded. Enter the environment as explained in the previous step specifying in addition the ninja package:
alienv enter O2Physics/latest ninja/latest
Go to the build directory
You can now rebuild and install entire O2Physics with
or just a specific directory with
You can redirect the terminal output to the standard aliBuild log file and see whether the build succeeded:
ninja install > ../log 2>&1 && echo "Good" || echo "Bad"
A specific executable can be built in the staging directory
The executable can then be executed directly from the staging directory:
This only builds O2Physics. If you have updated O2 or alidist, you first need to do a full build with aliBuild. Then enter the environment again before using ninja.