isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Installing ISCE on macOS (OS X) with Macports

Table of Contents

ISCE has the following dependencies

  1. C++ compiler - gcc-6/ clang-6.0 or above
  2. Python 3.6 or above
  3. Numpy and Cython
  4. GDAL 2.3 or above with Python bindings
  5. HDF5 1.10.2 or above with h5py
  6. cmake 3.12 or above
  7. ruamel yaml for python3.7

One can use any of the three package managers - Macports, Homebrew or Conda to install ISCE on macOS.
We will only walk through the installation steps using Macports. It is highly recommend to not mix
packages installed by different package managers as this typically leads to library incompatibility issues.

Installing packages using Macports

We write the instructions assuming that we are using clang-8.0 and python37.
Changes these to appropriate version numbers for your installation.
If you decide to use gcc (say gcc7) on your mac - note that you may have to make additional changes
to your macports commands to force it to use libstdc++ instead of libc++.

We present instructions with clang here to ensure compatibility with most binaries that are distributed for osx.

  1. sudo port install clang-8.0

    • sudo port select clang mp-clang-8.0
    • Restart terminal after this.

  2. sudo port install python37
    • sudo port select python3 python37
    • sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m /opt/local/include/python3.7m
    • The link command is to keep the paths simpler for use with installing software from source.
  3. sudo port install cmake gawk coreutils gsed
  4. sudo port install wget +ssl
  5. sudo port install fftw-3
  6. sudo port install fftw-3-single
  7. sudo port install hdf5
  8. sudo port install py37-numpy
  9. sudo port install py37-scipy
  10. sudo port install py37-cython
  11. sudo port install py37-pytest
    • sudo ln -s /opt/local/bin/cython-3.7 /opt/local/bin/cython3
    • The link reproduces the environment that we usually get on linux machines
  12. sudo port install py37-h5py
  13. sudo port install proj
  14. sudo port install gdal +curl +expat +geos +hdf5 +openjpeg
    • export GDAL_DATA=/opt/local/share/gdal
    • You may want to build a more complete version of GDAL with support for more formats.
      The recommended options list is : +hdf4 +hdf5 +netcdf +openjpeg +postgresql10 .
      If you plan to use gcc instead of clang, use gcc7 whenever the option is available to build those ports.
  15. sudo port install py37-gdal
  16. sudo port install py37-ruamel-yaml

Install ISCE3 from source

In this section we will walk through the directory setup and build system instructions
for installing ISCE. ISCE can be built with 2 different build systems

  1. mm
  2. cmake

In this set of instructions, we focus on cmake as it is already available via
standard package managers.
We assume the following directory structure in this tutorial

Assumed directory structure for installing ISCE
LocationDescription
${ISCEHOME}/tools/isce/src git checkout location/ unpacked tarball location of ISCE source
${ISCEHOME}/tools/isce/build cmake build location
${ISCEHOME}/tools/isce/install cmake install location

Note that ${ISCEHOME} can point to any directory on your machine.

Step 1: Get latest version of ISCE source

Option 1: Checkout latest version from git

  1. Ensure that you are in the source folder
    > cd ${ISCEHOME}/tools/isce/src
  2. Check out the latest version of the source code from git
    > git clone https://github-fn.jpl.nasa.gov/iscce-3/isce
  3. Ensure you are building the branch that you want to use. For example, if you want to build the develop branch
    > git checkout develop

Option 2: Get the latest tarball

  1. Ensure that you are in the source folder
    > cd ${ISCEHOME}/tools/isce/src
  2. Unpack the tarball.
    > tar xjbf isce.tar.bz2

Step 2: Build the software

  1. Ensure that you are in the build folder

    > cd ${ISCEHOME}/tools/isce/build

  2. Run cmake with the correct inputs

    > CC=clang CXX=clang++ cmake -DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_INSTALL_PREFIX=${ISCEHOME}/tools/isce/install ${ISCEHOME}/tools/isce/src/isce

    Other optional arguments can be added to the cmake line

    Additional cmake options
    OptionDescription
    -DMEMORY_CHECK_COMMAND=PATH_TO_VALGRIND_EXECUTABLE -DMEMORYCHECK_COMMAND_OPTIONS="--trace-children=yes --leak-check=full --dsymutil=yes --track-origins=yes" -DCMAKE_BUILD_TYPE=Debug
    Run tests with "-T memcheck" to check for memory leaks.
    valgrind needs to be installed.
    -DCMAKE_BUILD_TYPE=RelWithDebInfoBuild with optimization flags with release. Default is to build in debug mode

  3. Build the software

    > make VERBOSE=ON

  4. Run the unittests to ensure that software was built correctly
    > ctest

Step 3: Install and set environment variables

  1. Ensure that you are in the build folder

    > cd ${ISCEHOME}/tools/isce/build

  2. Install the software

    > make install

  3. Setup the environment variables. Note that these need to be done in addition to the settings needed for pyre.

    Environment variables to set after installing ISCE
    VariableSettingDescription
    PATH$PATH:${ISCEHOME}/tools/isce/install/binFor executables installed by ISCE
    PYTHONPATH$PYTHONPATH:${ISCEHOME}/tools/isce/install/packagesISCE python package
    LD_LIBRARY_PATH$LD_LIBRARY_PATH:${ISCEHOME}/tools/isce/install/libShared libraries built by ISCE


Generated for ISCE3.0 by doxygen 1.8.5.