Compiler with full C++-14 support (e.g. gcc>= 5.0 or clang>=3.4)
cmake (>= 3.1)
boost library (>= 1.48)
fftw3 library (>= 3.3.1)
gsl (GNU scientific library, >= 1.15)
libtiff library (>=4.0.2)
python3, python3-devel, python3-numpy, python3-matplotlib
Qt5 (>=5.4; required modules are listed below)
All required packages can be easily installed on most Linux distributions using the system’s package manager. Below are a few examples for several selected operating systems. Please note, that other distributions (Fedora, Mint, etc) may have different commands for invoking the package manager and slightly different names of packages (like
boost instead of
libboost etc). Besides that, the installation should be very similar.
$ sudo apt-get install build-essential git cmake libgsl-dev libboost-all-dev \ libfftw3-dev python3 python3-dev python3-numpy python3-matplotlib libtiff5-dev
$ sudo apt-get install qt5-default libqt5designercomponents5 qttools5-dev \ libqt5svg5-dev
$ sudo zypper install gcc-c++ git-core cmake gsl-devel libboost_*-devel fftw3-devel \ python3-devel python3-numpy-devel python3-matplotlib libtiff-devel
$ sudo zypper install libqt5-qtbase-devel libqt5-qttools-devel libqt5-qtsvg-devel
CentOS 7 and Redhat 7 ship with gcc-4.8.5, which does not fully support C++ 14. This instruction thus also explains how to get a newer compiler on your system.
$ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo yum -y install make cmake3 gcc-c++ $ sudo yum -y install fftw-devel boost-devel gsl-devel libtiff-devel $ sudo yum -y install python3-devel numpy $ sudo yum -y install qt5-qtbase-devel qt5-qttools-devel qt5-qtsvg-devel
$ sudo yum install centos-release-scl # if you are on CentOS
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms # if you are on RHEL
$ sudo yum install devtoolset-4-gcc-c++
$ scl enable devtoolset-4 bash
$ g++ --version
MacOS comes with no package manager, but fortunately there are several free and well maintained package managers that significantly simplify the installation of third-party open-source software. Here, we provide recepies for Homebrew and MacPorts.
Homebrew installs all packages in
/usr/local, while MacPorts prefers the
/opt/localfolder. Depending on your package manager selection, the corresponding path has to be specified explicitly during the BornAgain CMake configuration as explained in Build and install BornAgain.
Install Homebrew as explained here and then install all BornAgain dependencies by running the following command:
$ brew install git cmake fftw gsl python homebrew/science/matplotlib numpy \ boost qt5 libtiff
Finally, add Qt to your path environment variable:
$ export PATH=/usr/local/opt/qt5/bin/:$PATH
Install Macports by downloading and running the installer from here. Then install all BornAgain dependencies by running the following command:
$ sudo port install git cmake fftw-3 gsl py3-matplotlib py3-numpy \ tiff boost qt5-mac