fp-system-library is a collection of bash scripts used to download, compile and install third-party libraries required by the Flood-PROOFS Tools and Flood-PROOFS Models (e.g. HMC, S3M, and post-processing utilities).
The scripts install libraries in a user folder (no root installation required) and, when needed, generate an environment file to setup:
PATHLD_LIBRARY_PATH
- Flood-PROOFS ecosystem
- Repository overview
- Supported platforms
- Prerequisites
- Setup scripts
- Install HMC system libraries (zlib + hdf5 + netcdf4)
- Install other libraries
- Using the environment file
- GCC-9 vs GCC-15 notes (Ubuntu 20.04)
- Troubleshooting
- Changelog
- License
Flood-PROOFS components can be grouped into:
Utilities and supporting software used to prepare input data, manage workflows and handle pre/post-processing steps (e.g., ingestion, format conversion, gridding, orchestration, I/O utilities).
Numerical models and simulation components used to produce hydrological and cryospheric forecasts (e.g. HMC, S3M).
This repository hosts multiple standalone installer scripts.
Each script typically follows this workflow:
- download source archives
- extract archives into a
source/folder - compile sources
- install outputs into a dedicated prefix folder
- (optional) create an environment file exporting
PATHandLD_LIBRARY_PATH
The scripts are designed and tested mainly for:
- Linux (Ubuntu / Debian family)
- 64-bit systems
Other distributions may work but can require additional dependencies.
Install base build tools and common dependencies (Ubuntu/Debian):
sudo apt-get update
sudo apt-get install -y \
gcc g++ gfortran \
make m4 \
wget curl \
libcurl4-openssl-dev \
pkg-configSome libraries may require extra packages (see Troubleshooting).
This repository provides setup scripts for different libraries and dependency stacks.
setup_fp_system_library_zlib.sh→ zlibsetup_fp_system_library_hdf4.sh→ HDF4setup_fp_system_library_hdf5.sh→ HDF5setup_fp_system_library_nc4.sh→ NetCDF4 stack (netcdf-c + netcdf-fortran)
setup_fp_system_library_proj.sh→ PROJsetup_fp_system_library_geos.sh→ GEOSsetup_fp_system_library_gdal.sh→ GDAL
setup_fp_system_library_eccodes.sh→ ECMWF ecCodessetup_fp_system_library_jasper.sh→ JasPersetup_fp_system_library_openjpeg.sh→ OpenJPEG
setup_fp_system_library_udunits.sh→ UDUNITS2
setup_fp_system_library_hmc.sh→ HMC required stack (zlib + hdf5 + netcdf4)setup_fp_system_library_s3m.sh→ S3M required stack
setup_fp_system_library_mrt.sh→ MRTsetup_fp_system_library_antlr.sh→ ANTLR 2.7.7 (used for linking with some applications, e.g. NCO)
The main script for the HMC dependency stack is:
setup_fp_system_library_hmc.shThe script downloads, compiles and installs in this order:
- zlib
- HDF5 (built with zlib support)
- netCDF-C (built with HDF5 support → netCDF-4 enabled)
- netCDF-Fortran (linked to netCDF-C)
At the end, it generates an environment file exporting:
LD_LIBRARY_PATHPATH
If no arguments are provided, libraries are installed in:
$HOME/fp_system_libs_hmcThe environment file created is:
$HOME/fp_system_libs_hmc/fp_system_libs_hmcbash setup_fp_system_library_hmc.shbash setup_fp_system_library_hmc.sh /path/to/install/folderbash setup_fp_system_library_hmc.sh /path/to/install/folder my_env_fileThe script is aligned with the following conservative versions:
- zlib: 1.3.1
- HDF5: 1.12.1 (stable series)
- netCDF-C: 4.7.4
- netCDF-Fortran: 4.5.4
All other scripts can be executed similarly:
bash <setup_script_name>.shExamples:
bash setup_fp_system_library_zlib.sh
bash setup_fp_system_library_hdf5.sh
bash setup_fp_system_library_nc4.sh
bash setup_fp_system_library_gdal.sh
bash setup_fp_system_library_proj.sh
bash setup_fp_system_library_eccodes.shNote: some libraries require additional system packages (for example
libtiff-dev,libjpeg-dev,libxml2-dev,libssl-dev). If compilation fails, check the error message and install missing packages.
After a successful build, enable libraries by sourcing the generated environment file:
source <INSTALL_PREFIX>/<ENV_FILENAME>Example:
source $HOME/fp_system_libs_hmc/fp_system_libs_hmcwhich h5dump
which ncdump
which nc-config
which nf-config
h5dump --version || true
ncdump --version || true
nc-config --all || true
nf-config --all || trueUbuntu 20.04 provides GCC 9.x by default and it is suitable for most builds.
Ubuntu 20.04 does not provide gcc-15 packages in the default repositories.
To compile using GCC-15 you can:
- build inside Docker using an Ubuntu 20.04 container + isolated GCC-15 toolchain, or
- use a newer Ubuntu container (24.04+) but this may generate binaries that do not run on Ubuntu 20.04 due to
glibcmismatch.
Recommended approach for Ubuntu 20.04 runtime compatibility:
- use Docker
ubuntu:20.04 - build/install GCC-15 inside the container (isolated prefix)
- compile libraries into a host-mounted directory
If a library fails during configure, install missing prerequisites.
Examples (Ubuntu/Debian):
sudo apt-get install -y \
libxml2-dev \
libssl-dev \
zlib1g-devIf you get:
error while loading shared libraries: libnetcdf.so: cannot open shared object file
ensure you sourced the environment file:
source <INSTALL_PREFIX>/<ENV_FILENAME>
echo $LD_LIBRARY_PATHDo not mix different compilers (e.g. GCC-9 and GCC-15) into the same install directory. If switching compiler/toolchain, use a clean prefix folder.
See CHANGELOG for updates of this repository.
This repository is released under the EUPL License (see LICENSE).