summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2025-06-27 19:04:29 +0100
committerAndreas Enge <andreas@enge.fr>2025-06-28 16:33:42 +0200
commit4b2f52e9989f4e380359778fe161570bcb21ed56 (patch)
tree75c744a6bb6d783788f06385a779876f3fa220d2 /gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch
parentc912d63eaefeb6ff1064b2004671233a2e55af23 (diff)
gnu:fenics-dolfin: Fix build with hdf5@1.14.
* gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. * gnu/packages/simulation.scm (fenics-dolfin): Run guix style. [source]: Use new patch. [arguments] <phases>: Update 'pre-check' comment. Add 'demo_stokes-iterative_mpi' test to list of skipped tests. Change-Id: I8ec4534d96af6726fcfd3a601d34b109d06c4ca6 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch')
-rw-r--r--gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch
new file mode 100644
index 0000000000..6128ed5b3c
--- /dev/null
+++ b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch
@@ -0,0 +1,26 @@
+This patch checks the HDF5 API version before selecting the appropriate H5O
+function. A new function name and an extra argument are required for v1.12
+and above.
+
+See <https://support.hdfgroup.org/documentation/hdf5/latest/api-compat-macros.html> for the Technical Notes.
+
+See <https://bitbucket.org/fenics-project/dolfin/commits/4201e172c88dc51eb8846cb350acbbe23c95246d> for the upstream fix.
+
+--- a/dolfin/io/HDF5Interface.cpp
++++ b/dolfin/io/HDF5Interface.cpp
+@@ -282,8 +282,13 @@
+ }
+
+ H5O_info_t object_info;
+- H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info,
+- lapl_id);
++ #if H5_VERSION_GE(1, 12, 0)
++ H5Oget_info_by_name3(hdf5_file_handle, group_name.c_str(), &object_info,
++ H5O_INFO_BASIC, lapl_id);
++ #else
++ H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info,
++ lapl_id);
++ #endif
+
+ // Close link access properties
+ status = H5Pclose(lapl_id);