Skip to content

Installing Prerequisites

Nathan A. Sparks edited this page Jun 6, 2016 · 42 revisions

Installing prerequisites

There are a number of packages which must be preinstalled on your system before building sim-recon and its listed dependencies from source code or using the pre-compiled binaries. To install these requirements using your native package manager you must have sudoer privileges. Otherwise you will need to ask your system administrator to install them for you. The following instructions include a few packages which are not true prerequisites but are instead recommended packages. On Linux, before running one of the following sets of commands you need to enter a sudo initial-login shell by typing sudo -i and then your password; Don't forget to exit this shell when the installation is complete.

CentOS/RHEL 6

yum update -y && yum install -y centos-release-SCL epel-release \
                                centos-release-scl-rh \
            && yum install -y python27 git make gcc-c++ gcc binutils \
            libX11-devel libXpm-devel libXft-devel libXext-devel \
            subversion scons cmake gcc-gfortran imake patch expat-devel \
            blas-devel lapack-devel openmotif-devel tcsh tar file \
            mysql-devel sqlite-devel fftw-devel bzip2 bzip2-devel emacs \
            devtoolset-3-toolchain \
            && ln -s /usr/lib64/liblapack.a /usr/lib64/liblapack3.a \
            && ln -s /usr/include/freetype2/freetype /usr/include/freetype

CentOS/RHEL 7

yum update -y && yum install -y epel-release && yum install -y \
            git make gcc-c++ gcc binutils clang \
            libX11-devel libXpm-devel libXft-devel libXext-devel \
            subversion scons cmake gcc-gfortran imake patch expat-devel \
            mysql-devel fftw-devel bzip2-devel emacs file tar python-devel \
            blas-devel blas-static lapack-devel lapack-static openmotif-devel \
            bzip2 tcsh sqlite-devel \
            && ln -s /usr/lib64/liblapack.a /usr/lib64/liblapack3.a \
            && ln -s /usr/include/freetype2/freetype /usr/include/freetype

Ubuntu 14.04/16.04 LTS

apt-get update && apt-get install -y curl git dpkg-dev make g++ gcc binutils \
    libx11-dev libxpm-dev libxft-dev libxext-dev libfftw3-dev python-dev cmake \
    scons subversion gfortran xutils-dev libxt-dev liblapack-dev libblas-dev \
    libmotif-dev expect libgl1-mesa-dev libmysqlclient-dev sqlite3 \
    libsqlite3-dev tcsh libbz2-dev emacs \
    && ln -s /usr/bin/make /usr/bin/gmake \
    && ln -s /usr/lib/liblapack.a /usr/lib/liblapack3.a

Mac OS X 10.10+

cernlib is difficult to build on this platform, and it and the simulation parts of sim-recon that depend on it are currently disabled when building on OS X.

The first step is to install the Xcode command-line tools:

xcode-select --install

Next, install XQuartz.

Lastly, install Homebrew by following the instructions at http://brew.sh, and use brew to install the remaining prerequisites:

brew install scons cmake gcc xerces-c

Important: If you want to use the OS X binary distribution, you should use brew to install xerces-c and gcc (for gfortran); The packages in the distribution have been built against these particular fixed-location installations, and alternate methods may require additional steps to change install names of dynamic libraries.

Alternatively, you can manually download/install packages from the following websites:

  1. SCons
  2. GFortran
  3. CMake (optional)

Check that scons and, optionally, cmake are in your PATH before using hdpm to build packages. By default, the Calibration and Conditions Database package - ccdb supports MySQL and SQLite databases. To configure hdpm to build ccdb without MySQL support, change its build command in "settings/commands.txt" to read "scons with-mysql=false”.

Clone this wiki locally