Installation:Linux
Contents
Prerequisites
Install the following packages with your package manager. For instance under Debian Stretch:
apt install qt5-default qttools5-dev-tools qtdeclarative5-dev libqt5svg5-dev \ g++ gfortran libfftw3-dev liblapack-dev zlib1g-dev libopenblas-dev \ libhdf5-dev
Under Debian 12, for a fresh install, the list required packages should be
apt install git qt6-base-dev qt6-tools-dev qt6-declarative-dev qt6-svg-dev \ gfortran libfftw3-dev liblapack-dev zlib1g-dev libopenblas-dev \ libhdf5-dev
qmake6 is available in /usr/bin while geopsypack expects qmake. The easiest way to solve it is
$ export PATH=/usr/lib/qt6/bin:$PATH
The package name are also valid for Ubuntu. In most cases you can directly jump to section Download. hdf5 libraries are required only from 3.5.0 and above.
Under Ubuntu 22.04, package qt5-default no longer exists. It can be replaced by qt-base-dev
apt install qtbase5-dev qttools5-dev-tools qtdeclarative5-dev libqt5svg5-dev \ g++ gfortran libfftw3-dev liblapack-dev zlib1g-dev libopenblas-dev \ libhdf5-dev
gcc
A decent gcc version is required primarily for Qt. To check the version of your compiler:
g++ --version # g++ (Debian 6.3.0-18+deb9u1)
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.11.2 (or a more recent version) is installed, you can jump directly to Lapack. If not you must first install Qt.
- Installing Qt binary packages
- Compiling Qt from source, in the ancient time.
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.
Python (Optional)
Some Python modules are provided in this package (read more).
Install Python devel package (adjust the version number)
apt-get install python3.11-dev python3-numpy
Add include path in the configuration script:
./configure [...] -I "/usr/include/python3.11" -I "/usr/lib/python3/dist-packages/numpy/core/include"
[...] stands for all the other options specified in other sections.
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 [...] \ -I /usr/local/matlab75/extern/include \ -L /usr/local/matlab75/bin/glnxa64 \ -rpath /usr/local/matlab75/bin/glnxa64
[...] stands for all the other options specified in other sections. Old and recent Matlab release have been tested successfully. Report any problem to geopsy forum.
Installing from Git repository
If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to Download section. Be careful that compilation may fail. To know if the build has a chance to complete successfully, first have a look at NextRelease. If there is a complete green bar in front of src-testing-*, you will probably get to the end of the build without error. If it is not completely green, come back later or contact the developers.
Download geopsypack from Git repository and install. Note that we recommend to build in a separate directory from the sources which is not located inside the source tree. Eventually replace 3.4 by the desired branch. The branch name is composed of the first two numbers of the version number. For instance, version 3.3.4 is built from branch 3.3 .
cd /path/where/you/want/to/store/source/tree git clone git://geopsy.org/geopsypack cd geopsypack git checkout 3.4 git submodule update --init
If you want only the applications and libraries without GUI, you can replace geopsypack by geopsypack-core.
Configure and build:
./configure -builddir /path/where/you/want/to/build -prefix /path/where/you/want/to/intall -march native make -j 8 -C /path/where/you/want/to/build make install -C /path/where/you/want/to/build
That's it, you should have a running geopsypack including the latest modifications.
If you want to update an existing source tree:
cd /path/where/you/stored/geopsypack/source/tree git pull git checkout 3.4 git submodule update --init
Reconfigure and build:
cd /path/where/you/want/to/build ./configure.cache make -j 8 make install
You can skip the rest of this tutorial.
Download
Your platform is now ready for the compilation of Geopsy packages themselves. First download the correct archive.
Upgrading from a previous release
If you want to speed up compilation and if you have already a build from an old release, here are some hints to create a patch.
OLD=geopsypack-src-3.2.0 NEW=geopsypack-src-3.2.2 cd /tmp wget http://www.geopsy.org/download/archives/$OLD.tar.gz wget http://www.geopsy.org/download/archives/$NEW.tar.gz tar xvfpz $OLD.tar.gz tar xvfpz $NEW.tar.gz diff -Naur $OLD $NEW > $OLD.patch
Then you can apply it to your building tree.
cd /your/building/directory/geopsypack-3.2.2 patch -N -p 1 < /tmp/$OLD.patch
You can add --dry-run to check modification before really changing your tree.
Re-configure keeping the same configuration
./configure.cache make -j 10 make install
If you finally get into trouble, the best is to clear everything and start with a fresh build.
Compilation
Extract files from dowloaded archive.
tar xvpzf geopsypack-src-X.X.X.tar.gz
Enter the source directory and configure. '-prefix' option defines the installation directory.
cd geopsypack-src-X.X.X ./configure -prefix /usr/local/Geopsy.org -march native
Other options are documented with option '-h' or '-help'.
./configure -h
If successful, you can compile. In case of failure, see troubleshooting for common errors and their solutions.
make -j 8
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
Desktop integration
If you installed in /usr/local/Geopsy.org,
cp -s /usr/local/Geopsy.org/desktop/*.desktop ~/.local/share/applications
This is for a user-specific installation. For a system-wide configuration, create the links in /usr/share/applications.
The creation of .desktop files within the configuration step is available for any release >=3.6. This step is deliberately kept outside the main installation procedure to avoid conflicts if several releases are installed on the same machine. The .desktop files contain an absolute path to the icon file of the application. There is no path to the executable binary file. The executed binary file depends upon PATH environment variable.
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.