Installing HEASoft - Mac OS X

  • SOURCE CODE INSTALLATION:
    • Installations from the source code are generally recommended over the pre-compiled binaries to avoid any potential portability issues. Note also that source code builds are required for users who wish to load local models in Xspec or use the Xspec Python interface (PyXspec).

    • Prerequisite packages:

      In order to build HEASoft from the source code distribution, you will need some additional software:

      • X11: We recommend XQuartz but X11 is also available via the various Mac package managers.

      • Apple XCode: To make sure the necessary XCode compilers (gcc, g++, perl, python) are installed, you may also need to install the Command Line Tools using this command:
          xcode-select --install
        
      • A Fortran compiler. Multiple options are available via Mac package managers such as these,


        or Apple-style installers for gfortran are available from gnu.org:


        gfortran tar files are available from SourceForge:

        Note that in HEASoft 6.16, builds on Mac OS X are now 64-bit by default and that the g95 compiler from g95.org - which we have recommended in previous releases - will not generate 64-bit objects, so alternate compilers are required for the default 64-bit build (for example, the g95 compiler available from MacPorts, which does generate 64-bit objects). HEASoft may be forced into 32-bit mode using the configure option "--enable-mac_32bit_build=yes", in which case the binary from g95.org may still be used.

    • 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 (and note that
       a python interpreter is only required if you plan to use PyXspec):
      
       In C-shell variants (tcsh/csh):       In Bourne shell variants (bash/sh):
      
          % setenv CC /usr/bin/gcc              % export CC=/usr/bin/gcc
          % setenv CXX /usr/bin/g++             % export CXX=/usr/bin/g++
          % setenv PERL /usr/bin/perl           % export PERL=/usr/bin/perl
          % setenv PYTHON /usr/bin/python       % export PYTHON=/usr/bin/python
      
       Your Fortran compiler will live elsewhere, so for example:
      
          % setenv FC /opt/local/bin/g95        % export FC=/opt/local/bin/g95
       or
          % setenv FC /usr/local/bin/gfortran   % export FC=/usr/local/bin/gfortran
      
       Next:
      
          % cd heasoft-6.16/BUILD_DIR/
          % ./configure
          % make
          % make install
      
      Note that it is a good idea to capture the output from these steps in the manner appropriate for your shell, for example:
           In C-shell variants (tcsh/csh):      In Bourne Shell variants (bash/sh):
        
               ./configure >& config.out &        ./configure > config.out 2>&1 &
           and
               make >& build.log &                make > build.log 2>&1 &
           etc.
      
      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.16/(PLATFORM)
          source $HEADAS/headas-init.csh
      
         For users of Bourne Shell (sh, ash, ksh, and bash):
      
          export HEADAS=/path/to/your/installed/heasoft-6.16/(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-apple-darwin13.2.0
      


  • PRE-COMPILED BINARY INSTALLATION:
    • Note that users who wish to load local models in Xspec or use the Xspec Python interface (PyXspec) must install HEASoft from the source code distribution instead of the pre-compiled binaries.

    • Prerequisite packages:

      When using the pre-compiled HEASoft binaries, users will need a copy of X11 in order to use any of the graphical tasks:

      • X11: We recommend XQuartz but X11 is also available via the various Mac package managers.

    • 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.:
          % setenv PERL /usr/bin/perl  (tcsh/csh)
       or
          % export PERL=/usr/bin/perl  (bash/sh)
      
       Then:
      
          % cd heasoft-6.16/(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. On Mac OS X, most users should be able to

    • Initialization:

      To initialize the software, do the following:
         For users of C Shell variants (csh, tcsh):
      
          setenv HEADAS /path/to/your/installed/heasoft-6.16/(PLATFORM)
          source $HEADAS/headas-init.csh
      
         For users of Bourne Shell (sh, ash, ksh, and bash):
      
          export HEADAS=/path/to/your/installed/heasoft-6.16/(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-apple-darwin13.2.0
      



  • Help lines: FTOOLS or xanprob@athena.gsfc.nasa.gov

    Web page maintained by Bryan K. Irby



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

    Last modified: Thursday, 03-Jul-2014 07:26:03 EDT