GNU bug report logs - #74675
[PATCH 0/1] Possibly build hypre without doxygen and LaTeX doc

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Luca Cirrottola <luca.cirrottola@HIDDEN>; Keywords: patch; dated Tue, 3 Dec 2024 20:17:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 74675 <at> debbugs.gnu.org:


Received: (at 74675) by debbugs.gnu.org; 3 Dec 2024 20:20:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 15:20:35 2024
Received: from localhost ([127.0.0.1]:33067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIZNq-0001jW-G8
	for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 15:20:35 -0500
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:59228)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <luca.cirrottola@HIDDEN>) id 1tIZNn-0001jD-LS
 for 74675 <at> debbugs.gnu.org; Tue, 03 Dec 2024 15:20:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc;
 h=from:to:cc:subject:date:message-id:mime-version:
 content-transfer-encoding;
 bh=A0ZJsTsO/nbtTQW79iDUq7wl6guFqJvM7qKHD/EK3w4=;
 b=csUk/zkAFKDUN6oltWQr5rorkazTU93UciD/MvDh10NB5Gf/h0D6IhgN
 p1qqXeHPAzHZFmTA/7hyF2ZOuQ9sQT72bpIQdLf+D581h2MyOW0r0wVNl
 3mTFcsnM/hnRpS/9YIGxBhrx6kuHH/aUzKu2GWU0OiOqexS3k7/nHiLgp U=;
Authentication-Results: mail3-relais-sop.national.inria.fr;
 dkim=none (message not signed) header.i=none;
 spf=SoftFail smtp.mailfrom=luca.cirrottola@HIDDEN;
 dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="6.12,206,1728943200"; d="scan'208";a="103339927"
Received: from 167.152.65.81.rev.sfr.net (HELO canard..) ([81.65.152.167])
 by mail3-relais-sop.national.inria.fr with
 ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 21:20:26 +0100
From: Luca Cirrottola <luca.cirrottola@HIDDEN>
To: 74675 <at> debbugs.gnu.org
Subject: [PATCH 1/1] Add a hypre-sans-doc package, make hypre inherit from it,
 and add a variant hypre-openmpi-sans-doc.
Date: Tue,  3 Dec 2024 21:20:13 +0100
Message-Id: <20241203202013.5739-1-luca.cirrottola@HIDDEN>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74675
Cc: Luca Cirrottola <luca.cirrottola@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

---
 gnu/packages/maths.scm | 131 ++++++++++++++++++++++++++---------------
 1 file changed, 85 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 893877a5e5..bbc307c286 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -7291,9 +7291,9 @@ (define-public xaos
     (home-page "https://xaos-project.github.io/")
     (license license:gpl2+)))
 
-(define-public hypre
+(define-public hypre-sans-doc
   (package
-    (name "hypre")
+    (name "hypre-sans-doc")
     (version "2.20.0")
     (source
      (origin
@@ -7305,6 +7305,63 @@ (define-public hypre
        (sha256
         (base32 "14iqjwg5sv1qjn7c2cfv0xxmn9rwamjrhh9hgs8fjbywcbvrkjdi"))))
     (build-system gnu-build-system)
+    (inputs
+     (list openblas))
+    (arguments
+     (list #:modules `((srfi srfi-1)
+                       ,@%default-gnu-modules)
+           #:configure-flags #~'("--enable-shared"
+                                 "--disable-fortran"
+                                 "--without-MPI"
+                                 "--with-openmp"
+                                 "--with-fei"
+                                 "--with-lapack"
+                                 "--with-blas")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'chdir-src
+                 (lambda _
+                   (chdir "src")))
+               (replace 'configure
+                 (lambda* (#:key build target configure-flags
+                           #:allow-other-keys #:rest args)
+                   (let* ((configure (assoc-ref %standard-phases 'configure)))
+                     (apply configure
+                            (append args
+                                    (list #:configure-flags
+                                          (cons (string-append "--host="
+                                                               (or target build))
+                                                configure-flags)))))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (setenv "LD_LIBRARY_PATH"
+                             (string-append (getcwd) "/hypre/lib"))
+                     (setenv "PATH"
+                             (string-append "." ":" (getenv "PATH")))
+                     (invoke "make" "check" "CHECKRUN=")
+                     (for-each (lambda (filename)
+                                 (let ((size (stat:size (stat filename))))
+                                   (when (positive? size)
+                                     (error (format #f
+                                                    "~a size ~d; error indication~%"
+                                                    filename size)))))
+                               (find-files "test" ".*\\.err$"))))))))
+    (home-page "https://computing.llnl.gov/projects\
+/hypre-scalable-linear-solvers-multigrid-methods")
+    (synopsis "Library of solvers and preconditioners for linear equations")
+    (description
+     "HYPRE is a software library of high performance preconditioners and
+solvers for the solution of large, sparse linear systems of equations.  It
+features multigrid solvers for both structured and unstructured grid
+problems.")
+    (properties '((tunable? . #t)))
+    (license license:lgpl2.1)))
+
+(define-public hypre
+  (package
+    (inherit hypre-sans-doc)
+    (name "hypre")
     (outputs '("out"                    ;5.3 MiB of headers and libraries
                "doc"))                  ;12 MiB of documentation
     (native-inputs
@@ -7352,57 +7409,18 @@ (define-public hypre
                   texlive-wrapfig
                   texlive-xcolor
                   texlive-xypic))))
-    (inputs
-     (list openblas))
     (arguments
-     (list #:modules `((srfi srfi-1)
-                       ,@%default-gnu-modules)
-           #:configure-flags #~'("--enable-shared"
-                                 "--disable-fortran"
-                                 "--without-MPI"
-                                 "--with-openmp"
-                                 "--with-fei"
-                                 "--with-lapack"
-                                 "--with-blas")
-           #:phases
-           #~(modify-phases %standard-phases
-               (add-before 'configure 'chdir-src
-                 (lambda _
-                   (chdir "src")))
-               (replace 'configure
-                 (lambda* (#:key build target configure-flags
-                           #:allow-other-keys #:rest args)
-                   (let* ((configure (assoc-ref %standard-phases 'configure)))
-                     (apply configure
-                            (append args
-                                    (list #:configure-flags
-                                          (cons (string-append "--host="
-                                                               (or target build))
-                                                configure-flags)))))))
+     (substitute-keyword-arguments (package-arguments hypre-sans-doc)
+       ((#:phases phases)
+        #~(modify-phases #$phases
                (add-after 'build 'build-docs
                  (lambda _
                    (invoke "make" "-C" "docs")))
-               (replace 'check
-                 (lambda* (#:key tests? #:allow-other-keys)
-                   (when tests?
-                     (setenv "LD_LIBRARY_PATH"
-                             (string-append (getcwd) "/hypre/lib"))
-                     (setenv "PATH"
-                             (string-append "." ":" (getenv "PATH")))
-                     (invoke "make" "check" "CHECKRUN=")
-                     (for-each (lambda (filename)
-                                 (let ((size (stat:size (stat filename))))
-                                   (when (positive? size)
-                                     (error (format #f
-                                                    "~a size ~d; error indication~%"
-                                                    filename size)))))
-                               (find-files "test" ".*\\.err$")))))
                (add-after 'install 'install-docs
                  (lambda* (#:key outputs #:allow-other-keys)
                    ;; Custom install because docs/Makefile doesn't honor ${docdir}.
                    (let* ((doc (assoc-ref outputs "doc"))
-                          (docdir (string-append doc "/share/doc/hypre-"
-                                                 #$version)))
+                          (docdir (string-append doc "/share/doc/hypre")))
                      (with-directory-excursion "docs"
                        (for-each (lambda (base)
                                    (install-file (string-append base
@@ -7411,7 +7429,7 @@ (define-public hypre
                                                                     "-html")
                                                      (string-append docdir
                                                                     "/" base)))
-                                 '("usr-manual" "ref-manual")))))))))
+                                 '("usr-manual" "ref-manual"))))))))))
     (home-page "https://computing.llnl.gov/projects\
 /hypre-scalable-linear-solvers-multigrid-methods")
     (synopsis "Library of solvers and preconditioners for linear equations")
@@ -7444,6 +7462,27 @@ (define-public hypre-openmpi
 parallel computers.  It features parallel multigrid solvers for both
 structured and unstructured grid problems.")))
 
+(define-public hypre-openmpi-sans-doc
+  (package
+    (inherit hypre-sans-doc)
+    (name "hypre-openmpi-sans-doc")
+    (inputs (modify-inputs (package-inputs hypre-sans-doc)
+              (prepend openmpi)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments hypre-sans-doc)
+       ((#:configure-flags flags)
+        #~`("--with-MPI" ,@(delete "--without-MPI" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-before 'check 'mpi-setup
+              #$%openmpi-setup)))))
+    (synopsis "Parallel solvers and preconditioners for linear equations")
+    (description
+     "HYPRE is a software library of high performance preconditioners and
+solvers for the solution of large, sparse linear systems of equations on
+parallel computers.  It features parallel multigrid solvers for both
+structured and unstructured grid problems.")))
+
 (define-public matio
   (package
     (name "matio")
-- 
2.34.1





Information forwarded to guix-patches@HIDDEN:
bug#74675; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Dec 2024 20:16:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 15:16:45 2024
Received: from localhost ([127.0.0.1]:33058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIZK8-0001Wy-RS
	for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 15:16:45 -0500
Received: from lists.gnu.org ([209.51.188.17]:42266)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <luca.cirrottola@HIDDEN>) id 1tIZK6-0001Wo-Ma
 for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 15:16:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <luca.cirrottola@HIDDEN>)
 id 1tIZK5-000372-RC
 for guix-patches@HIDDEN; Tue, 03 Dec 2024 15:16:42 -0500
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <luca.cirrottola@HIDDEN>)
 id 1tIZK3-000505-J8
 for guix-patches@HIDDEN; Tue, 03 Dec 2024 15:16:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc;
 h=from:to:cc:subject:date:message-id:mime-version:
 content-transfer-encoding;
 bh=j3/ORAX7dyitCcJtXHZ+6R1KRA2fR00d3qvLbJJr18M=;
 b=lJIxZNX4EPB71IsqZb0xWz3EZocgNaO2LXETXvboaLU4rrWhLWIG2EXl
 jAdKnc0A6rPheBtPc7vlNn1N2va3Ao22vc0KX+/294dT4ZcD5YMNSl5S/
 WbmItOXQtjxd+uPZLezxCgTCV8sVSV0pIZjlaouyv3M4jzGhWmcR6KMQW g=;
Authentication-Results: mail3-relais-sop.national.inria.fr;
 dkim=none (message not signed) header.i=none;
 spf=SoftFail smtp.mailfrom=luca.cirrottola@HIDDEN;
 dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="6.12,206,1728943200"; d="scan'208";a="103339774"
Received: from 167.152.65.81.rev.sfr.net (HELO canard..) ([81.65.152.167])
 by mail3-relais-sop.national.inria.fr with
 ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 21:16:35 +0100
From: Luca Cirrottola <luca.cirrottola@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/1] Possibly build hypre without doxygen and LaTeX doc
Date: Tue,  3 Dec 2024 21:16:18 +0100
Message-Id: <20241203201618.5533-1-luca.cirrottola@HIDDEN>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=192.134.164.104;
 envelope-from=luca.cirrottola@HIDDEN;
 helo=mail3-relais-sop.national.inria.fr
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Luca Cirrottola <luca.cirrottola@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,
The hypre package builds its "doc" output by default, bringing texlive
into the dependency graph of packages using hypre, and possibly breaking
their compilation due to errors in building the hypre documentation (see
bug 74672). I would like to also have the possibility to build hypre
without doxygen and latex documentation.

This patch is an attempt to solve my problem by splitting the package
into two variants, one without documentation ("hypre-sans-doc") and one
with ("hypre"). Also, a "hypre-openmpi-sans-doc" is added besides
"hypre-openmpi".

Thus, two new packages are introduced ("hypre-sans-doc" and
"hypre-openmpi-sans-doc") without modifying the expected behaviour of
the original "hypre" and "hypre-openmpi" packages.

I would have loved to simply generate the "hypre-openmpi-sans-doc"
package by modifying the "inherit" field of "hypre-openmpi", but I have
not been able to do it with package transformation options. I would be
grateful for any suggestion to reduce code redundancy in my patch, as
well as for any better solution that could achieve the same objective
(the possibility to build hypre without doc).


Luca Cirrottola (1):
  Add a hypre-sans-doc package, make hypre inherit from it, and add a
    variant hypre-openmpi-sans-doc.

 gnu/packages/maths.scm | 131 ++++++++++++++++++++++++++---------------
 1 file changed, 85 insertions(+), 46 deletions(-)

-- 
2.34.1





Acknowledgement sent to Luca Cirrottola <luca.cirrottola@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#74675; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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