Data Centre for Astrophysics
Astronomy Department of the University of Geneva
Astro ROOT

Installation Guide
Mercury at 14.149 MHz
    It is assumed that ROOT is already installed and the environment variable ROOTSYS is set!
    ${ROOTSYS}/bin and ${ROOTSYS}/lib must be part of the ${PATH} and the ${LD_LIBRARY_PATH} environment variables, respectively.
    In the current version of AstroROOT the same make utilities are used as they are used in the INTEGRAL software of ISDC. The only change compared to the previous version of AstrROOT is the environment variable WORK_ENV which is now replaced by ISDC_ENV.

  1. Define two directories. The first for the source code. The second to install the header files, the compiled library and a few linked program. The second can be ${ROOTSYS}. This has the advantage that the header files and the library are installed in the already known directories ${ROOTSYS}/include and ${ROOTSYS}/lib, respectively. But the installation procedure will create some new subdirectories in ${ROOTSYS} and will copy some more files in the include, the lib and the bin subdirectory.
    But it is also possible that both directories are actually the same.
  2. Untar the downloaded tar file astro_root-5.0.tar.gz in the first directory you choose. It can be any directory, but it should be empty!
    gunzip astro_root-5.0.tar.gz
    tar xvf astro_root-5.0.tar
  3. Set some environment variables.
    ISDC_ENV has to point to the second directory, where you want to install the software.
    PFILES defines the directory the installed programs will look for their parameter files. Note: it should at least include ${ISDC_ENV}/pfiles, because during the installation procedure the parameter files are copied into ${ISDC_ENV}/pfiles. Look into the PIL - user manual for more information about this environment variable. (3 How parameter files are named and where are they looked for?)
    CC and CXX defines the c and c++ compiler, respectively.
    You should use the same compilers ROOT was build with.
    For example for SUN:
    setenv ISDC_ENV ${ROOTSYS}
    setenv CC cc
    setenv CXX CC
    setenv CFLAGS -KPIC
    setenv CXXFLAGS -KPIC
    setenv PFILES ".:${ISDC_ENV}/pfiles:${PFILES}"
    or for linux:
    setenv ISDC_ENV /home/astro_root
    setenv CC gcc
    setenv CXX g++
    setenv CFLAGS -fPIC
    setenv CXXFLAGS -fPIC
    setenv PFILES ".:${ISDC_ENV}/pfiles:${PFILES}"
    in case ISDC_ENV does NOT point to the same directory as ROOTSYS the environment variables PATH and LD_LIBRARY_PATH have to be updated:
    setenv PATH ${ISDC_ENV}/bin:${PATH}
    Note: The environment variables ISDC_ENV, PFILES, PATH and LD_LIBRARY_PATH must be set not only during the installation procedure but also at run time of the executables.
    This can be easily achieved by a script ${ISDC_ENV}/bin/astroroot_init_env.csh as soon as AstroROOT is installed.
  4. Configure the Makefiles
    cd in the directory where you untared the astro_root-5.0.tar.gz file, the first directory. Than type:
  5. Build the library
    Still in the first directory type:
    gmake install
    This will compile all components and will install the necessary files in some subdirectories of ${ISDC_ENV}.
    You need GNU make v 3.79.1!! It will not work with SUN's make, for instance.
  6. An other useful make command
    make distclean
    cleans the source code.
    After this command the environment variables can be reset (3.) and the configure (4.) has to be issued again!

Back to AstroRoot main page.