{"id":34634692,"url":"https://github.com/c-hydro/fp-system-library","last_synced_at":"2026-05-29T09:31:33.520Z","repository":{"id":114597772,"uuid":"495827911","full_name":"c-hydro/fp-system-library","owner":"c-hydro","description":"Bash scripts to build, install, and manage third-party system libraries for Flood-PROOFS Tools and Models.","archived":false,"fork":false,"pushed_at":"2026-01-21T09:40:20.000Z","size":101558,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T21:18:25.393Z","etag":null,"topics":["eccodes","flood-proofs","gdal","hdf5","hydrology","netcdf","proj","setup-script","shell-scripts","snow"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-hydro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-24T13:08:56.000Z","updated_at":"2026-01-21T09:40:24.000Z","dependencies_parsed_at":"2025-05-26T13:54:55.154Z","dependency_job_id":null,"html_url":"https://github.com/c-hydro/fp-system-library","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/c-hydro/fp-system-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Ffp-system-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Ffp-system-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Ffp-system-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Ffp-system-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-hydro","download_url":"https://codeload.github.com/c-hydro/fp-system-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Ffp-system-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33646420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eccodes","flood-proofs","gdal","hdf5","hydrology","netcdf","proj","setup-script","shell-scripts","snow"],"created_at":"2025-12-24T16:59:57.387Z","updated_at":"2026-05-29T09:31:33.510Z","avatar_url":"https://github.com/c-hydro.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flood-PROOFS System Libraries (`fp-system-library`)\n\n`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).\n\nThe scripts install libraries in a **user folder** (no root installation required) and, when needed, generate an environment file to setup:\n\n- `PATH`\n- `LD_LIBRARY_PATH`\n\n---\n\n## Contents\n\n- [Flood-PROOFS ecosystem](#flood-proofs-ecosystem)\n- [Repository overview](#repository-overview)\n- [Supported platforms](#supported-platforms)\n- [Prerequisites](#prerequisites)\n- [Setup scripts](#setup-scripts)\n- [Install HMC system libraries (zlib + hdf5 + netcdf4)](#install-hmc-system-libraries-zlib--hdf5--netcdf4)\n- [Install other libraries](#install-other-libraries)\n- [Using the environment file](#using-the-environment-file)\n- [GCC-9 vs GCC-15 notes (Ubuntu 20.04)](#gcc-9-vs-gcc-15-notes-ubuntu-2004)\n- [Troubleshooting](#troubleshooting)\n- [Changelog](#changelog)\n- [License](#license)\n\n---\n\n## Flood-PROOFS ecosystem\n\nFlood-PROOFS components can be grouped into:\n\n### FloodProofs Tools\nUtilities 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).\n\n### FloodProofs Models\nNumerical models and simulation components used to produce hydrological and cryospheric forecasts (e.g. **HMC**, **S3M**).\n\n---\n\n## Repository overview\n\nThis repository hosts multiple *standalone* installer scripts.  \nEach script typically follows this workflow:\n\n1. download source archives\n2. extract archives into a `source/` folder\n3. compile sources\n4. install outputs into a dedicated prefix folder\n5. (optional) create an environment file exporting `PATH` and `LD_LIBRARY_PATH`\n\n---\n\n## Supported platforms\n\nThe scripts are designed and tested mainly for:\n\n- Linux (Ubuntu / Debian family)\n- 64-bit systems\n\nOther distributions may work but can require additional dependencies.\n\n---\n\n## Prerequisites\n\nInstall base build tools and common dependencies (Ubuntu/Debian):\n\n```bash\nsudo apt-get update\n\nsudo apt-get install -y \\\n  gcc g++ gfortran \\\n  make m4 \\\n  wget curl \\\n  libcurl4-openssl-dev \\\n  pkg-config\n```\n\nSome libraries may require extra packages (see [Troubleshooting](#troubleshooting)).\n\n---\n\n## Setup scripts\n\nThis repository provides setup scripts for different libraries and dependency stacks.\n\n### Core compression / scientific I/O\n- `setup_fp_system_library_zlib.sh` → zlib\n- `setup_fp_system_library_hdf4.sh` → HDF4\n- `setup_fp_system_library_hdf5.sh` → HDF5\n- `setup_fp_system_library_nc4.sh` → NetCDF4 stack (netcdf-c + netcdf-fortran)\n\n### Geospatial stack\n- `setup_fp_system_library_proj.sh` → PROJ\n- `setup_fp_system_library_geos.sh` → GEOS\n- `setup_fp_system_library_gdal.sh` → GDAL\n\n### GRIB / meteorological stack\n- `setup_fp_system_library_eccodes.sh` → ECMWF ecCodes\n- `setup_fp_system_library_jasper.sh` → JasPer\n- `setup_fp_system_library_openjpeg.sh` → OpenJPEG\n\n### UDUNITS and auxiliary dependencies\n- `setup_fp_system_library_udunits.sh` → UDUNITS2\n\n### Model-related stacks\n- `setup_fp_system_library_hmc.sh` → HMC required stack (zlib + hdf5 + netcdf4)\n- `setup_fp_system_library_s3m.sh` → S3M required stack\n\n### Other utilities\n- `setup_fp_system_library_mrt.sh` → MRT\n- `setup_fp_system_library_antlr.sh` → ANTLR 2.7.7 (used for linking with some applications, e.g. NCO)\n\n---\n\n## Install HMC system libraries (zlib + hdf5 + netcdf4)\n\nThe main script for the HMC dependency stack is:\n\n```bash\nsetup_fp_system_library_hmc.sh\n```\n\n### What it installs\n\nThe script downloads, compiles and installs in this order:\n\n1. **zlib**\n2. **HDF5** (built with zlib support)\n3. **netCDF-C** (built with HDF5 support → netCDF-4 enabled)\n4. **netCDF-Fortran** (linked to netCDF-C)\n\nAt the end, it generates an environment file exporting:\n\n- `LD_LIBRARY_PATH`\n- `PATH`\n\n### Default install folder\n\nIf no arguments are provided, libraries are installed in:\n\n```bash\n$HOME/fp_system_libs_hmc\n```\n\n### Default environment filename\n\nThe environment file created is:\n\n```bash\n$HOME/fp_system_libs_hmc/fp_system_libs_hmc\n```\n\n### Run installation (default)\n\n```bash\nbash setup_fp_system_library_hmc.sh\n```\n\n### Run installation (custom folder)\n\n```bash\nbash setup_fp_system_library_hmc.sh /path/to/install/folder\n```\n\n### Run installation (custom folder + env filename)\n\n```bash\nbash setup_fp_system_library_hmc.sh /path/to/install/folder my_env_file\n```\n\n### Conservative versions (GCC-9 and GCC-15 compatible)\n\nThe script is aligned with the following conservative versions:\n\n- **zlib**: 1.3.1\n- **HDF5**: 1.12.1 (stable series)\n- **netCDF-C**: 4.7.4\n- **netCDF-Fortran**: 4.5.4\n\n---\n\n## Install other libraries\n\nAll other scripts can be executed similarly:\n\n```bash\nbash \u003csetup_script_name\u003e.sh\n```\n\nExamples:\n\n```bash\nbash setup_fp_system_library_zlib.sh\nbash setup_fp_system_library_hdf5.sh\nbash setup_fp_system_library_nc4.sh\nbash setup_fp_system_library_gdal.sh\nbash setup_fp_system_library_proj.sh\nbash setup_fp_system_library_eccodes.sh\n```\n\n\u003e **Note**: some libraries require additional system packages (for example `libtiff-dev`, `libjpeg-dev`, `libxml2-dev`, `libssl-dev`).\n\u003e If compilation fails, check the error message and install missing packages.\n\n---\n\n## Using the environment file\n\nAfter a successful build, enable libraries by sourcing the generated environment file:\n\n```bash\nsource \u003cINSTALL_PREFIX\u003e/\u003cENV_FILENAME\u003e\n```\n\nExample:\n\n```bash\nsource $HOME/fp_system_libs_hmc/fp_system_libs_hmc\n```\n\n### Quick validation\n\n```bash\nwhich h5dump\nwhich ncdump\nwhich nc-config\nwhich nf-config\n\nh5dump --version || true\nncdump --version || true\nnc-config --all || true\nnf-config --all || true\n```\n\n---\n\n## GCC-9 vs GCC-15 notes (Ubuntu 20.04)\n\n### GCC-9 (default on Ubuntu 20.04)\nUbuntu 20.04 provides GCC 9.x by default and it is suitable for most builds.\n\n### GCC-15 on Ubuntu 20.04\nUbuntu 20.04 does not provide `gcc-15` packages in the default repositories.\n\nTo compile using **GCC-15** you can:\n\n- build inside Docker using an **Ubuntu 20.04 container + isolated GCC-15 toolchain**, or\n- use a newer Ubuntu container (24.04+) but **this may generate binaries that do not run on Ubuntu 20.04** due to `glibc` mismatch.\n\n**Recommended approach for Ubuntu 20.04 runtime compatibility:**\n\n- use Docker `ubuntu:20.04`\n- build/install GCC-15 inside the container (isolated prefix)\n- compile libraries into a host-mounted directory\n\n---\n\n## Troubleshooting\n\n### Missing build dependencies\nIf a library fails during `configure`, install missing prerequisites.\n\nExamples (Ubuntu/Debian):\n\n```bash\nsudo apt-get install -y \\\n  libxml2-dev \\\n  libssl-dev \\\n  zlib1g-dev\n```\n\n### Shared libraries not found at runtime\nIf you get:\n\n```text\nerror while loading shared libraries: libnetcdf.so: cannot open shared object file\n```\n\nensure you sourced the environment file:\n\n```bash\nsource \u003cINSTALL_PREFIX\u003e/\u003cENV_FILENAME\u003e\necho $LD_LIBRARY_PATH\n```\n\n### Mixed compiler installations\nDo not mix different compilers (e.g. GCC-9 and GCC-15) into the same install directory.\nIf switching compiler/toolchain, use a clean prefix folder.\n\n---\n\n## Changelog\n\nSee `CHANGELOG` for updates of this repository.\n\n---\n\n## License\n\nThis repository is released under the EUPL License (see `LICENSE`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hydro%2Ffp-system-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-hydro%2Ffp-system-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hydro%2Ffp-system-library/lists"}