GNU bug report logs - #75284
[PATCH] gnu: Add netcdf-cxx4 and netcdf-cxx4-parallel-openmpi.

Previous Next

Package: guix-patches;

Reported by: Lars Bilke <lars.bilke <at> ufz.de>

Date: Thu, 2 Jan 2025 13:53:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75284 in the body.
You can then email your comments to 75284 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#75284; Package guix-patches. (Thu, 02 Jan 2025 13:53:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Bilke <lars.bilke <at> ufz.de>:
New bug report received and forwarded. Copy sent to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org. (Thu, 02 Jan 2025 13:53:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Bilke <lars.bilke <at> ufz.de>
To: guix-patches <at> gnu.org
Cc: Lars Bilke <lars.bilke <at> ufz.de>
Subject: [PATCH] gnu: Add netcdf-cxx4 and netcdf-cxx4-parallel-openmpi.
Date: Thu, 02 Jan 2025 14:52:10 +0100
* gnu/packages/maths.scm (netcdf-cxx4): New variable.
* gnu/packages/maths.scm (netcdf-cxx4-parallel-openmpi: New variable.

Change-Id: I9781aa31567b80e20c528abb5e9289bc625bb3eb
---
 gnu/packages/maths.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 22e2822c8c..71ea757e0e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2381,6 +2381,66 @@ (define-public netcdf-fortran
     (home-page (package-home-page netcdf))
     (license (package-license netcdf))))
 
+(define-public netcdf-cxx4
+  (package
+    (name "netcdf-cxx4")
+    (synopsis "NetCDF C++ interface")
+    (license license:bsd-3)
+    (description "C++ interface for NetCDF.")
+    (home-page "https://github.com/Unidata/netcdf-cxx4")
+    (version "4.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Unidata/netcdf-cxx4")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"))))
+    (build-system cmake-build-system)
+    (inputs (list netcdf hdf5))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'patch-configure
+                    (lambda _
+                      (substitute* "libnetcdf-cxx.settings.in"
+                        ;; Don't record the build-time host, time and gcc path to make the
+                        ;; settings file reproducible.
+                        (("@CONFIG_DATE@")
+                         "Not set (Guix build)")
+                        (("@host_cpu@-@host_vendor@-@host_os@")
+                         "Linux")
+                        (("@CC_VERSION@")
+                         "gcc"))
+                      ;; The filter tests fail with 'Caught unexpected exception'.
+                      (substitute* "cxx4/CMakeLists.txt"
+                        (("add_bin_test\\(cxx4 test_filter\\)")
+                         ""))
+                      (substitute* "examples/CMakeLists.txt"
+                        (("add_sh_test\\(examples tst_filter\\)")
+                         ""))))
+                  (add-after 'install 'clear-reference-to-compiler
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; Do not retain a reference to GCC and other build only inputs.
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* (string-append out "/bin/ncxx4-config")
+                          (("cc=([[:graph:]]+)/bin/gcc")
+                           "cc=\"gcc")
+                          (("cxx=([[:graph:]]+)/bin/c\\+\\+")
+                           "cxx=\"c++"))))))
+       #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5="
+                                              (assoc-ref %build-inputs "hdf5")
+                                              "/lib/libhdf5.so"))))))
+
+(define-public netcdf-cxx4-parallel-openmpi
+  (package
+    (inherit netcdf-cxx4)
+    (name "netcdf-cxx4-parallel-openmpi")
+    (inputs (modify-inputs (package-inputs netcdf-cxx4)
+              (prepend openmpi)
+              (replace "hdf5" hdf5-parallel-openmpi)
+              (replace "netcdf" netcdf-parallel-openmpi)))))
+
 (define-public n2p2
   (package
     (name "n2p2")

base-commit: ab43d883a0a88adbcfd3c3ab8d4c097cd9054b90
-- 
2.46.1





Information forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#75284; Package guix-patches. (Fri, 03 Jan 2025 07:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 75284 <at> debbugs.gnu.org (full text, mbox):

From: Lars Bilke <lars.bilke <at> ufz.de>
To: 75284 <at> debbugs.gnu.org
Cc: Lars Bilke <lars.bilke <at> ufz.de>
Subject: [PATCH v2] gnu: Add netcdf-cxx4 and netcdf-cxx4-parallel-openmpi.
Date: Fri, 03 Jan 2025 08:21:28 +0100
* gnu/packages/maths.scm (netcdf-cxx4): New variable.
* gnu/packages/maths.scm (netcdf-cxx4-parallel-openmpi: New variable.

Change-Id: I9781aa31567b80e20c528abb5e9289bc625bb3eb
---
 gnu/packages/maths.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 22e2822c8c..dee8c0636a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2381,6 +2381,66 @@ (define-public netcdf-fortran
     (home-page (package-home-page netcdf))
     (license (package-license netcdf))))
 
+(define-public netcdf-cxx4
+  (package
+    (name "netcdf-cxx4")
+    (version "4.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Unidata/netcdf-cxx4")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'patch-configure
+                    (lambda _
+                      (substitute* "libnetcdf-cxx.settings.in"
+                        ;; Don't record the build-time host, time and gcc path to make the
+                        ;; settings file reproducible.
+                        (("@CONFIG_DATE@")
+                         "Not set (Guix build)")
+                        (("@host_cpu@-@host_vendor@-@host_os@")
+                         "Linux")
+                        (("@CC_VERSION@")
+                         "gcc"))
+                      ;; The filter tests fail with 'Caught unexpected exception'.
+                      (substitute* "cxx4/CMakeLists.txt"
+                        (("add_bin_test\\(cxx4 test_filter\\)")
+                         ""))
+                      (substitute* "examples/CMakeLists.txt"
+                        (("add_sh_test\\(examples tst_filter\\)")
+                         ""))))
+                  (add-after 'install 'clear-reference-to-compiler
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; Do not retain a reference to GCC and other build only inputs.
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* (string-append out "/bin/ncxx4-config")
+                          (("cc=([[:graph:]]+)/bin/gcc")
+                           "cc=\"gcc")
+                          (("cxx=([[:graph:]]+)/bin/c\\+\\+")
+                           "cxx=\"c++"))))))
+       #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5="
+                                              (assoc-ref %build-inputs "hdf5")
+                                              "/lib/libhdf5.so"))))
+    (inputs (list netcdf hdf5))
+    (home-page "https://github.com/Unidata/netcdf-cxx4")
+    (synopsis "NetCDF C++ interface")
+    (description "C++ interface for NetCDF.")
+    (license license:bsd-3)))
+
+(define-public netcdf-cxx4-parallel-openmpi
+  (package
+    (inherit netcdf-cxx4)
+    (name "netcdf-cxx4-parallel-openmpi")
+    (inputs (modify-inputs (package-inputs netcdf-cxx4)
+              (prepend openmpi)
+              (replace "hdf5" hdf5-parallel-openmpi)
+              (replace "netcdf" netcdf-parallel-openmpi)))))
+
 (define-public n2p2
   (package
     (name "n2p2")

base-commit: ab43d883a0a88adbcfd3c3ab8d4c097cd9054b90
-- 
2.46.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 19 Jan 2025 23:13:02 GMT) Full text and rfc822 format available.

Notification sent to Lars Bilke <lars.bilke <at> ufz.de>:
bug acknowledged by developer. (Sun, 19 Jan 2025 23:13:02 GMT) Full text and rfc822 format available.

Message #13 received at 75284-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Lars Bilke <lars.bilke <at> ufz.de>
Cc: Andreas Enge <andreas <at> enge.fr>, 75284-done <at> debbugs.gnu.org,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, Eric Bavier <bavier <at> posteo.net>
Subject: Re: [bug#75284] [PATCH v2] gnu: Add netcdf-cxx4 and
 netcdf-cxx4-parallel-openmpi.
Date: Mon, 20 Jan 2025 00:11:46 +0100
[Message part 1 (text/plain, inline)]
Hi,

Lars Bilke <lars.bilke <at> ufz.de> skribis:

> * gnu/packages/maths.scm (netcdf-cxx4): New variable.
> * gnu/packages/maths.scm (netcdf-cxx4-parallel-openmpi: New variable.
>
> Change-Id: I9781aa31567b80e20c528abb5e9289bc625bb3eb

Applied with the changes below: addressing a ‘guix lint’ issue, and
following the conventions at
<https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html>.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5f40f751d3..4e3ea6df26 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2391,6 +2391,7 @@ (define-public netcdf-cxx4
        (uri (git-reference
              (url "https://github.com/Unidata/netcdf-cxx4")
              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"))))
     (build-system cmake-build-system)
@@ -2424,18 +2425,22 @@ (define-public netcdf-cxx4
                           (("cxx=([[:graph:]]+)/bin/c\\+\\+")
                            "cxx=\"c++"))))))
        #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5="
-                                              (assoc-ref %build-inputs "hdf5")
-                                              "/lib/libhdf5.so"))))
+                                              (search-input-file
+                                               %build-inputs
+                                               "/lib/libhdf5.so")))))
     (inputs (list netcdf hdf5))
     (home-page "https://github.com/Unidata/netcdf-cxx4")
     (synopsis "NetCDF C++ interface")
-    (description "C++ interface for NetCDF.")
+    (description
+     "This package provides a C++ interface to the NetCDF library for
+scientific data storage.")
     (license license:bsd-3)))
 
 (define-public netcdf-cxx4-parallel-openmpi
   (package
     (inherit netcdf-cxx4)
     (name "netcdf-cxx4-parallel-openmpi")
+    (synopsis "NetCDF C++ interface (with MPI support)")
     (inputs (modify-inputs (package-inputs netcdf-cxx4)
               (prepend openmpi)
               (replace "hdf5" hdf5-parallel-openmpi)

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Feb 2025 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.