[bug#73262] gnu: openblas: Add debug output.

Message ID 87jzfdskc9.fsf@aartaka.me
State New
Headers
Series [bug#73262] gnu: openblas: Add debug output. |

Commit Message

Artyom Bologov Sept. 15, 2024, 2:48 a.m. UTC
Hi y'all,

This patch adds a debug output to OpenBLAS and adjusts build flags
accordingly. The final non-debug build is likely unaffected by DEBUG=1,
because Guix strips the debug symbols out anyway. Note that this change
likely requires checking the CI for the package, like with bug #73058.
Thanks,
  

Comments

Andreas Enge April 1, 2025, 5:44 p.m. UTC | #1
Hello Artyom,

your patch looks good and still applies; I am building the package right
now. We have three openblases in Guix:
- openblas, aka openblas@0.3.29, has no dependents, which surprised me,
  until I found
- openblas@0.3.20 with 8824 depending packages.
- openblas-ilp64 is a 64 bit version with 331 depending packages (all
  julia unless I overlooked any).

Many of the 8824 depending packages come from R, but there are many
more.

So I am cc-ing the R team; do you think it would make sense to add this
commit to your r-team branch?

Or maybe I can try to run a science-team update at some point in time,
there is also an fftw patch and a bc patch to apply with lots of
rebuilds.

Andreas
  
Ricardo Wurmus April 1, 2025, 6:15 p.m. UTC | #2
Andreas Enge <andreas@enge.fr> writes:

> So I am cc-ing the R team; do you think it would make sense to 
> add this
> commit to your r-team branch?

Yes, on the r-team branch we're updating the default openblas, so 
all
dependents of openblas are rebuilt anyway.
  
Andreas Enge April 1, 2025, 7:32 p.m. UTC | #3
Am Tue, Apr 01, 2025 at 08:15:29PM +0200 schrieb Ricardo Wurmus:
> Yes, on the r-team branch we're updating the default openblas, so all
> dependents of openblas are rebuilt anyway.

Excellent, thanks!

I can confirm that the package builds on x86_64; I did not test the
patch anywhere else.

Andreas
  
Ricardo Wurmus April 2, 2025, 8:36 a.m. UTC | #4
Andreas Enge <andreas@enge.fr> writes:

> Am Tue, Apr 01, 2025 at 08:15:29PM +0200 schrieb Ricardo Wurmus:
>> Yes, on the r-team branch we're updating the default openblas, 
>> so all
>> dependents of openblas are rebuilt anyway.
>
> Excellent, thanks!
>
> I can confirm that the package builds on x86_64; I did not test 
> the
> patch anywhere else.

I've applied it on top of the rebased r-team branch with commit 
f05ee6c81556f86c477e84404c7b276f09a24568.
(The commit id will change several more times as the r-team branch 
waits in the queue.)
  

Patch

From 1cd8da82659bf9d369201135c86717d2ea40d7ca Mon Sep 17 00:00:00 2001
From: Artyom Bologov <mail@aartaka.me>
Date: Sun, 15 Sep 2024 06:42:29 +0400
Subject: [PATCH] gnu: openblas: Add debug output.

* gnu/packages/maths.scm (openblas): Add "debug" output
[outputs]: Add argument, add "debug" output
[arguments]<#:make-flags>: Add DEBUG=1 flag
---
 gnu/packages/maths.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a0cc0788ca..2d5b239548 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5173,6 +5173,7 @@  (define-public openblas
       #:make-flags
       #~(list (string-append "PREFIX=" #$output)
               "SHELL=bash"
+              "DEBUG=1"                 ; enable debug symbols
               "MAKE_NB_JOBS=0"          ;use jobserver for submakes
               "NO_STATIC=1"             ;avoid a 67 MiB static archive
 
@@ -5225,6 +5226,7 @@  (define-public openblas
      (list `(,gfortran "lib")))
     (native-inputs
      (list cunit gfortran perl))
+    (outputs '("out" "debug"))
     (home-page "https://www.openblas.net/")
     (synopsis "Optimized BLAS library based on GotoBLAS")
     (description
-- 
2.41.0