Installation:Linux
Contents
Prerequisites
Install the following packages with your package manager. For instance under Debian Stretch:
apt install qt5-default qttools5-dev-tools qtscript5-dev qtdeclarative5-dev libqt5svg5-dev \ g++ gfortran libfftw3-dev liblapack-dev zlib1g-dev libopenblas-dev
The package name are also valid for Ubuntu. In most cases you can directly jump to section Download.
gcc
A decent gcc version is required primarily for Qt. The recommended versions are listed here. To check the version of your compiler:
g++ --version # g++ (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Fortran support is required. Some codes written in Fortran are included (less than 0.1% of the total).
gfortran --version # GNU Fortran 95 (GCC) 4.1.2 (Gentoo 4.1.2 p1.1) # Copyright (C) 2006 Free Software Foundation, Inc.
Qt
Qt libraries and development tools must be available. Only Qt releases posterior or equal to 5.7.1 are supported. To test if Qt is already installed:
qmake -version # QMake version 3.1 # Using Qt version 5.11.2 in /home/wathelem/devel/Qt/5.11.2/gcc_64/lib2.01a lupdate -version # lupdate version 5.11.2
If Qt 5.7.1 (or a more recent version) is installed, you can jump directly to Lapack. If not you must first install Qt.
- Installing Qt binary packages, if they are available for your distribution
- Compiling Qt from source
Zlib
Zlib development package is usually not provided by default on most distributions. It is required if you did not install Qt from source. The best option is to install the package available with your distribution.
- ubuntu: zlib1g-dev
apt-get install zlib1g-dev
- Fedora: zlib-devel
yum install zlib-devel
Lapack
Lapack >= 3.0 is required. The best option is to install the package shipped with your distribution.
- ubuntu: liblapack-dev
apt-get install liblapack-dev
- Fedora: lapack-devel
yum install lapack-devel
- openSUSE: YaST graphical interface
- gentoo: sci-libs/lapack
emerge -av lapack
Note: this external dependency is required for all releases >= 2.1.0. For all previous releases, 'Lapack' libraries were shipped with Geopsy packages.
FFTW
Fastest Fourier Transform of the West.
fftw >= 3.0.1 is required. The best option is to install the package shipped with your distribution.
- ubuntu: libfftw3-dev
apt-get install libfftw3-dev
- Fedora: fftw-devel
yum install fftw-devel
- openSUSE: YaST graphical interface fftw3-devel
- gentoo: sci-libs/fftw
emerge -av fftw
Note: this external dependency is required for all releases >= 2.1.0. For all previous releases, 'FFTW' libraries were shipped with Geopsy packages.
Matlab (Optional)
Some packages like matfiles or dinvermatlab require linking to libraries eng and mx, shipped with all Matlab releases. Without Matlab, compilation will not stop with errors. Some warnings will be issued that you can safely ignore. However, most of the functionalities of these packages will be switched off. When configuring without Matlab you get the following warnings:
! Matlab libraries NOT available, see .matlab.failed.log for details. ! See http://www.geopsy.org/wiki/index.php?title=Installation:Linux.
If you have a Matlab release installed and a proper license, you have to add include and library paths to the configure command line (see below). For instance, we assume that Matlab is installed in /usr/local/matlab75.
./configure -prefix /usr/local/Geopsy.org \ -I /usr/local/matlab75/extern/include \ -L /usr/local/matlab75/bin/glnxa64 \ -rpath /usr/local/matlab75/bin/glnxa64
Old and recent Matlab release have been tested successfully. Report any problem to geopsy forum.
Download
Your platform is now ready for the compilation Geopsy packages themselves. First download the correct archive.
Compilation
Extract files from dowloaded archive.
tar xvpzf geopsypack-XXitems-src.tar.gz
Enter the source directory and configure. '-prefix' option defines the installation directory.
cd geopsypack-XXitems-src ./configure -prefix /usr/local/Geopsy.org
Other options are documented with option '-h' or '-help'.
./configure -h
To speed up compilation, you can use the pre-compiled headers.
./configure -pch
If successful, you can compile. In case of failure, see troubleshooting for common errors and their solutions.
make -j 10
It takes from a few minutes up to 20 minutes if the full list of packages are included. It also depends on your computer performances. Finally, you can install the packages, usually requiring root permissions (through su or sudo)
sudo make install
Variable environment
To finish the installation, make sure that the destination directory is listed in your PATH
echo $PATH
In ~/.profile (if your shell is bash, ksh, zsh or sh), add the following lines:
export PATH=/usr/local/Geopsy.org/bin:$PATH
For bash, ~/.bashrc is also of common usage
In ~/.login (in case your shell is csh or tcsh), add the following line:
setenv PATH /usr/local/Geopsy.org/bin:$PATH
If you use a different shell, please modify your environment variables accordingly.
Troubleshooting
In case of errors during 'make', first check output messages from its end up to the first errors.
If the compiler complains about missing include files, there are good chances that some packages, not installed by default by your distribution, are required. For instance, for Ubuntu, zlib1g-dev has to be installed in addition to zlib1g.
If you cannot solve yourself the encountered errors, post the error messages to Geopsy forum.