ALICE Off-line Project Logo Installation ALICE Logo


  1. Install ROOT and define the necessary variables correctly.

  2. Decide where the code will reside (from here on directory).

  3. Define the following global variables in the login script

    ALICE directory
    ALICE_TARGET `uname` (i.e. result of the Unix uname command)
    on all systems but HP-UX
    on HP-UX

    At this point you should logout, login again and check that the symbols are set correctly.

  4. Retrieve the AliRoot code. There are two ways to do this:

  5. install the CERN library part

    $ cd $ALICE_ROOT
    $ gmake cernlibs

  6. Install the ALICE specific software

    $ cd $ALICE_ROOT
    $ gmake

  7. Copy the file $ALICE_ROOT/.rootrc to your home directory

  8. Change to your home directory and run the code

    $ cd
    $ aliroot
    root [1] .x menu.C

Code development and user environment

If the ALICE environment is set up correctly, the $ALICE_ROOT/lib/tgt_$ALICE_TARGET directory is in the shared libraries load path, and the $ALICE_ROOT/bin/tgt_$ALICE_TARGET directory is in the PATH variable. This means that the command aliroot will in fact correspond to the file $ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot.

This is convenient for the normal user, but as soon as the user wants to modify one or more directories, this arrangement becomes inefficient because if a local copy of one of the shared libraries is remade, the linker will always find the official unmodified one that sits in the above directory before the local one in the load library path. Moreover, and unless the full path is specified, the local version of the aliroot executable will be ignored and the official version executed.

Therefore in order to develop one or more packages locally (let's say the TPC) and make modifications, the following steps should be performed. We suppose here that the remote cvs server has been setup correctly as explained in the code management section.

$ mkdir AliRoot create the working directory
$ cd AliRoot set default to it
$ mkdir pro create pro subdirectory
$ cd pro set default to it
$ ln -s $ALICE_ROOT/* ./ link all files here
$ rm lib remove link for library, we need a local file here to containing the new TPC library
$ rm bin remove link for bin directory, we need it to rebuild aliroot executable
$ rm TPC remove link for TPC subdirectory, we need the real files here
$ rm ALIROOT remove link to ALIROOT subdirectory, may be this is not really necessary on all systems, but we do it just to be on the safe side
$ cvsa co TPC get from the cvs server the TPC files to be modified
$ cvsa co ALIROOT get from the server the ALIROOT files to recreate the executable
$ mkdir -p lib/tgt_$ALICE_TARGET create library directory
$ cd lib/tgt_$ALICE_TARGET set default to the lib directory
$ ln -s $ALICE_ROOT/lib/* ./ link all libraries here
$ rm remove link to TPC library, we need a real one
$ changeRoot $HOME/AliRoot change the AliRoot root to $HOME/AliRoot
$ rehash make sure that the new PATH is taken into account by the shell
$ cd $ALICE_ROOT/TPC (1) set default to TPC directory
$ make macroclean clean up all objects
$ emacs AliTPCv1.cxx (2) edit all the files...
$ make (3) recreate ../lib/
$ cd ../ALIROOT set default to ALIROOT directory
$ make macroclean clean up object files
$ make make new executable
$ cd directory (4) set default elsewhere
$ aliroot (5) run aliroot

Steps 1-5 are the normal development cycle after the first pass through the procedure.

by Federico Carminati