Build & Install

Once all mandatory and optional software has been installed and you have an up-to-date copy of the sources of the KaliVeda branch that you want to compile, you are ready to build.

We present here the simplest example of building & installing KaliVeda, using only default settings. Note that this will not compile any of the software which is specific to certain (multi)detectors (INDRA, FAZIA, etc.). For a detailed explanation of the build options, including how to enable INDRA- or FAZIA-specific software, see here.

In the following, S is the top directory of your source tree, B is where you want to build the toolkit, and I is where you want to install the toolkit. Please note that all three of S, B, and I must be different directories. Also note that B is a temporary directory just used for compilation: after installation, B can be deleted if required.

Configure the build
Configuring the build means choosing options concerning which parts of the software you want to compile, where you want to install it, and how. See here for the full list of options.
[do the following anywhere except in S or I] $ mkdir B $ cd B $ cmake S -DCMAKE_INSTALL_PREFIX=I
Compile and install
[do the following in build directory B] $ make [-j[number of CPUs on multicore machine]] install

On a single-core machine, just type 'make install'. On a multi-processor machine the build process can be considerably speeded-up by performing the compilation in parallel. For example, on a quad-core machine, type 'make -j4 install' etc.

Setting up the environment
After installing, you can use one of the following scripts to set up the necessary paths on your system to find the executables and run-time libraries (they are based on the equivalent scripts for setting up ROOT, which we recommend you use also). Choose the right script for your shell:
$ source I/bin/thiskaliveda.csh [(t)csh shell] $ . I/bin/thiskaliveda.sh [(ba)sh shell]
where I is your installation directory. On (t)csh machines, you will probably need to follow this with a call to the 'rehash' system function before proceeding. After doing this you should be able to do e.g.:
$ kaliveda-config --version 1.11/01 $ kaliveda *********************************************************** * HI COQUINE !!! * * * * W E L C O M E to K A L I V E D A * * * * Version: 1.11/01 Built: 2020-05-18 * * git: heads/master@release-1.11.00-26-g35b7e473 * * * * For help, see the website : * * http://indra.in2p3.fr/kaliveda * * * * ENJOY !!! * *********************************************************** kaliveda [0]

To setup the KaliVeda paths every time you login to your system, place the call to thiskaliveda.(c)sh at the end of whatever login script is appropriate for your shell, a slight modification is required for (t)csh shells:
source I/bin/thiskaliveda.csh I [(t)csh shell]
Rebuild after updating sources
In the future, after updating the sources in S using git pull, return to B (or create a new build directory if it was deleted) and repeat the cmake and make steps. In case of problems with either step, delete B and start afresh with a new build directory.