Skip to content

Installing Dependencies

N R Callahan edited this page May 19, 2015 · 10 revisions

We highly recommend using a package manager to install all required packages, except CCTools. In particular GRASS has many dependencies and installing from source can be a headache. However, if you do not have permissions to do so, here are guides how to install to your home directory. (Note: These guides are for the general case. You may need to install more dependencies or link to packages.)

If installing from source, the dependencies may vary widely.

If you will be installing GRASS by hand you must do it in the order presented here. Modifying could result in the required dependencies not being met.

CCTools

  1. Download the source code from <a href="http://ccl.cse.nd.edu/software/downloadfiles.php"CCL Page
  1. Extract the source.
  2. Run ./configure
  3. Make sure everything is in order. Particularly python2.7 support.
  4. Compile make; make install;
  5. Include the cctools folder in your path and pythonpath
  • export PATH=${PATH}:${HOME}/cctools/bin
  • export PYTHONPATH=${PYTHONPATH}:${HOME}/cctools/lib/python2.7/site-packages

ZLib

  1. Download source
  • wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/zlib-1.2.8.tar.gz
  1. Unpack and configure
  • ./configure --prefix=$HOME
  1. Compile and Install
  • make check install

HDF5

  1. Make sure you've installed ZLib
  2. Download source
  • wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/hdf5-1.8.9.tar.gz
  1. Unpack and configure - with the correct path to zlib
  • ./configure --with-zlib=$HOME --prefix=$HOME
  1. Compile and Install
  • make check install

NetCDF4

  1. Check that ZLib and HDF5 have been installed
  2. Download source
  • wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.2.tar.gz
  1. Configure with compiler flag necessary to find headers and libraries
  • CPPFLAGS=-I${HOME}/include LDFLAGS=-L${HOME}/lib ./configure --prefix=$HOME
  1. Compile and Install
  • make check install

Proj_4

  1. Download proj4 and proj-4 datum grid sources
  • wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
  • wget http://download.osgeo.org/proj/proj-datumgrid-1.5.tar.gz
  1. Now here you must extract the dataum grids into the proj-4 source correctly:
  • tar xzf proj-4.8.0.tar.gz
  • cd proj-4.8.0/nad
  • tar xzf ../../proj-datumgrid-1.5.tar.gz
  • cd ..
  1. Configure
  • ./configure --prefix=$HOME
  1. Compile and Install
  • make; make install;

GDAL

There is a big secret in GDALs source code. GDAL comes with an internal version of libtiff - specfically BigTIFF, so it can handle tifs greater than 4GB in size. Unfortunately this means that you may need to link to the system install version of libtiff if you want some programs to work. We ran into this issue on the HPC where Saga was linking against libtiff and GDAL was linked against BigTIFF. We solved this by linking GDAL against the system libtiff instead. This is done by adding --with-libtiff=/usr/lib64 (or /usr/lib - system dependent) to the ./configure command.

  1. Download Source
  • wget http://download.osgeo.org/gdal/1.11.1/gdal-1.11.1.tar.gz
  1. Unpack and configure without GRASS, and with netcdf and python
  • ./configure --without-grass --with-netcdf=$HOME -with-python --prefix=$HOME
  1. Compile and Install
  • make; make install

Geos

  1. Download Source
  • wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
  1. Unpack and Configure
  • ./configure --prefix=$HOME --enable-python
  1. Compile and Install
  • make; make install
  1. Need to add libraries to path
  • export LD_LIBRARY_PATH=$HOME/lib

Grass

  1. Download Source
  • wget http://grass.osgeo.org/grass64/source/grass-6.4.4.tar.gz
  1. Unpack and Compile
  • CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib" ./configure --prefix=$HOME --with-proj-lib=$ HOME/lib --with-proj-share=${HOME}/share/proj/ --with-proj-includes=$HOME/include --with-gdal=$HOME --with-cxx --without-fftw --without-python --with-geos=${HOME}/bin --with-libs=$HOME/lib
  1. Make and Install
  • make; make install

GDAL_Grass Plugin

  1. Download Source
  • wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz
  1. Configure with paths to gdal and grass
  • ./configure --with-gdal=$HOME/bin/gdal-config --with-grass=$HOME/grass-6.4.4/ --prefix=$HOME
  1. Compile and Install
  • make; make install
  1. Add GRASS libs to library path
  • export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/grass-6.4.4/lib

Clone this wiki locally