gcc >= 8
clang >= 7
cmake >= 3.14
gsl >= 1.15(GNU scientific library)
fftw3 >= 3.3.1
python3, python3-devel, python3-numpy, python3-matplotlib
boost >= 1.65
Qt5 >=5.5.1(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 libeigen3-dev libfftw3-dev python3 python3-dev python3-numpy python3-matplotlib libtiff5-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-iostreams-dev qt5-default libqt5designercomponents5 qttools5-dev libqt5svg5-dev libqt5opengl5-dev
$ sudo zypper install gcc-c++ git-core cmake gsl-devel libeigen 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 eigen3-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 boost libtiff eigen qt5 && pip3 install matplotlib numpy
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