Package: guix-patches;
Reported by: David Elsing <david.elsing <at> posteo.net>
Date: Sun, 6 Apr 2025 23:25:01 UTC
Severity: normal
Tags: patch
Done: Andreas Enge <andreas <at> enge.fr>
To reply to this bug, email your comments to 77590 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Sun, 06 Apr 2025 23:25:02 GMT) Full text and rfc822 format available.David Elsing <david.elsing <at> posteo.net>
:guix-patches <at> gnu.org
.
(Sun, 06 Apr 2025 23:25:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: guix-patches <at> gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH 0/3] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Sun, 6 Apr 2025 23:23:10 +0000
This patch series updates hdf5 to 1.14.6 and applies the improvements from https://issues.guix.gnu.org/64448 only on the hdf5 package, which now does not inherit from hdf5-1.8 anymore. I also changed the package to the Git source, which was already used for hdf-java. Is the commit message fine like this? I mentioned the changes from before, where most things were inherited from hdf5-1.8. The Fortran output is currently only 2.8 MB (compared to 23 MB for the main output), so I removed the additional output, as it was causing problems with linking and the h5fc wrapper. The installation of the examples has been disabled by default upstream (not sure whether intentionally), so instead I made a separate package which builds and checks the examples, but produces no output. For hdf-java, I noticed that the used version does not have support for HDF4 and already uses the Git source of hdf5, so I adjusted the package accordingly and renamed it to hdf5-java. David Elsing (3): gnu: hdf5: Update to 1.14.6. gnu: Add hdf5-examples. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu/packages/maths.scm | 293 ++++++++++++++++++++++++++++++----------- 1 file changed, 218 insertions(+), 75 deletions(-) -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Sun, 06 Apr 2025 23:28:02 GMT) Full text and rfc822 format available.Message #8 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH 2/3] gnu: Add hdf5-examples. Date: Sun, 6 Apr 2025 23:26:41 +0000
* gnu/packages/maths.scm (hdf5-examples): New variable. --- gnu/packages/maths.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index e8258b681d..15e4ae6c86 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2017,6 +2017,20 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) +;; This package builds and tests the examples, but has empty output. +(define-public hdf5-examples + (package/inherit hdf5 + (name "hdf5-examples") + (arguments + (substitute-keyword-arguments (package-arguments hdf5) + ((#:phases _ #f) + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "HDF5Examples"))))))) + (inputs (list hdf5 zlib)) + (native-inputs (list autoconf-2.71 automake gfortran)))) + ;; Keep this in sync with the current hdf5 package. (define-public hdf-java (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Sun, 06 Apr 2025 23:28:02 GMT) Full text and rfc822 format available.Message #11 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH 1/3] gnu: hdf5: Update to 1.14.6. Date: Sun, 6 Apr 2025 23:26:40 +0000
* gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [source]: Switch to git-fetch. Add modules field and snippet. [outputs]: Remove field. [arguments]<#:phases>: Use gexps. Add 'hide-gfortran, 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'patch-configure.ac, 'fix-fortran-i686-test, 'generate-headers, and 'remove-subfiling-cppflags phases. Adjust 'patch-configure, 'patch-settings and 'patch-references phases. Remove 'split phase. [license]: Adjust URL. --- gnu/packages/maths.scm | 208 ++++++++++++++++++++++++++++++++++------- 1 file changed, 176 insertions(+), 32 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 6910b32dae..e8258b681d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -1837,41 +1837,185 @@ (define-public hdf5-1.10 ;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (patches (search-patches "hdf5-config-date.patch")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))))) + (build-system gnu-build-system) + (inputs + (list zlib)) + (native-inputs + (list autoconf-2.71 + autoconf-archive + automake + bison + flex + gfortran + libtool + ;; Needed to generate some headers and for tests + perl + which)) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + ''("--enable-cxx" + "--enable-fortran" + "--enable-fortran2003" + + ;; Build a thread-safe library. Unfortunately, + ;; 'configure' invites you to either turn off C++, + ;; Fortran, and the high-level interface (HL), or + ;; to pass '--enable-unsupported'. Debian + ;; packagers chose to pass '--enable-unsupported' + ;; and we follow their lead here. + "--enable-threadsafe" + "--with-pthread" + "--enable-unsupported") + ;; Use -fPIC to allow the R bindings to link with the static libraries + #:make-flags ''("CFLAGS=-fPIC" "CXXFLAGS=-fPIC") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; Fixes build on i686, see + ;; https://github.com/HDFGroup/hdf5/commit/0af668f4091f1c35f621d2acdeadd34db6756976 + (add-after 'unpack 'patch-configure.ac + (lambda _ + (substitute* "configure.ac" + (("AC_DEFINE.*HAVE_FLOAT128.*" orig) + (string-append orig "\nAC_CHECK_SIZEOF([__float128])\n"))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-before 'configure 'patch-configure + (lambda _ + (substitute* "configure" + (("/bin/mv") "mv")))) + (add-after 'configure 'patch-settings + (lambda _ + ;; libhdf5.settings contains the full path of the compilers + ;; used, and its contents are included in libhdf5.so. We + ;; truncate the hashes to avoid unnecessary store references to + ;; those compilers: + (substitute* '("src/H5build_settings.c" + "src/libhdf5.settings") + (("(/gnu/store/)([a-zA-Z0-9]*)" all prefix hash) + (string-append prefix (string-take hash 10) "...")) + ;; Don't record the build-time kernel version to make the + ;; settings file reproducible. + (("Uname information:[^\"\n\\\\]*") + "Uname information: Linux")))) + (add-after 'configure 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + ;; Remove include flag to directory in source tree + (add-after 'configure 'remove-subfiling-cppflags + (lambda _ + (substitute* '("src/H5build_settings.c" + "src/libhdf5.settings" + "bin/h5cc" + "c++/src/h5c++") + (("-I.*/src/H5FDsubfiling") "")))) + (add-after 'install 'patch-references + (lambda _ + (let ((bin (string-append #$output "/bin")) + (zlib #$(this-package-input "zlib"))) + (substitute* (find-files bin "h5p?cc") + (("-lz" lib) + (string-append "-L" zlib "/lib " lib))))))))) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Sun, 06 Apr 2025 23:28:03 GMT) Full text and rfc822 format available.Message #14 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH 3/3] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Sun, 6 Apr 2025 23:26:42 +0000
* gnu/packages/maths.scm (hdf-java): Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [arguments]: Adjust 'unbundle phase. Add 'patch-trace-shebang and 'generate-flexbison phases. [native-inputs]: Use modify-inputs. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. --- gnu/packages/maths.scm | 75 +++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 15e4ae6c86..251d1d8481 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2031,27 +2031,11 @@ (define-public hdf5-examples (inputs (list hdf5 zlib)) (native-inputs (list autoconf-2.71 automake gfortran)))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) (build-system gnu-build-system) (arguments (list @@ -2074,8 +2058,7 @@ (define-public hdf-java (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) + (substitute* (find-files "java" "Makefile.am") (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") simple) (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") @@ -2085,10 +2068,10 @@ (define-public hdf-java (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2108,30 +2091,32 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src")))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-simple) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") - - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) (define-public hdf-eos2 (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 07 Apr 2025 14:26:01 GMT) Full text and rfc822 format available.Message #17 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v2 0/3] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Mon, 7 Apr 2025 14:24:37 +0000
I forgot to include the updated patch for reproducibility of the hdf5 package and noticed that hdf5-java was also not reproducible, because the current date was included in the jar file. David Elsing (3): gnu: hdf5: Update to 1.14.6. gnu: Add hdf5-examples. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu/local.mk | 1 + gnu/packages/maths.scm | 304 +++++++++++++----- .../patches/hdf5-reproducibility.patch | 20 ++ 3 files changed, 249 insertions(+), 76 deletions(-) create mode 100644 gnu/packages/patches/hdf5-reproducibility.patch -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 07 Apr 2025 14:26:02 GMT) Full text and rfc822 format available.Message #20 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v2 1/3] gnu: hdf5: Update to 1.14.6. Date: Mon, 7 Apr 2025 14:24:38 +0000
* gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [source]: Switch to git-fetch. Add modules field and snippet. Use different patch file. [outputs]: Remove field. [arguments]<#:phases>: Use gexps. Add 'hide-gfortran, 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'patch-configure.ac, 'fix-fortran-i686-test, 'generate-headers, and 'remove-subfiling-cppflags phases. Adjust 'patch-configure, 'patch-settings and 'patch-references phases. Remove 'split phase. [license]: Adjust URL. * gnu/packages/patches/hdf5-reproducibility.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 209 +++++++++++++++--- .../patches/hdf5-reproducibility.patch | 20 ++ 3 files changed, 197 insertions(+), 33 deletions(-) create mode 100644 gnu/packages/patches/hdf5-reproducibility.patch diff --git a/gnu/local.mk b/gnu/local.mk index acc1a2bfa7..9cf7fb3e24 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1575,6 +1575,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ %D%/packages/patches/hdf5-config-date.patch \ + %D%/packages/patches/hdf5-reproducibility.patch \ %D%/packages/patches/hdf-eos2-build-shared.patch \ %D%/packages/patches/hdf-eos2-remove-gctp.patch \ %D%/packages/patches/hdf-eos2-fortrantests.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 6910b32dae..d11fff3bc5 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -1834,44 +1834,187 @@ (define-public hdf5-1.10 (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) (patches (search-patches "hdf5-config-date.patch")))))) -;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (patches (search-patches "hdf5-reproducibility.patch")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))))) + (build-system gnu-build-system) + (inputs + (list zlib)) + (native-inputs + (list autoconf-2.71 + autoconf-archive + automake + bison + flex + gfortran + libtool + ;; Needed to generate some headers and for tests + perl + which)) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + ''("--enable-cxx" + "--enable-fortran" + "--enable-fortran2003" + + ;; Build a thread-safe library. Unfortunately, + ;; 'configure' invites you to either turn off C++, + ;; Fortran, and the high-level interface (HL), or + ;; to pass '--enable-unsupported'. Debian + ;; packagers chose to pass '--enable-unsupported' + ;; and we follow their lead here. + "--enable-threadsafe" + "--with-pthread" + "--enable-unsupported") + ;; Use -fPIC to allow the R bindings to link with the static libraries + #:make-flags ''("CFLAGS=-fPIC" "CXXFLAGS=-fPIC") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; Fixes build on i686, see + ;; https://github.com/HDFGroup/hdf5/commit/0af668f4091f1c35f621d2acdeadd34db6756976 + (add-after 'unpack 'patch-configure.ac + (lambda _ + (substitute* "configure.ac" + (("AC_DEFINE.*HAVE_FLOAT128.*" orig) + (string-append orig "\nAC_CHECK_SIZEOF([__float128])\n"))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-before 'configure 'patch-configure + (lambda _ + (substitute* "configure" + (("/bin/mv") "mv")))) + (add-after 'configure 'patch-settings + (lambda _ + ;; libhdf5.settings contains the full path of the compilers + ;; used, and its contents are included in libhdf5.so. We + ;; truncate the hashes to avoid unnecessary store references to + ;; those compilers: + (substitute* '("src/H5build_settings.c" + "src/libhdf5.settings") + (("(/gnu/store/)([a-zA-Z0-9]*)" all prefix hash) + (string-append prefix (string-take hash 10) "...")) + ;; Don't record the build-time kernel version to make the + ;; settings file reproducible. + (("Uname information:[^\"\n\\\\]*") + "Uname information: Linux")))) + (add-after 'configure 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + ;; Remove include flag to directory in source tree + (add-after 'configure 'remove-subfiling-cppflags + (lambda _ + (substitute* '("src/H5build_settings.c" + "src/libhdf5.settings" + "bin/h5cc" + "c++/src/h5c++") + (("-I.*/src/H5FDsubfiling") "")))) + (add-after 'install 'patch-references + (lambda _ + (let ((bin (string-append #$output "/bin")) + (zlib #$(this-package-input "zlib"))) + (substitute* (find-files bin "h5p?cc") + (("-lz" lib) + (string-append "-L" zlib "/lib " lib))))))))) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java diff --git a/gnu/packages/patches/hdf5-reproducibility.patch b/gnu/packages/patches/hdf5-reproducibility.patch new file mode 100644 index 0000000000..56c9308c10 --- /dev/null +++ b/gnu/packages/patches/hdf5-reproducibility.patch @@ -0,0 +1,20 @@ +Honor SOURCE_DATE_EPOCH when exporting configuration date. + +--- a/configure.ac ++++ b/configure.ac +@@ -3566,7 +3566,14 @@ + AC_SUBST([H5_VERSION]) + + ## Configuration date +-AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" ++AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date -u`" ++if test -n "$SOURCE_DATE_EPOCH"; then ++ CONFIG_DATE=`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \ ++ || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null` ++ if test -z "$CONFIG_DATE"; then ++ as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5 ++ fi ++fi + + ## User doing the configuration + AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 07 Apr 2025 14:26:02 GMT) Full text and rfc822 format available.Message #23 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v2 2/3] gnu: Add hdf5-examples. Date: Mon, 7 Apr 2025 14:24:39 +0000
* gnu/packages/maths.scm (hdf5-examples): New variable. --- gnu/packages/maths.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d11fff3bc5..6d7466774d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2016,6 +2016,20 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) +;; This package builds and tests the examples, but has empty output. +(define-public hdf5-examples + (package/inherit hdf5 + (name "hdf5-examples") + (arguments + (substitute-keyword-arguments (package-arguments hdf5) + ((#:phases _ #f) + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "HDF5Examples"))))))) + (inputs (list hdf5 zlib)) + (native-inputs (list autoconf-2.71 automake gfortran)))) + ;; Keep this in sync with the current hdf5 package. (define-public hdf-java (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 07 Apr 2025 14:26:03 GMT) Full text and rfc822 format available.Message #26 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v2 3/3] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Mon, 7 Apr 2025 14:24:40 +0000
* gnu/packages/maths.scm (hdf-java): Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [arguments]: Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. --- gnu/packages/maths.scm | 85 ++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 45 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 6d7466774d..511cd1c94b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2030,33 +2030,24 @@ (define-public hdf5-examples (inputs (list hdf5 zlib)) (native-inputs (list autoconf-2.71 automake gfortran)))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) (build-system gnu-build-system) (arguments (list #:configure-flags #~(list "--enable-java" "--disable-tools") + #:modules + '((guix build gnu-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%default-gnu-imported-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -2073,8 +2064,7 @@ (define-public hdf-java (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) + (substitute* (find-files "java" "Makefile.am") (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") simple) (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") @@ -2084,10 +2074,10 @@ (define-public hdf-java (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2107,30 +2097,35 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") - - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) (define-public hdf-eos2 (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 09 Apr 2025 08:58:01 GMT) Full text and rfc822 format available.Message #29 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: David Elsing <david.elsing <at> posteo.net> Cc: rekado <at> elephly.net, bavier <at> posteo.net, sharlatanus <at> gmail.com, 77590 <at> debbugs.gnu.org Subject: Re: [PATCH v2 1/3] gnu: hdf5: Update to 1.14.6. Date: Wed, 9 Apr 2025 10:57:13 +0200
Hello David, I only had a very cursory look at your patches; they are not picked up by QA, did you use "git send-email" for submitting them? I do not think the hdf5-examples package makes sense if the examples are not installed as some kind of documentation. What is its goal? We could either drop it altogether. Or include its phases somehow into the main hdf5 package so that its tests constitute an additional check phase. Or also install the examples. I suppose you wrote the reproducibility patch for hdf(5)-java yourself; would it make sense to upstream it? Andreas
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Thu, 10 Apr 2025 13:23:02 GMT) Full text and rfc822 format available.Message #32 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: Andreas Enge <andreas <at> enge.fr> Cc: rekado <at> elephly.net, bavier <at> posteo.net, sharlatanus <at> gmail.com, 77590 <at> debbugs.gnu.org Subject: Re: [PATCH v2 1/3] gnu: hdf5: Update to 1.14.6. Date: Thu, 10 Apr 2025 13:22:19 +0000
Hello, Andreas Enge <andreas <at> enge.fr> writes: > I only had a very cursory look at your patches; they are not picked up > by QA, did you use "git send-email" for submitting them? Yes, I sent them as usual. > I do not think the hdf5-examples package makes sense if the examples are > not installed as some kind of documentation. What is its goal? We could > either drop it altogether. Or include its phases somehow into the main > hdf5 package so that its tests constitute an additional check phase. > Or also install the examples. I'm also not sure how useful installing the examples would be, as they are included in the source already, so I think we should just remove the package. > I suppose you wrote the reproducibility patch for hdf(5)-java yourself; > would it make sense to upstream it? No, I adapted the previous patch in Guix, which modifies the "configure" script, to change "configure.ac" instead. For hdf5-java, I added the 'strip-jar-timestamps phase. Anyway, I just noticed that upstream removed the Autotools build scripts (in favor of CMake) last month. :) I'll change the packages to already use CMake instead. Best, David
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Thu, 10 Apr 2025 22:42:02 GMT) Full text and rfc822 format available.Message #35 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v3 0/2] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Thu, 10 Apr 2025 22:41:23 +0000
Because the Autotools scripts were removed in the development branch upstream, I changed the packages to cmake-build-system. Additionally, I did not include the example package and the examples are not installed, which does not seem to be intended by upstream anyway. They are also still included in the source. For hdf-java, I removed the installation of the external slf4j-*.jar files, as they are just copied to the lib directory. David Elsing (2): gnu: hdf5: Update to 1.14.6. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu/packages/maths.scm | 266 ++++++++++++++++++++++++++++------------- 1 file changed, 181 insertions(+), 85 deletions(-) -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Thu, 10 Apr 2025 22:44:02 GMT) Full text and rfc822 format available.Message #38 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v3 1/2] gnu: hdf5: Update to 1.14.6. Date: Thu, 10 Apr 2025 22:42:55 +0000
* gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [name, version]: New field. [source]: Switch to git-fetch. Add modules and snippet fields. Use different patch file. [build-system]: New field. Use CMake. [inputs]: New field. [native-inputs]: New field. Add bison, flex and which. [arguments]: Do not inherit from hdf5-1.8. <#:configure-flags>: New field. <#:phases>: New field. Use gexps. Remove 'patch-configure, 'patch-settings, 'patch-references, 'split, 'skip-version-test and 'patch-configure-build-settings phases. Add 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'fix-fortran-i686-test and 'generate-headers phases. [home-page, synopsis, description]: New fields. [license]: New field. Adjust URL. --- gnu/packages/maths.scm | 152 ++++++++++++++++++++++++++++++++--------- 1 file changed, 119 insertions(+), 33 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 11a86216aa..5b7398756c 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -1834,44 +1834,130 @@ (define-public hdf5-1.10 (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) (patches (search-patches "hdf5-config-date.patch")))))) -;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))))) + (build-system cmake-build-system) + (inputs (list zlib)) + (native-inputs + (list bison + flex + gfortran + ;; Needed to generate some headers and for tests + perl + which)) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + ''("-DHD5F_ENABLE_THREADSAFE=ON" + "-DHDF5_BUILD_CPP_LIB=ON" + "-DHDF5_BUILD_DOC=ON" + "-DHDF5_BUILD_FORTRAN=ON") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt")))))) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Thu, 10 Apr 2025 22:44:02 GMT) Full text and rfc822 format available.Message #41 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v3 2/2] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Thu, 10 Apr 2025 22:42:56 +0000
* gnu/packages/maths.scm (hdf-java): Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [build-system]: Change to cmake-build-system. [arguments]: Adjust #:configure-flags. Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison, 'generate-headers and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add java-slf4j-nop and zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. --- gnu/packages/maths.scm | 118 ++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 54 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 5b7398756c..e6e4008d53 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1959,33 +1959,24 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) - (build-system gnu-build-system) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) + (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "--enable-java" - "--disable-tools") + #~(list "-DHDF5_BUILD_JAVA=ON" + "-DHDF5_BUILD_TOOLS=OFF") + #:modules + '((guix build cmake-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%cmake-build-system-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -1996,27 +1987,35 @@ (define-public hdf-java (api (search-input-file inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) + (nop + (search-input-file + inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) (junit (search-input-file inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) - (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") - simple) - (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") - api) - (("\\$\\(top_srcdir\\)/java/lib/junit.jar") + (substitute* "CMakeLists.txt" + (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) + (string-append orig api ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) + (string-append orig nop ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) + (string-append orig simple ")\n"))) + ;; Do not install copies of external libraries + (substitute* "java/CMakeLists.txt" + ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) + (substitute* "java/test/CMakeLists.txt" + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") junit) - (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2036,30 +2035,41 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-nop) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") - - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) (define-public hdf-eos2 (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Fri, 11 Apr 2025 13:24:02 GMT) Full text and rfc822 format available.Message #44 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: David Elsing <david.elsing <at> posteo.net> Cc: rekado <at> elephly.net, bavier <at> posteo.net, sharlatanus <at> gmail.com, 77590 <at> debbugs.gnu.org Subject: Re: [PATCH v2 1/3] gnu: hdf5: Update to 1.14.6. Date: Fri, 11 Apr 2025 15:23:30 +0200
Am Thu, Apr 10, 2025 at 01:22:19PM +0000 schrieb David Elsing: > Anyway, I just noticed that upstream removed the Autotools build scripts > (in favor of CMake) last month. :) > I'll change the packages to already use CMake instead. It fails like so: https://bordeaux.guix.gnu.org/build/fd03d80a-ba7b-4b60-b370-50f63edc2e84/log starting phase `configure' source directory: "/tmp/guix-build-hdf5-parallel-openmpi-1.14.6.drv-0/source" (relative from build: "../source") build directory: "/tmp/guix-build-hdf5-parallel-openmpi-1.14.6.drv-0/build" running 'cmake' with arguments ("../source" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/fmbv1qibdpvadm83wxkjlwbvab6pv862-hdf5-parallel-openmpi-1.14.6" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/fmbv1qibdpvadm83wxkjlwbvab6pv862-hdf5-parallel-openmpi-1.14.6/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "--enable-parallel" "-DHD5F_ENABLE_THREADSAFE=ON" "-DHDF5_BUILD_CPP_LIB=ON" "-DHDF5_BUILD_DOC=ON" "-DHDF5_BUILD_FORTRAN=ON") CMake Error: Unknown argument --enable-parallel CMake Error: Run 'cmake --help' for all supported options. Andreas
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:09:02 GMT) Full text and rfc822 format available.Message #47 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, andreas <at> enge.fr Subject: [PATCH v4 0/5] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Mon, 14 Apr 2025 17:07:56 +0000
I fixed the build of the reported new failures (hdf5-parallel-openmpi, insight-toolkit (all versions), itk-snap, netcdf-fortran and satdump) for x86_64-linux. For satdump, the issue was that because now the hdf5 installation is detected, an optional plugin is built, which has an incomplete RUNPATH. Also, I set the correct "-DHDF5_ENABLE_THREADSAFE=ON" flag and added some missing inputs. David Elsing (5): gnu: hdf5: Update to 1.14.6. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu: netcdf: Fix test. gnu: netcdf-fortran: Add missing inputs. gnu: satdump: Fix RUNPATH for a plugin. gnu/local.mk | 1 + gnu/packages/maths.scm | 314 ++++++++++++------ .../patches/hdf5-config-dependencies.patch | 31 ++ gnu/packages/radio.scm | 17 +- 4 files changed, 254 insertions(+), 109 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:11:01 GMT) Full text and rfc822 format available.Message #50 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v4 1/5] gnu: hdf5: Update to 1.14.6. Date: Mon, 14 Apr 2025 17:09:24 +0000
* gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [name, version]: New field. [source]: Switch to git-fetch. Add modules and snippet fields. Use different patch file. [build-system]: New field. Use CMake. [inputs]: New field. [native-inputs]: New field. Add bison, flex and which. [arguments]: Do not inherit from hdf5-1.8. <#:configure-flags>: New field. <#:phases>: New field. Use gexps. Remove 'patch-configure, 'patch-settings, 'patch-references, 'split, 'skip-version-test and 'patch-configure-build-settings phases. Add 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'fix-fortran-i686-test and 'generate-headers phases. [home-page, synopsis, description]: New fields. [license]: New field. Adjust URL. * gnu/packages/patches/hdf5-config-dependencies.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 193 +++++++++++++----- .../patches/hdf5-config-dependencies.patch | 31 +++ 3 files changed, 171 insertions(+), 54 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8ff2af1474..714798768f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1572,6 +1572,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ %D%/packages/patches/hdf5-config-date.patch \ + %D%/packages/patches/hdf5-config-dependencies.patch \ %D%/packages/patches/hdf-eos2-build-shared.patch \ %D%/packages/patches/hdf-eos2-remove-gctp.patch \ %D%/packages/patches/hdf-eos2-fortrantests.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 11a86216aa..ddea48a046 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -137,6 +137,7 @@ (define-module (gnu packages maths) #:use-module (gnu packages gettext) #:use-module (gnu packages gcc) #:use-module (gnu packages gd) + #:use-module (gnu packages geo) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gperf) @@ -1834,44 +1835,141 @@ (define-public hdf5-1.10 (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) (patches (search-patches "hdf5-config-date.patch")))))) -;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))) + (patches (search-patches "hdf5-config-dependencies.patch")))) + (build-system cmake-build-system) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + #~(list + (string-append "-DHDF5_INSTALL_CMAKE_DIR=" #$output "/lib/cmake") + "-DHDF5_BUILD_CPP_LIB=ON" + "-DHDF5_BUILD_FORTRAN=ON" + ;; Build a thread-safe library. Unfortunately, CMakeLists.txt + ;; invites you to either turn off C++, Fortran, and the high-level + ;; interface (HL), or to enable 'ALLOW_UNSUPPORTED'. Debian + ;; packagers chose to pass '--enable-unsupported' to the 'configure' + ;; script and we follow their lead here. + "-DHDF5_ENABLE_THREADSAFE=ON" + "-DALLOW_UNSUPPORTED=ON" + "-DHDF5_BUILD_DOC=ON") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt")))))) + (inputs (list libaec zlib)) + (native-inputs + (list bison + doxygen + flex + gfortran + graphviz + ;; Needed to generate some headers and for tests + perl + which)) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java @@ -2075,32 +2173,19 @@ (define-public hdf-eos5 (define-public hdf5-parallel-openmpi (package/inherit hdf5 (name "hdf5-parallel-openmpi") - (inputs - `(("mpi" ,openmpi) - ,@(package-inputs hdf5))) + (inputs (modify-inputs (package-inputs hdf5) + (prepend openmpi))) (arguments (substitute-keyword-arguments (package-arguments hdf5) - ((#:configure-flags flags) - #~(cons "--enable-parallel" - (delete "--enable-cxx" - (delete "--enable-threadsafe" #$flags)))) + ((#:configure-flags _ #f) + ''("-DHDF5_ENABLE_THREADSAFE=OFF" + "-DHDF5_ENABLE_PARALLEL=ON" + "-DHDF5_BUILD_CPP_LIB=OFF" + "-DHDF5_BUILD_DOC=ON")) ((#:phases phases) #~(modify-phases #$phases (add-after 'build 'mpi-setup - #$%openmpi-setup) - (add-before 'check 'patch-tests - (lambda _ - ;; OpenMPI's mpirun will exit with non-zero status if it - ;; detects an "abnormal termination", i.e. any process not - ;; calling MPI_Finalize(). Since the test is explicitly - ;; avoiding MPI_Finalize so as not to have at_exit and thus - ;; H5C_flush_cache from being called, mpirun will always - ;; complain, so turn this test off. - (substitute* "testpar/Makefile" - (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) - (string-append front back "\n"))) - (substitute* "tools/test/h5diff/testph5diff.sh" - (("/bin/sh") (which "sh"))))))))) + #$%openmpi-setup))))) (synopsis "Management suite for data with parallel IO support"))) (define-public hdf5-blosc diff --git a/gnu/packages/patches/hdf5-config-dependencies.patch b/gnu/packages/patches/hdf5-config-dependencies.patch new file mode 100644 index 0000000000..cf448dac44 --- /dev/null +++ b/gnu/packages/patches/hdf5-config-dependencies.patch @@ -0,0 +1,31 @@ +The installed CMake configuration is missing targets for zlib and +libaec. Taken from +https://github.com/microsoft/vcpkg/blob/e36fe7110deac47a3aff8eda3dcc7cfb894a2ebf/ports/hdf5/hdf5_config.patch + +diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in +index 1a3fb7bbf2..79081ce040 100644 +--- a/config/cmake/hdf5-config.cmake.in ++++ b/config/cmake/hdf5-config.cmake.in +@@ -120,12 +114,22 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) + # Don't include targets if this file is being picked up by another + # project which has already built hdf5 as a subproject + #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) + if (NOT TARGET "@HDF5_PACKAGE@") + if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) ++ find_dependency(ZLIB) + endif () + if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) ++ if (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS) ++ set(libaec_USE_STATIC_LIBS ON) ++ else() ++ set(libaec_USE_STATIC_LIBS OFF) ++ endif() ++ find_dependency(libaec) + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + endif () -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:11:02 GMT) Full text and rfc822 format available.Message #53 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v4 2/5] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Mon, 14 Apr 2025 17:09:25 +0000
* gnu/packages/maths.scm (hdf-java): Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [build-system]: Change to cmake-build-system. [arguments]: Adjust #:configure-flags. Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison, 'generate-headers and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add java-slf4j-nop and zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. --- gnu/packages/maths.scm | 118 ++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 54 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ddea48a046..1d7e81815d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1971,33 +1971,24 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) - (build-system gnu-build-system) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) + (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "--enable-java" - "--disable-tools") + #~(list "-DHDF5_BUILD_JAVA=ON" + "-DHDF5_BUILD_TOOLS=OFF") + #:modules + '((guix build cmake-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%cmake-build-system-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -2008,27 +1999,35 @@ (define-public hdf-java (api (search-input-file inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) + (nop + (search-input-file + inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) (junit (search-input-file inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) - (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") - simple) - (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") - api) - (("\\$\\(top_srcdir\\)/java/lib/junit.jar") + (substitute* "CMakeLists.txt" + (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) + (string-append orig api ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) + (string-append orig nop ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) + (string-append orig simple ")\n"))) + ;; Do not install copies of external libraries + (substitute* "java/CMakeLists.txt" + ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) + (substitute* "java/test/CMakeLists.txt" + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") junit) - (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2048,30 +2047,41 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-nop) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") - - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) (define-public hdf-eos2 (package -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:12:01 GMT) Full text and rfc822 format available.Message #56 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v4 3/5] gnu: netcdf: Fix test. Date: Mon, 14 Apr 2025 17:09:26 +0000
* gnu/packages/maths.scm (netcdf) [native-inputs]: Add libaec. --- gnu/packages/maths.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 1d7e81815d..ee27eb2ddc 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2379,7 +2379,10 @@ (define-public netcdf (patches (search-patches "netcdf-date-time.patch")))) (build-system gnu-build-system) (native-inputs - (list m4 doxygen graphviz)) + (list doxygen + graphviz + libaec + m4)) (inputs (list curl hdf4-alt -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:12:02 GMT) Full text and rfc822 format available.Message #59 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v4 4/5] gnu: netcdf-fortran: Add missing inputs. Date: Mon, 14 Apr 2025 17:09:27 +0000
* gnu/packages/maths.scm (netcdf-fortran)[inputs]: Add libaec and hdf5. --- gnu/packages/maths.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ee27eb2ddc..59f227afa0 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2475,7 +2475,7 @@ (define-public netcdf-fortran "FFLAGS=-fallow-argument-mismatch") #:parallel-tests? #f)) (inputs - (list netcdf)) + (list libaec hdf5 netcdf)) (native-inputs (list gfortran)) (synopsis "Fortran interface for the netCDF library") -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 14 Apr 2025 17:12:02 GMT) Full text and rfc822 format available.Message #62 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v4 5/5] gnu: satdump: Fix RUNPATH for a plugin. Date: Mon, 14 Apr 2025 17:09:28 +0000
* gnu/packages/radio.scm (satdump)[arguments]: Add 'fix-runpath phase. --- gnu/packages/radio.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 3724988ce4..24ae6ec821 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -3245,7 +3245,22 @@ (define-public satdump volk (list zstd "lib"))) (arguments - (list #:tests? #f)) ; No test suite + (list + #:tests? #f ; No test suite + #:phases + #~(modify-phases %standard-phases + ;; The RUNPATH of this shared library is missing the + ;; .../lib/satdump/plugins directory, which fails the + ;; 'validate-runpath' phase. + (add-after 'unpack 'fix-runpath + (lambda _ + (substitute* "plugins/official_products_support/CMakeLists.txt" + (("add_library\\(official_products_loader_support.*" orig) + (string-append + orig "\n" "set_target_properties(" + "official_products_loader_support" + " PROPERTIES INSTALL_RPATH \"" + #$output "/lib:" #$output "/lib/satdump/plugins\")\n")))))))) (home-page "https://www.satdump.org/") (synopsis "Satellite data processing software") (description "SatDump is a generic satellite data processing software. -- 2.48.1
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:14:01 GMT) Full text and rfc822 format available.Message #65 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 0/5] Small changes Date: Tue, 29 Apr 2025 15:07:51 +0200
Hello David, thanks for the updated patch series! QA shows a few package failures: https://qa.guix.gnu.org/issue/77590/package-changes?x86_64-linux-change=broken&x86_64-linux-change=still-failing&x86_64-linux-change=unknown-to-failing&x86_64-linux-change=new-failing hdf5-parallel-openmpi succeeds locally for me. gnudatalanguage does not find hdf5 any more. cdo does not find the nc_open symbol in netcdf anymore; I do not see how this could be related to the patch series. I even tried to not update hdf5 and to only apply the netcdf related patches, and this already caused a problem, which is very strange since the only changes are the additions of inputs. I am sending a slightly updated patch series; in particular I have added hdf-java as a deprecated alias for hdf5-java. So people's profiles do not break. Do you think you could have a look at the new failures? Andreas David Elsing (5): gnu: hdf5: Update to 1.14.6. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu: netcdf: Fix test. gnu: netcdf-fortran: Add missing inputs. gnu: satdump: Fix RUNPATH for a plugin. gnu/local.mk | 1 + gnu/packages/maths.scm | 312 ++++++++++++------ .../patches/hdf5-config-dependencies.patch | 31 ++ gnu/packages/radio.scm | 17 +- 4 files changed, 253 insertions(+), 108 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch base-commit: 6ec4ed678fd9d1ead03cfb2860556dd8b17de755 -- 2.49.0
andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:14:02 GMT) Full text and rfc822 format available.Message #68 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 3/5] gnu: netcdf: Fix test. Date: Tue, 29 Apr 2025 15:07:54 +0200
From: David Elsing <david.elsing <at> posteo.net> * gnu/packages/maths.scm (netcdf)[native-inputs]: Add libaec. Change-Id: Ia6a0b742b7e590930c308434b59988e374ccff85 Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index bb0facc55a..1bfde8fa8d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2363,7 +2363,7 @@ (define-public netcdf (patches (search-patches "netcdf-date-time.patch")))) (build-system gnu-build-system) (native-inputs - (list m4 doxygen graphviz)) + (list doxygen graphviz libaec m4)) (inputs (list curl hdf4-alt -- 2.49.0
andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:14:02 GMT) Full text and rfc822 format available.Message #71 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 4/5] gnu: netcdf-fortran: Add missing inputs. Date: Tue, 29 Apr 2025 15:07:55 +0200
From: David Elsing <david.elsing <at> posteo.net> * gnu/packages/maths.scm (netcdf-fortran)[inputs]: Add libaec and hdf5. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 1bfde8fa8d..76b7b290af 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2456,7 +2456,7 @@ (define-public netcdf-fortran "FFLAGS=-fallow-argument-mismatch") #:parallel-tests? #f)) (inputs - (list netcdf)) + (list libaec hdf5 netcdf)) (native-inputs (list gfortran)) (synopsis "Fortran interface for the netCDF library") -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:14:03 GMT) Full text and rfc822 format available.Message #74 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 5/5] gnu: satdump: Fix RUNPATH for a plugin. Date: Tue, 29 Apr 2025 15:07:56 +0200
From: David Elsing <david.elsing <at> posteo.net> * gnu/packages/radio.scm (satdump)[arguments]: Add 'fix-runpath phase. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/radio.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 78888dcee5..54b1f0c373 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -3349,7 +3349,22 @@ (define-public satdump volk (list zstd "lib"))) (arguments - (list #:tests? #f)) ; No test suite + (list + #:tests? #f ; No test suite + #:phases + #~(modify-phases %standard-phases + ;; The RUNPATH of this shared library is missing the + ;; .../lib/satdump/plugins directory, which fails the + ;; 'validate-runpath' phase. + (add-after 'unpack 'fix-runpath + (lambda _ + (substitute* "plugins/official_products_support/CMakeLists.txt" + (("add_library\\(official_products_loader_support.*" orig) + (string-append + orig "\n" "set_target_properties(" + "official_products_loader_support" + " PROPERTIES INSTALL_RPATH \"" + #$output "/lib:" #$output "/lib/satdump/plugins\")\n")))))))) (home-page "https://www.satdump.org/") (synopsis "Satellite data processing software") (description "SatDump is a generic satellite data processing software. -- 2.49.0
andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:14:04 GMT) Full text and rfc822 format available.Message #77 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 2/5] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Tue, 29 Apr 2025 15:07:53 +0200
From: David Elsing <david.elsing <at> posteo.net> * gnu/packages/maths.scm (hdf-java): Define as deprecated alias for... (hdf5-java): ...this new variable. Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [build-system]: Change to cmake-build-system. [arguments]: Adjust #:configure-flags. Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison, 'generate-headers and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add java-slf4j-nop and zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. Change-Id: Idfceec17b9a8c432ab85e2fcc87de6bb5bd5a422 Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 119 +++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index a2dd515dc4..bb0facc55a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1973,33 +1973,24 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) - (build-system gnu-build-system) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) + (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "--enable-java" - "--disable-tools") + #~(list "-DHDF5_BUILD_JAVA=ON" + "-DHDF5_BUILD_TOOLS=OFF") + #:modules + '((guix build cmake-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%cmake-build-system-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -2010,27 +2001,35 @@ (define-public hdf-java (api (search-input-file inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) + (nop + (search-input-file + inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) (junit (search-input-file inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) - (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") - simple) - (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") - api) - (("\\$\\(top_srcdir\\)/java/lib/junit.jar") + (substitute* "CMakeLists.txt" + (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) + (string-append orig api ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) + (string-append orig nop ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) + (string-append orig simple ")\n"))) + ;; Do not install copies of external libraries + (substitute* "java/CMakeLists.txt" + ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) + (substitute* "java/test/CMakeLists.txt" + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") junit) - (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2050,30 +2049,44 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-nop) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) +(define-public hdf-java + (deprecated-package "hdf-java" hdf5-java)) (define-public hdf-eos2 (package -- 2.49.0
andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 29 Apr 2025 13:15:01 GMT) Full text and rfc822 format available.Message #80 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v5 1/5] gnu: hdf5: Update to 1.14.6. Date: Tue, 29 Apr 2025 15:07:52 +0200
From: David Elsing <david.elsing <at> posteo.net> * gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [name, version]: New field. [source]: Switch to git-fetch. Add modules and snippet fields. Use different patch file. [build-system]: New field. Use CMake. [inputs]: New field. [native-inputs]: New field. Add bison, flex and which. [arguments]: Do not inherit from hdf5-1.8. <#:configure-flags>: New field. <#:phases>: New field. Use gexps. Remove 'patch-configure, 'patch-settings, 'patch-references, 'split, 'skip-version-test and 'patch-configure-build-settings phases. Add 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'fix-fortran-i686-test and 'generate-headers phases. [home-page, synopsis, description]: New fields. [license]: New field. Adjust URL. * gnu/packages/patches/hdf5-config-dependencies.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/local.mk | 1 + gnu/packages/maths.scm | 193 +++++++++++++----- .../patches/hdf5-config-dependencies.patch | 31 +++ 3 files changed, 171 insertions(+), 54 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch diff --git a/gnu/local.mk b/gnu/local.mk index cc57222a91..78b3a03b07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1574,6 +1574,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ %D%/packages/patches/hdf5-config-date.patch \ + %D%/packages/patches/hdf5-config-dependencies.patch \ %D%/packages/patches/hdf-eos2-build-shared.patch \ %D%/packages/patches/hdf-eos2-remove-gctp.patch \ %D%/packages/patches/hdf-eos2-fortrantests.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index bb2b401dd2..a2dd515dc4 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -139,6 +139,7 @@ (define-module (gnu packages maths) #:use-module (gnu packages gettext) #:use-module (gnu packages gcc) #:use-module (gnu packages gd) + #:use-module (gnu packages geo) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gperf) @@ -1836,44 +1837,141 @@ (define-public hdf5-1.10 (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) (patches (search-patches "hdf5-config-date.patch")))))) -;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))) + (patches (search-patches "hdf5-config-dependencies.patch")))) + (build-system cmake-build-system) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + #~(list + (string-append "-DHDF5_INSTALL_CMAKE_DIR=" #$output "/lib/cmake") + "-DHDF5_BUILD_CPP_LIB=ON" + "-DHDF5_BUILD_FORTRAN=ON" + ;; Build a thread-safe library. Unfortunately, CMakeLists.txt + ;; invites you to either turn off C++, Fortran, and the high-level + ;; interface (HL), or to enable 'ALLOW_UNSUPPORTED'. Debian + ;; packagers chose to pass '--enable-unsupported' to the 'configure' + ;; script and we follow their lead here. + "-DHDF5_ENABLE_THREADSAFE=ON" + "-DALLOW_UNSUPPORTED=ON" + "-DHDF5_BUILD_DOC=ON") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt")))))) + (inputs (list libaec zlib)) + (native-inputs + (list bison + doxygen + flex + gfortran + graphviz + ;; Needed to generate some headers and for tests + perl + which)) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java @@ -2077,32 +2175,19 @@ (define-public hdf-eos5 (define-public hdf5-parallel-openmpi (package/inherit hdf5 (name "hdf5-parallel-openmpi") - (inputs - `(("mpi" ,openmpi) - ,@(package-inputs hdf5))) + (inputs (modify-inputs (package-inputs hdf5) + (prepend openmpi))) (arguments (substitute-keyword-arguments (package-arguments hdf5) - ((#:configure-flags flags) - #~(cons "--enable-parallel" - (delete "--enable-cxx" - (delete "--enable-threadsafe" #$flags)))) + ((#:configure-flags _ #f) + ''("-DHDF5_ENABLE_THREADSAFE=OFF" + "-DHDF5_ENABLE_PARALLEL=ON" + "-DHDF5_BUILD_CPP_LIB=OFF" + "-DHDF5_BUILD_DOC=ON")) ((#:phases phases) #~(modify-phases #$phases (add-after 'build 'mpi-setup - #$%openmpi-setup) - (add-before 'check 'patch-tests - (lambda _ - ;; OpenMPI's mpirun will exit with non-zero status if it - ;; detects an "abnormal termination", i.e. any process not - ;; calling MPI_Finalize(). Since the test is explicitly - ;; avoiding MPI_Finalize so as not to have at_exit and thus - ;; H5C_flush_cache from being called, mpirun will always - ;; complain, so turn this test off. - (substitute* "testpar/Makefile" - (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) - (string-append front back "\n"))) - (substitute* "tools/test/h5diff/testph5diff.sh" - (("/bin/sh") (which "sh"))))))))) + #$%openmpi-setup))))) (synopsis "Management suite for data with parallel IO support"))) (define-public hdf5-blosc diff --git a/gnu/packages/patches/hdf5-config-dependencies.patch b/gnu/packages/patches/hdf5-config-dependencies.patch new file mode 100644 index 0000000000..cf448dac44 --- /dev/null +++ b/gnu/packages/patches/hdf5-config-dependencies.patch @@ -0,0 +1,31 @@ +The installed CMake configuration is missing targets for zlib and +libaec. Taken from +https://github.com/microsoft/vcpkg/blob/e36fe7110deac47a3aff8eda3dcc7cfb894a2ebf/ports/hdf5/hdf5_config.patch + +diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in +index 1a3fb7bbf2..79081ce040 100644 +--- a/config/cmake/hdf5-config.cmake.in ++++ b/config/cmake/hdf5-config.cmake.in +@@ -120,12 +114,22 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) + # Don't include targets if this file is being picked up by another + # project which has already built hdf5 as a subproject + #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) + if (NOT TARGET "@HDF5_PACKAGE@") + if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) ++ find_dependency(ZLIB) + endif () + if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) ++ if (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS) ++ set(libaec_USE_STATIC_LIBS ON) ++ else() ++ set(libaec_USE_STATIC_LIBS OFF) ++ endif() ++ find_dependency(libaec) + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + endif () -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:24:02 GMT) Full text and rfc822 format available.Message #83 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, andreas <at> enge.fr Subject: [PATCH v6 0/7] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Wed, 30 Apr 2025 16:21:43 +0000
Hello Andreas, thank you for looking at the updated patches. I cannot see the old QA results anymore, so I don't know whether there were failures other than the ones you mentioned. The HDF5 compiler wrappers (e.g. h5cc) when built with CMake depend on pkg-config, so adding it to the native-inputs fixed the build for gnudatalanguage. Regarding cdo, I did not see the error you mentioned, but the build failed because the libsz library was not found, which happens because I added libaec (which provides libsz.so) to the native-inputs (but now moved to the inputs) of netcdf. I forgot to mention hdf5-parallel-openmpi in the commit message, which is included now. Cheers, David David Elsing (7): gnu: hdf5: Update to 1.14.6. gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. gnu: netcdf: Build with libaec. gnu: netcdf-fortran: Add missing inputs. gnu: satdump: Fix RUNPATH for a plugin. gnu: gnudatalanguage: Fix build. gnu: cdo: Fix build. gnu/local.mk | 1 + gnu/packages/data-language.scm | 3 +- gnu/packages/geo.scm | 2 +- gnu/packages/maths.scm | 313 ++++++++++++------ .../patches/hdf5-config-dependencies.patch | 31 ++ gnu/packages/radio.scm | 17 +- 6 files changed, 257 insertions(+), 110 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:02 GMT) Full text and rfc822 format available.Message #86 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v6 2/7] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Date: Wed, 30 Apr 2025 16:27:04 +0000
* gnu/packages/maths.scm (hdf-java): Define as deprecated alias for... (hdf5-java): ...this new variable. Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [build-system]: Change to cmake-build-system. [arguments]: Adjust #:configure-flags. Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison, 'generate-headers and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add java-slf4j-nop and zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. Change-Id: Idfceec17b9a8c432ab85e2fcc87de6bb5bd5a422 Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 119 +++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index dfc5456797..e42b00d6ad 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1973,33 +1973,24 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) - (build-system gnu-build-system) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) + (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "--enable-java" - "--disable-tools") + #~(list "-DHDF5_BUILD_JAVA=ON" + "-DHDF5_BUILD_TOOLS=OFF") + #:modules + '((guix build cmake-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%cmake-build-system-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -2010,27 +2001,35 @@ (define-public hdf-java (api (search-input-file inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) + (nop + (search-input-file + inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) (junit (search-input-file inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) - (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") - simple) - (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") - api) - (("\\$\\(top_srcdir\\)/java/lib/junit.jar") + (substitute* "CMakeLists.txt" + (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) + (string-append orig api ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) + (string-append orig nop ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) + (string-append orig simple ")\n"))) + ;; Do not install copies of external libraries + (substitute* "java/CMakeLists.txt" + ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) + (substitute* "java/test/CMakeLists.txt" + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") junit) - (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2050,30 +2049,44 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-nop) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) +(define-public hdf-java + (deprecated-package "hdf-java" hdf5-java)) (define-public hdf-eos2 (package -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:02 GMT) Full text and rfc822 format available.Message #89 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v6 3/7] gnu: netcdf: Build with libaec. Date: Wed, 30 Apr 2025 16:27:05 +0000
* gnu/packages/maths.scm (netcdf)[inputs]: Add libaec. Change-Id: Ia6a0b742b7e590930c308434b59988e374ccff85 Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index e42b00d6ad..74ed903462 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2363,11 +2363,12 @@ (define-public netcdf (patches (search-patches "netcdf-date-time.patch")))) (build-system gnu-build-system) (native-inputs - (list m4 doxygen graphviz)) + (list doxygen graphviz m4)) (inputs (list curl hdf4-alt hdf5 + libaec libjpeg-turbo libxml2 unzip -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:03 GMT) Full text and rfc822 format available.Message #92 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v6 1/7] gnu: hdf5: Update to 1.14.6. Date: Wed, 30 Apr 2025 16:27:03 +0000
* gnu/packages/maths.scm (hdf5): Update to 1.14.6. Do not inherit from hdf5-1.8. [name, version]: New field. [source]: Switch to git-fetch. Add modules and snippet fields. Use different patch file. [build-system]: New field. Use CMake. [inputs]: New field. [native-inputs]: New field. Add bison, flex and which. [arguments]: Do not inherit from hdf5-1.8. <#:configure-flags>: New field. <#:phases>: New field. Use gexps. Remove 'patch-configure, 'patch-settings, 'patch-references, 'split, 'skip-version-test and 'patch-configure-build-settings phases. Add 'make-gen-deterministic, 'generate-flexbison, 'patch-trace-shebang, 'fix-fortran-i686-test and 'generate-headers phases. [home-page, synopsis, description]: New fields. [license]: New field. Adjust URL. (hdf5-parallel-openmpi)[inputs]: Use modify-inputs and drop labels. [arguments]<#:configure-flags> Use flags for CMake. <#:phases>: Delete 'patch-tests phase. * gnu/packages/patches/hdf5-config-dependencies.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/local.mk | 1 + gnu/packages/maths.scm | 193 +++++++++++++----- .../patches/hdf5-config-dependencies.patch | 31 +++ 3 files changed, 171 insertions(+), 54 deletions(-) create mode 100644 gnu/packages/patches/hdf5-config-dependencies.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3efe47fe17..f6f95bbf10 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1575,6 +1575,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ %D%/packages/patches/hdf5-config-date.patch \ + %D%/packages/patches/hdf5-config-dependencies.patch \ %D%/packages/patches/hdf-eos2-build-shared.patch \ %D%/packages/patches/hdf-eos2-remove-gctp.patch \ %D%/packages/patches/hdf-eos2-fortrantests.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 0b653f4daf..dfc5456797 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com> ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com> ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net> -;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net> +;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net> ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee> ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz> ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com> @@ -139,6 +139,7 @@ (define-module (gnu packages maths) #:use-module (gnu packages gettext) #:use-module (gnu packages gcc) #:use-module (gnu packages gd) + #:use-module (gnu packages geo) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gperf) @@ -1836,44 +1837,141 @@ (define-public hdf5-1.10 (base32 "14gih7kmjx4h3lc7pg4fwcl28hf1qqkf2x7rljpxqvzkjrqbxi00")) (patches (search-patches "hdf5-config-date.patch")))))) -;; When updating this package, please also update hdf-java. (define-public hdf5 (package - (inherit hdf5-1.8) - (version "1.14.3") + (name "hdf5") + (version "1.14.6") (source (origin - (method url-fetch) - (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" - "hdf5-" (version-major+minor version) - "/hdf5-" version "/src/hdf5-" - version ".tar.bz2") - (string-append "https://support.hdfgroup.org/ftp/HDF5/" - "current" - (apply string-append - (take (string-split version #\.) 2)) - "/src/hdf5-" version ".tar.bz2"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/HDFGroup/hdf5") + (commit (string-append "hdf5_" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "05zr11y3bivfwrbvzbky1q2gjf6r7n92cvvdnh5jilbmxljg49cl")) - (patches (search-patches "hdf5-config-date.patch")))) + (base32 + "1f7yv0xra465c3qy8c79fzddib653wzj5dsakb0bs02nwp3xm54q")) + (modules '((guix build utils))) + (snippet + '(for-each + delete-file + (append + (find-files "." "Makefile\\.in$") + (find-files "java/lib" "\\.jar$") + (list "aclocal.m4" + "bin/compile" + "bin/config.guess" + "bin/config.sub" + "bin/depcomp" + "bin/install-sh" + "bin/ltmain.sh" + "bin/missing" + "bin/test-driver" + "configure" + "HDF5Examples/aclocal.m4" + "HDF5Examples/compile" + "HDF5Examples/configure" + "HDF5Examples/depcomp" + "HDF5Examples/missing" + "HDF5Examples/test-driver" + "hl/src/H5LTanalyze.c" + "hl/src/H5LTparse.c" + "hl/src/H5LTparse.h" + "hl/tools/gif2h5/testfiles/ex_image2.h5" + "hl/tools/gif2h5/testfiles/h52giftst.h5" + "m4/ax_prog_doxygen.m4" + "m4/libtool.m4" + "m4/lt~obsolete.m4" + "m4/ltoptions.m4" + "m4/ltsugar.m4" + "m4/ltversion.m4" + "src/H5config.h.in" + "src/H5Edefin.h" + "src/H5Einit.h" + "src/H5Epubgen.h" + "src/H5Eterm.h" + "src/H5overflow.h" + "src/H5version.h")))) + (patches (search-patches "hdf5-config-dependencies.patch")))) + (build-system cmake-build-system) (arguments - (substitute-keyword-arguments (package-arguments hdf5-1.8) - ((#:phases phases #~%standard-phases) - #~(modify-phases #$phases - (add-after 'configure 'skip-version-test - (lambda _ - ;; Skip test_check_version since the 'patch-settings' phase - ;; modifies the test reference. - (substitute* "test/test_check_version.sh.in" - (("TESTING\\(\\).*" all) - (string-append all "\nSKIP; exit 0\n"))))) - (add-after 'patch-configure 'patch-configure-build-settings - (lambda _ - (substitute* "src/H5build_settings.autotools.c.in" - ;; Don't record the build-time kernel version to make the - ;; library file reproducible. - (("@UNAME_INFO@") - "Linux")))))))))) + (list + ;; Some of the users, notably Flann, need the C++ interface. + #:configure-flags + #~(list + (string-append "-DHDF5_INSTALL_CMAKE_DIR=" #$output "/lib/cmake") + "-DHDF5_BUILD_CPP_LIB=ON" + "-DHDF5_BUILD_FORTRAN=ON" + ;; Build a thread-safe library. Unfortunately, CMakeLists.txt + ;; invites you to either turn off C++, Fortran, and the high-level + ;; interface (HL), or to enable 'ALLOW_UNSUPPORTED'. Debian + ;; packagers chose to pass '--enable-unsupported' to the 'configure' + ;; script and we follow their lead here. + "-DHDF5_ENABLE_THREADSAFE=ON" + "-DALLOW_UNSUPPORTED=ON" + "-DHDF5_BUILD_DOC=ON") + #:phases + #~(modify-phases %standard-phases + ;; XXX: src/H5private.h includes <fenv.h> and fails to find the + ;; stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda _ + (let ((gfortran #$(this-package-native-input "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":"))))) + (add-after 'unpack 'make-gen-deterministic + (lambda _ + (substitute* "bin/make_err" + (("keys %major" all) + (string-append "sort " all)) + (("while.*each \\(%section\\).*") + (string-append + "foreach $sect_name (sort keys %section) {\n" + " $sect_desc = $section{$sect_name};\n"))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + ;; This is a known issue on i686, see + ;; https://github.com/HDFGroup/hdf5/issues/4926 + (add-after 'unpack 'fix-fortran-i686-test + (lambda _ + (substitute* "fortran/test/tH5R.F90" + (((string-append + "CALL h5rget_obj_name_f\\(C_LOC\\(ref_ptr\\(2\\)\\)," + " \"\", error, name_len=buf_size \\)")) + (string-append + "CALL h5rget_obj_name_f(C_LOC(ref_ptr(2))," + " \"xxxxxxxxxxxxxx\", error, name_len=buf_size)"))))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt")))))) + (inputs (list libaec zlib)) + (native-inputs + (list bison + doxygen + flex + gfortran + graphviz + ;; Needed to generate some headers and for tests + perl + which)) + (home-page "https://www.hdfgroup.org") + (synopsis "Management suite for extremely large and complex data") + (description "HDF5 is a suite that makes possible the management of +extremely large and complex data collections.") + (license (license:x11-style + "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) ;; Keep this in sync with the current hdf5 package. (define-public hdf-java @@ -2077,32 +2175,19 @@ (define-public hdf-eos5 (define-public hdf5-parallel-openmpi (package/inherit hdf5 (name "hdf5-parallel-openmpi") - (inputs - `(("mpi" ,openmpi) - ,@(package-inputs hdf5))) + (inputs (modify-inputs (package-inputs hdf5) + (prepend openmpi))) (arguments (substitute-keyword-arguments (package-arguments hdf5) - ((#:configure-flags flags) - #~(cons "--enable-parallel" - (delete "--enable-cxx" - (delete "--enable-threadsafe" #$flags)))) + ((#:configure-flags _ #f) + ''("-DHDF5_ENABLE_THREADSAFE=OFF" + "-DHDF5_ENABLE_PARALLEL=ON" + "-DHDF5_BUILD_CPP_LIB=OFF" + "-DHDF5_BUILD_DOC=ON")) ((#:phases phases) #~(modify-phases #$phases (add-after 'build 'mpi-setup - #$%openmpi-setup) - (add-before 'check 'patch-tests - (lambda _ - ;; OpenMPI's mpirun will exit with non-zero status if it - ;; detects an "abnormal termination", i.e. any process not - ;; calling MPI_Finalize(). Since the test is explicitly - ;; avoiding MPI_Finalize so as not to have at_exit and thus - ;; H5C_flush_cache from being called, mpirun will always - ;; complain, so turn this test off. - (substitute* "testpar/Makefile" - (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) - (string-append front back "\n"))) - (substitute* "tools/test/h5diff/testph5diff.sh" - (("/bin/sh") (which "sh"))))))))) + #$%openmpi-setup))))) (synopsis "Management suite for data with parallel IO support"))) (define-public hdf5-blosc diff --git a/gnu/packages/patches/hdf5-config-dependencies.patch b/gnu/packages/patches/hdf5-config-dependencies.patch new file mode 100644 index 0000000000..cf448dac44 --- /dev/null +++ b/gnu/packages/patches/hdf5-config-dependencies.patch @@ -0,0 +1,31 @@ +The installed CMake configuration is missing targets for zlib and +libaec. Taken from +https://github.com/microsoft/vcpkg/blob/e36fe7110deac47a3aff8eda3dcc7cfb894a2ebf/ports/hdf5/hdf5_config.patch + +diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in +index 1a3fb7bbf2..79081ce040 100644 +--- a/config/cmake/hdf5-config.cmake.in ++++ b/config/cmake/hdf5-config.cmake.in +@@ -120,12 +114,22 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) + # Don't include targets if this file is being picked up by another + # project which has already built hdf5 as a subproject + #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) + if (NOT TARGET "@HDF5_PACKAGE@") + if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) ++ find_dependency(ZLIB) + endif () + if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) ++ if (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS) ++ set(libaec_USE_STATIC_LIBS ON) ++ else() ++ set(libaec_USE_STATIC_LIBS OFF) ++ endif() ++ find_dependency(libaec) + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + endif () -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:03 GMT) Full text and rfc822 format available.Message #95 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v6 6/7] gnu: gnudatalanguage: Fix build. Date: Wed, 30 Apr 2025 16:27:08 +0000
* gnu/packages/data-language.scm (gnudatalanguage)[native-inputs]: Add pkg-config. --- gnu/packages/data-language.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/data-language.scm b/gnu/packages/data-language.scm index e779832dd3..aad8df72a0 100644 --- a/gnu/packages/data-language.scm +++ b/gnu/packages/data-language.scm @@ -31,6 +31,7 @@ (define-module (gnu packages data-language) #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) #:use-module (gnu packages onc-rpc) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages plotutils) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) @@ -53,7 +54,7 @@ (define-public gnudatalanguage (base32 "1bb3nin3qrzx2dwdk08vffp4bblrcpv6vv1ybaj499qhqcpqpc12")))) (build-system cmake-build-system) (native-inputs - (list python python-numpy)) + (list pkg-config python python-numpy)) (inputs (list eccodes eigen -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:04 GMT) Full text and rfc822 format available.Message #98 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net> Subject: [PATCH v6 7/7] gnu: cdo: Fix build. Date: Wed, 30 Apr 2025 16:27:09 +0000
* gnu/packages/geo.scm (cdo)[inputs]: Add libaec. --- gnu/packages/geo.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index e9fb9c68ff..777e4bc00e 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -276,7 +276,7 @@ (define-public cdo ;; Some tests can fail on machines with many threads. #:parallel-tests? #f)) (inputs - (list curl eccodes fftw hdf5 libxml2 netcdf proj udunits)) + (list curl eccodes fftw hdf5 libaec libxml2 netcdf proj udunits)) (native-inputs (list pkg-config python-wrapper)) (home-page "https://code.mpimet.mpg.de/projects/cdo") -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:04 GMT) Full text and rfc822 format available.Message #101 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v6 5/7] gnu: satdump: Fix RUNPATH for a plugin. Date: Wed, 30 Apr 2025 16:27:07 +0000
* gnu/packages/radio.scm (satdump)[arguments]: Add 'fix-runpath phase. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/radio.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 78888dcee5..54b1f0c373 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -3349,7 +3349,22 @@ (define-public satdump volk (list zstd "lib"))) (arguments - (list #:tests? #f)) ; No test suite + (list + #:tests? #f ; No test suite + #:phases + #~(modify-phases %standard-phases + ;; The RUNPATH of this shared library is missing the + ;; .../lib/satdump/plugins directory, which fails the + ;; 'validate-runpath' phase. + (add-after 'unpack 'fix-runpath + (lambda _ + (substitute* "plugins/official_products_support/CMakeLists.txt" + (("add_library\\(official_products_loader_support.*" orig) + (string-append + orig "\n" "set_target_properties(" + "official_products_loader_support" + " PROPERTIES INSTALL_RPATH \"" + #$output "/lib:" #$output "/lib/satdump/plugins\")\n")))))))) (home-page "https://www.satdump.org/") (synopsis "Satellite data processing software") (description "SatDump is a generic satellite data processing software. -- 2.49.0
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Wed, 30 Apr 2025 16:29:05 GMT) Full text and rfc822 format available.Message #104 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: David Elsing <david.elsing <at> posteo.net> To: 77590 <at> debbugs.gnu.org Cc: David Elsing <david.elsing <at> posteo.net>, Andreas Enge <andreas <at> enge.fr> Subject: [PATCH v6 4/7] gnu: netcdf-fortran: Add missing inputs. Date: Wed, 30 Apr 2025 16:27:06 +0000
* gnu/packages/maths.scm (netcdf-fortran)[inputs]: Add libaec and hdf5. Signed-off-by: Andreas Enge <andreas <at> enge.fr> --- gnu/packages/maths.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 74ed903462..c6272f79fa 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2457,7 +2457,7 @@ (define-public netcdf-fortran "FFLAGS=-fallow-argument-mismatch") #:parallel-tests? #f)) (inputs - (list netcdf)) + (list libaec hdf5 netcdf)) (native-inputs (list gfortran)) (synopsis "Fortran interface for the netCDF library") -- 2.49.0
Andreas Enge <andreas <at> enge.fr>
:David Elsing <david.elsing <at> posteo.net>
:Message #109 received at 77590-done <at> debbugs.gnu.org (full text, mbox):
From: Andreas Enge <andreas <at> enge.fr> To: David Elsing <david.elsing <at> posteo.net> Cc: 77590-done <at> debbugs.gnu.org Subject: Re: [PATCH v6 0/7] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Wed, 30 Apr 2025 19:51:21 +0200
Thanks, David, for your patience in repairing the hdf5 dependencies! I trust the previous QA run, have verified that gnudatalanguage and cdo compile now, and pushed your patches. Andreas
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Mon, 19 May 2025 21:12:02 GMT) Full text and rfc822 format available.Message #112 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Lars Bilke <lars.bilke <at> ufz.de> To: 77590 <at> debbugs.gnu.org Subject: [PATCH 0/3] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Mon, 19 May 2025 23:11:19 +0200
[Message part 1 (text/plain, inline)]
Dear David, it looks like netcdf-cxx4-parallel-openmpi is not building (https://ci.guix.gnu.org/build/10639292/details) since this patch was merged: CMake Error at /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Call Stack (most recent call first): /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindZLIB.cmake:166 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) /gnu/store/gh7m8a9ivnbav6pkwni124j2mjmqykly-hdf5-parallel-openmpi-1.14.6/cmake/hdf5-config.cmake:173 (find_dependency) /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindHDF5.cmake:502 (find_package) CMakeLists.txt:402 (FIND_PACKAGE) I guess this is related to the patch in hdf5-config.cmake.in. Do you have any idea how this can be solved? Thanks! Lars
[smime.p7s (application/pkcs7-signature, attachment)]
guix-patches <at> gnu.org
:bug#77590
; Package guix-patches
.
(Tue, 20 May 2025 09:25:02 GMT) Full text and rfc822 format available.Message #115 received at 77590 <at> debbugs.gnu.org (full text, mbox):
From: Lars Bilke <lars.bilke <at> ufz.de> To: 77590 <at> debbugs.gnu.org Subject: Re: [PATCH 0/3] Update hdf5 to 1.14.6, fix wrappers and remove generated source files. Date: Tue, 20 May 2025 11:24:11 +0200
[Message part 1 (text/plain, inline)]
Never mind, on current master (e7d73a08d569904f8a71db5b84f5fafaf0dff188) netcdf-cxx4-parallel-openmpi builds fine. On 19 May 2025, at 23:11, Lars Bilke wrote: > Dear David, > > it looks like netcdf-cxx4-parallel-openmpi is not building (https://ci.guix.gnu.org/build/10639292/details) since this patch was merged: > > CMake Error at /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message): > Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) > Call Stack (most recent call first): > /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) > /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindZLIB.cmake:166 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) > /gnu/store/gh7m8a9ivnbav6pkwni124j2mjmqykly-hdf5-parallel-openmpi-1.14.6/cmake/hdf5-config.cmake:173 (find_dependency) > /gnu/store/8wkkxkgkiqaddpn2al8khxnaaanici26-cmake-minimal-3.24.2/share/cmake-3.24/Modules/FindHDF5.cmake:502 (find_package) > CMakeLists.txt:402 (FIND_PACKAGE) > > I guess this is related to the patch in hdf5-config.cmake.in. Do you have any idea how this can be solved? > > Thanks! > Lars
[smime.p7s (application/pkcs7-signature, attachment)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.