X-Loop: help-debbugs@HIDDEN Subject: [bug#78878] [PATCH] gnu:fenics-dolfin: Fix build with hdf5@HIDDEN Resent-From: Paul Garlick <pgarlick@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Mon, 23 Jun 2025 17:01:01 +0000 Resent-Message-ID: <handler.78878.B.175069801011793 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 78878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78878 <at> debbugs.gnu.org Cc: Paul Garlick <pgarlick@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.175069801011793 (code B ref -1); Mon, 23 Jun 2025 17:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2025 17:00:10 +0000 Received: from localhost ([127.0.0.1]:56843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uTkWa-00033L-B5 for submit <at> debbugs.gnu.org; Mon, 23 Jun 2025 13:00:09 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58950) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <pgarlick@HIDDEN>) id 1uTkWV-00031T-3B for submit <at> debbugs.gnu.org; Mon, 23 Jun 2025 13:00:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pgarlick@HIDDEN>) id 1uTkWM-0005oq-4Y for guix-patches@HIDDEN; Mon, 23 Jun 2025 12:59:50 -0400 Received: from smtp.hosts.co.uk ([85.233.160.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pgarlick@HIDDEN>) id 1uTkWJ-0000TR-7I for guix-patches@HIDDEN; Mon, 23 Jun 2025 12:59:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tourbillion-technology.com; s=2025040300; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Content-Type:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=+EnXwMDqZxFOsck2q2NRrG/DomlvaciMZ5bPxErgrk0=; b=0FL20hZPjWBkQJcmHjRnlq3R9G OIM1k2gZwcxLqpnq2pifkgP8hBVmr8oobYIutxVlJF7l1U16AmJWvEwZKRlXfNnKILQOieBGcfVhZ xUROPDKh50DiHs5ytmI5JOq5Hh81eAw/zMOrcuJh5QltpDymAPlb59avoarzlQM0qugg=; Received: from maikeh336.claranet.co.uk ([79.123.23.187] helo=pumpernickel.tourbillion-technology.com) by smtp.hosts.co.uk with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim) (envelope-from <pgarlick@HIDDEN>) id 1uTkWC-000000000Vb-8PRV; Mon, 23 Jun 2025 17:59:41 +0100 From: Paul Garlick <pgarlick@HIDDEN> Date: Mon, 23 Jun 2025 17:58:49 +0100 Message-Id: <20250623165849.3076997-1-pgarlick@HIDDEN> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=85.233.160.19; envelope-from=pgarlick@HIDDEN; helo=smtp.hosts.co.uk X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) * gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/simulation.scm (fenics-dolfin)[source]: Use it. --- gnu/local.mk | 1 + .../fenics-dolfin-hdf5-version-check.patch | 26 ++ gnu/packages/simulation.scm | 270 +++++++++--------- 3 files changed, 158 insertions(+), 139 deletions(-) create mode 100644 gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch diff --git a/gnu/local.mk b/gnu/local.mk index c569c327a9..d3a2c81bd7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,7 @@ dist_patch_DATA = \ %D%/packages/patches/fenics-dolfin-demo-init.patch \ %D%/packages/patches/fenics-dolfin-boost.patch \ %D%/packages/patches/fenics-dolfin-config-slepc.patch \ + %D%/packages/patches/fenics-dolfin-hdf5-version-check.patch \ %D%/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch \ %D%/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch \ %D%/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch \ 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); diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index ebfe477265..451e305fc8 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -744,143 +744,137 @@ (define-public fenics-dolfin (name "fenics-dolfin") (version "2019.1.0.post0") (source - (origin - (method url-fetch) - (uri (string-append - "https://bitbucket.org/fenics-project/dolfin/get/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) - (patches (search-patches "fenics-dolfin-algorithm.patch" - "fenics-dolfin-demo-init.patch" - "fenics-dolfin-boost.patch" - "fenics-dolfin-config-slepc.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Make sure we don't use the bundled test framework. - (delete-file-recursively "test/unit/cpp/catch") - (substitute* "test/unit/cpp/main.cpp" - ;; Use standard search paths for 'catch' header file. - (("#include.*") - "#include <catch.hpp>\n")) - (substitute* "test/unit/cpp/CMakeLists.txt" - ;; Specify directory to find the header file. - (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) - (string-append front - "$ENV{CATCH_DIR}/include" back "\n"))))))) + (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/fenics-project/dolfin/get/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) + (patches (search-patches "fenics-dolfin-algorithm.patch" + "fenics-dolfin-demo-init.patch" + "fenics-dolfin-boost.patch" + "fenics-dolfin-config-slepc.patch" + "fenics-dolfin-hdf5-version-check.patch")) + (modules '((guix build utils))) + (snippet '(begin + ;; Make sure we don't use the bundled test framework. + (delete-file-recursively "test/unit/cpp/catch") + (substitute* "test/unit/cpp/main.cpp" + ;; Use standard search paths for 'catch' header file. + (("#include.*") + "#include <catch.hpp>\n")) + (substitute* "test/unit/cpp/CMakeLists.txt" + ;; Specify directory to find the header file. + (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) + (string-append front "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) - (inputs - (list openblas - boost - eigen - hdf5-parallel-openmpi - libxml2 - openmpi - python-3 - pt-scotch32 - suitesparse - sundials-openmpi - zlib)) - (native-inputs - (list catch-framework pkg-config)) - (propagated-inputs - (list python-fenics-ffc petsc-openmpi slepc-openmpi)) + (inputs (list openblas + boost + eigen + hdf5-parallel-openmpi + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) + (native-inputs (list catch-framework pkg-config)) + (propagated-inputs (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - (list #:configure-flags #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" - "-DDOLFIN_ENABLE_HDF5:BOOL=ON" - "-DDOLFIN_ENABLE_MPI:BOOL=ON" - "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" - "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" - "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" - "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") - #:phases - #~(modify-phases %standard-phases - (add-after 'patch-usr-bin-file 'mpi-setup - #$%openmpi-setup) - (add-after 'patch-source-shebangs 'set-paths - (lambda _ - ;; Define paths to store locations. - (setenv "BLAS_DIR" - #$(this-package-input "openblas")) - (setenv "CATCH_DIR" - #$(this-package-input "catch")) - (setenv "LAPACK_DIR" - #$(this-package-input "openblas")) - (setenv "PETSC_DIR" - #$(this-package-input "petsc")) - (setenv "SLEPC_DIR" - #$(this-package-input "slepc")) - (setenv "SCOTCH_DIR" - #$(this-package-input "scotch")) - (setenv "SUNDIALS_DIR" - #$(this-package-input "sundials")) - (setenv "UMFPACK_DIR" - #$(this-package-input "suitesparse")))) - (add-before 'check 'pre-check - (lambda _ - ;; The Dolfin repository uses git-lfs, whereby web links are - ;; substituted for large files. Guix does not currently support - ;; git-lfs, so only the links are downloaded. The tests that - ;; require the absent meshes cannot run and are skipped. - ;; - ;; One serial test fails and is skipped. - ;; i) demo_multimesh-stokes_serial: - ;; Warning: Found no facets matching domain for boundary - ;; condition. - ;; - ;; One mpi test fails and is skipped. - ;; i) demo_stokes-iterative_mpi: - ;; The MPI_Comm_rank() function was called before MPI_INIT was - ;; invoked - (call-with-output-file "CTestCustom.cmake" - (lambda (port) - (display (string-append - "set(CTEST_CUSTOM_TESTS_IGNORE " - "demo_bcs_serial " - "demo_bcs_mpi " - "demo_eigenvalue_serial " - "demo_eigenvalue_mpi " - "demo_navier-stokes_serial " - "demo_navier-stokes_mpi " - "demo_stokes-taylor-hood_serial " - "demo_stokes-taylor-hood_mpi " - "demo_subdomains_serial " - "demo_advection-diffusion_serial " - "demo_advection-diffusion_mpi " - "demo_auto-adaptive-navier-stokes_serial " - "demo_contact-vi-snes_serial " - "demo_contact-vi-snes_mpi " - "demo_contact-vi-tao_serial " - "demo_contact-vi-tao_mpi " - "demo_curl-curl_serial " - "demo_curl-curl_mpi " - "demo_dg-advection-diffusion_serial " - "demo_dg-advection-diffusion_mpi " - "demo_elasticity_serial " - "demo_elasticity_mpi " - "demo_elastodynamics_serial " - "demo_elastodynamics_mpi " - "demo_lift-drag_serial " - "demo_lift-drag_mpi " - "demo_mesh-quality_serial " - "demo_mesh-quality_mpi " - "demo_multimesh-stokes_serial " - ")\n") port))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" "unittests") - (invoke "make" "demos") - (invoke "ctest" "-R" "unittests") - (invoke "ctest" "-R" "demo" "-R" "serial") - (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) + (list + #:configure-flags + #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON" + "-DDOLFIN_ENABLE_MPI:BOOL=ON" + "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" + "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" + "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" + "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-usr-bin-file 'mpi-setup + #$%openmpi-setup) + (add-after 'patch-source-shebangs 'set-paths + (lambda _ + ;; Define paths to store locations. + (setenv "BLAS_DIR" + #$(this-package-input "openblas")) + (setenv "CATCH_DIR" + #$(this-package-input "catch")) + (setenv "LAPACK_DIR" + #$(this-package-input "openblas")) + (setenv "PETSC_DIR" + #$(this-package-input "petsc")) + (setenv "SLEPC_DIR" + #$(this-package-input "slepc")) + (setenv "SCOTCH_DIR" + #$(this-package-input "scotch")) + (setenv "SUNDIALS_DIR" + #$(this-package-input "sundials")) + (setenv "UMFPACK_DIR" + #$(this-package-input "suitesparse")))) + (add-before 'check 'pre-check + (lambda _ + ;; The Dolfin repository uses git-lfs, whereby web links are + ;; substituted for large files. Guix does not currently support + ;; git-lfs, so only the links are downloaded. The tests that + ;; require the absent meshes cannot run and are skipped. + ;; + ;; One serial test fails and is skipped. + ;; i) demo_multimesh-stokes_serial: + ;; Warning: Found no facets matching domain for boundary + ;; condition. + ;; + ;; One mpi test fails and is skipped. + ;; i) demo_stokes-iterative_mpi: + ;; The MPI_Comm_rank() function was called before MPI_INIT was + ;; invoked + (call-with-output-file "CTestCustom.cmake" + (lambda (port) + (display (string-append "set(CTEST_CUSTOM_TESTS_IGNORE " + "demo_bcs_serial " + "demo_bcs_mpi " + "demo_eigenvalue_serial " + "demo_eigenvalue_mpi " + "demo_navier-stokes_serial " + "demo_navier-stokes_mpi " + "demo_stokes-taylor-hood_serial " + "demo_stokes-taylor-hood_mpi " + "demo_subdomains_serial " + "demo_advection-diffusion_serial " + "demo_advection-diffusion_mpi " + "demo_auto-adaptive-navier-stokes_serial " + "demo_contact-vi-snes_serial " + "demo_contact-vi-snes_mpi " + "demo_contact-vi-tao_serial " + "demo_contact-vi-tao_mpi " + "demo_curl-curl_serial " + "demo_curl-curl_mpi " + "demo_dg-advection-diffusion_serial " + "demo_dg-advection-diffusion_mpi " + "demo_elasticity_serial " + "demo_elasticity_mpi " + "demo_elastodynamics_serial " + "demo_elastodynamics_mpi " + "demo_lift-drag_serial " + "demo_lift-drag_mpi " + "demo_mesh-quality_serial " + "demo_mesh-quality_mpi " + "demo_multimesh-stokes_serial " + ")\n") port))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "unittests") + (invoke "make" "demos") + (invoke "ctest" "-R" "unittests") + (invoke "ctest" "-R" "demo" "-R" "serial") + (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) (home-page "https://bitbucket.org/fenics-project/dolfin/") (synopsis "Problem solving environment for differential equations") (description - "DOLFIN is a computational framework for finding numerical + "DOLFIN is a computational framework for finding numerical solutions to problems described by differential equations. Numerical models in DOLFIN are constructed using general families of finite elements. Data structures are provided for discretizing the governing @@ -896,17 +890,15 @@ (define-public fenics-dolfin ;; following exceptions: ;; ;; public-domain: dolfin/geometry/predicates.cpp - ;; dolfin/geometry/predicates.h + ;; dolfin/geometry/predicates.h ;; ;; zlib: dolfin/io/base64.cpp - ;; dolfin/io/base64.h + ;; dolfin/io/base64.h ;; ;; expat: dolfin/io/pugiconfig.hpp - ;; dolfin/io/pugixml.cpp - ;; dolfin/io/pugixml.hpp - (license (list license:public-domain - license:zlib - license:expat + ;; dolfin/io/pugixml.cpp + ;; dolfin/io/pugixml.hpp + (license (list license:public-domain license:zlib license:expat license:lgpl3+)))) (define-public fenics -- 2.39.5
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Paul Garlick <pgarlick@HIDDEN> Subject: bug#78878: Acknowledgement ([PATCH] gnu:fenics-dolfin: Fix build with hdf5@HIDDEN) Message-ID: <handler.78878.B.175069801011793.ack <at> debbugs.gnu.org> References: <20250623165849.3076997-1-pgarlick@HIDDEN> X-Gnu-PR-Message: ack 78878 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78878 <at> debbugs.gnu.org Date: Mon, 23 Jun 2025 17:01:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 78878 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 78878: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78878 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.