Installing HEASoft - Fedora (or RPM-based) Linux


Instructions for Source Code or Pre-Compiled Binary distributions



  • SOURCE CODE INSTALLATION (Recommended):
    • Installations from the source code are recommended over the pre-compiled binaries due to the lack of portability of pre-compiled Perl libraries and other potential portability issues. Note that installations from the source code distribution are required for users who wish to load local models in Xspec or use the Xspec Python interface (PyXspec).

      The instructions below assume that you have already acquired a HEASoft tar file and have unpacked it (using e.g. "tar zxf [tar file]") on your machine.

    • Prerequisite packages:

      If they aren't installed already, you will need to install (using the "yum" package manager) a few other packages which are needed in order to build HEASoft from the source code distribution:
          $ sudo yum -y install zlib-devel
          $ sudo yum -y install ncurses-devel
          $ sudo yum -y install libcurl-devel
          $ sudo yum -y install libXt-devel
          $ sudo yum -y install readline-devel
          $ sudo yum -y install gcc gcc-c++
          $ sudo yum -y install gcc gcc-gfortran   (or: "gcc gcc-fortran")
          $ sudo yum -y install perl-devel
          $ sudo yum -y install perl-ExtUtils-MakeMaker
          $ sudo yum -y install python3-devel [or python-devel]
          $ sudo yum -y install numpy [only needed for the HEASP Python interface]
          $ sudo yum -y install make
      
          This may also be necessary on newer OS:
      
          $ sudo yum -y install redhat-rpm-config
      
          (Note that the "yum" utility has been replaced by "dnf" on newer systems but the syntax is the same.)
      
      Note for users of CentOS 7.x: On CentOS 7, the default GNU compiler suite is v4.8, which is not supported for building HEASoft. CentOS 7 users may install a newer 'devtoolset' compiler suite for use in building HEASoft, in the following way (for example):
          $ sudo yum -y install devtoolset-9
          $ scl enable devtoolset-9 bash
      
          Locate the devtoolset-9 installed directories:
      
          $ gcc -print-search-dirs
          /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9
      
          In the next step, set the compiler variables accordingly (for example):
      
          $ export CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
          $ export CXX=/opt/rh/devtoolset-9/root/usr/bin/g++
          $ export FC= /opt/rh/devtoolset-9/root/usr/bin/gfortran
      
          You will likely also need to update your LD_LIBRARY_PATH to include
          the path to the libraries needed by these compilers (for example):
      
          $ export LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib
      
    • Building the software:

      After installing the prerequisite packages above, most users should just follow the basic GNU-like build procedure outlined in the HEASoft installation guide, i.e.:

      First, make sure that the configure script will choose the correct set of compatible compilers for the build, for example:
       In C-shell variants (tcsh/csh):       In Bourne shell variants (bash/sh/zsh):
      
          $ setenv CC /usr/bin/gcc              $ export CC=/usr/bin/gcc
          $ setenv CXX /usr/bin/g++             $ export CXX=/usr/bin/g++
          $ setenv FC /usr/bin/gfortran         $ export FC=/usr/bin/gfortran
          $ setenv PERL /usr/bin/perl           $ export PERL=/usr/bin/perl
          $ setenv PYTHON /usr/bin/python3      $ export PYTHON=/usr/bin/python3
      
      External packages (e.g. Anaconda) may set compiler flags in the environment which can break a HEASoft build, so users are also advised to unset all "FLAGS" variables:
          $ unsetenv *FLAGS                     $ unset CFLAGS CXXFLAGS FFLAGS LDFLAGS
      
      Alternatively, users may alter their session to cancel any Anaconda or other package initialization by editing their profile or other shell resource files.

      Other software packages (e.g. XMM-SAS) may change your LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Macs) environment variable, and this can break a HEASoft build, so users are advised to check their [DY]LD_LIBRARY_PATH variable and remove any paths that aren't necessary. Typically none should be needed and this variable can remain empty when building HEASoft unless you are using a custom compiler suite for the build.

      Next, configure and build the software:
          $ cd heasoft-6.29/BUILD_DIR/          $ cd heasoft-6.29/BUILD_DIR/
          $ ./configure >& config.txt           $ ./configure > config.txt 2>&1
          $ make >& build.log                   $ make > build.log 2>&1
          $ make install >& install.log         $ make install > install.log 2>&1
      
      Note that you should let each step finish before proceeding to the next. The installation guide contains descriptions of optional configuration flags that more advanced users may wish to utilize.

    • Initialization:

      To initialize the software, do the following:
         For users of C Shell variants (csh, tcsh):
      
          setenv HEADAS /path/to/your/installed/heasoft-6.29/(PLATFORM)
          source $HEADAS/headas-init.csh
      
         For users of Bourne Shell (sh, ash, ksh, bash, zsh):
      
          export HEADAS=/path/to/your/installed/heasoft-6.29/(PLATFORM)
          . $HEADAS/headas-init.sh
      
      In the examples above, (PLATFORM) is a placeholder for the platform- specific string denoting your machine's architecture, for example:
            x86_64-pc-linux-gnu-libc2.32
      


  • PRE-COMPILED BINARY INSTALLATION (Not Recommended):
    • Installations of the pre-compiled binaries are not recommended due to the lack of portability of pre-compiled Perl libraries and other potential portability issues. Note that installations from the source code distribution are required for users who wish to load local models in Xspec or use the Xspec Python interface (PyXspec).

      The instructions below assume that you have already acquired a HEASoft tar file and have unpacked it (using e.g. "tar zxf [tar file]") on your machine.

    • Prerequisite packages:

      If they aren't installed already, you will need to install (using the "apt-get" package manager) a few other packages which are needed in order to use the pre-compiled HEASoft binary distribution:
          sudo yum -y install ncurses-devel
          sudo yum -y install libXt-devel
      
          (Note that the "yum" utility has been replaced by "dnf" on newer systems but the syntax is still the same.)
      
    • Configuring the software:

      After installing the above packages, most users should just follow the basic binary installation procedure outlined in the HEASoft installation guide, i.e.:
          % cd heasoft-6.29/(PLATFORM)/BUILD_DIR/
          % ./configure
      
      If the configure script yields a message about a "Perl mismatch", you will either need to install HEASoft from the source code distribution, or install a version of Perl which matches that listed for your platform in our Perl reference.

    • Initialization:

      To initialize the software, do the following:
         For users of C Shell variants (csh, tcsh):
      
          setenv HEADAS /path/to/your/installed/heasoft-6.29/(PLATFORM)
          source $HEADAS/headas-init.csh
      
         For users of Bourne Shell (sh, ash, ksh, bash, zsh):
      
          export HEADAS=/path/to/your/installed/heasoft-6.29/(PLATFORM)
          . $HEADAS/headas-init.sh
      
      In the examples above, (PLATFORM) is a placeholder for the platform- specific string denoting your machine's architecture, for example:
            x86_64-pc-linux-gnu-libc2.32
      



  • FTOOLS HELP DESK

    If FTOOLS has been useful in your research, please reference this site (http://heasarc.gsfc.nasa.gov/ftools) and use the ASCL reference for HEASoft [ascl:1408.004] or the ASCL reference for the original FTOOLs paper [ascl:9912.002]:

    Blackburn, J. K. 1995, in ASP Conf. Ser., Vol. 77, Astronomical Data Analysis Software and Systems IV, ed. R. A. Shaw, H. E. Payne, and J. J. E. Hayes (San Francisco: ASP), 367.

    Web page maintained by: Bryan K. Irby


    HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

    Last modified: Tuesday, 05-Oct-2021 12:09:50 EDT