Build with GNU Guix
Warning
This page and OGS builds with GNU Guix are currently work-in-progress!
GNU Guix
is a distribution of the GNU operating system but also a package manager. You can use it to create bit-by-bit reproducible (Linux) binaries of ogs.
The package definitions for OGS are defined in this repo
which can be used as a Guix channel. guix is currently installed on envinf3.
Building
From local source tree
# builds ogs serial config and starts isolated shell (like in a container)
guix time-machine -C scripts/guix/channels.scm -- shell -C -m scripts/guix/manifest-serial.scm \
-L scripts/guix/packages
# ogs petsc config
guix time-machine -C scripts/guix/channels.scm -- shell -C -m scripts/guix/manifest-petsc.scm \
-L scripts/guix/packagesTo create an archivable Apptainer container:
guix time-machine -C scripts/guix/channels.scm -- pack -m scripts/guix/manifest-serial.scm \
-L scripts/guix/packages -RR --format=squashfsTo get the dependency tree:
guix time-machine -C scripts/guix/channels.scm -- graph ogs-serial | dot -Tpdf > dag.pdfFrom web URL
wget https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/scripts/guix/channels.scm
guix time-machine -C ./channels.scm -- build ogs-serial \
--with-source=ogs@6.5.7-testing=https://gitlab.opengeosys.org/ogs/ogs/-/archive/master/ogs-master.tar.bz2Developing
guix time-machine -C scripts/guix/channels.scm -- \
shell --container --nesting --network --development ogs-serial \ # OR ogs-petsc
openssl nss-certs coreutils bash git
# Now in guix shell with all dependencies installed:
export CMAKE_PRESET_BUILD_DIR_PREFIX=guix/ # presets then create e.g. ../build/guix/release
cmake --preset release -DOGS_BUILD_PROCESSES=SteadyStateDiffusion
cmake --build --preset releaseAs a shortcut you can use this script:
./scripts/guix/ogs-env.sh ogs-serial # or `ogs-petsc` for parallelYou can also play with e.g. different versions of dependencies, here changing OpenMPI to 4.1.6:
guix time-machine -C scripts/guix/channels.scm -- \
shell --container --nesting --network --development ogs-petsc \
openssl nss-certs coreutils bash git \
--with-source=openmpi@4.1.6=https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2Links
guix build-referenceguix shell-reference- Blog: The ultimate guide to software development with Guix
- Futurile blog
- Peter’s Blog
This article was written by Lars Bilke. If you are missing something or you find an error please reach out
to us on our forum.
Generated with Hugo 0.164.0
in CI job 825193
|
Last revision: April 20, 2026
Commit: refactor(MeshLib): remove PropertyVector::push_back 870422dde
| Edit this page on