GNU bug report logs - #51198
[PATCH] gnu: Add b2sum.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Thu, 14 Oct 2021 04:29:02 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

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 51198 in the body.
You can then email your comments to 51198 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 guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Thu, 14 Oct 2021 04:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 14 Oct 2021 04:29:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add b2sum.
Date: Thu, 14 Oct 2021 00:28:36 -0400
* gnu/packages/crypto.scm (b2sum): New variable.
---
 gnu/packages/crypto.scm | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 64cdf48d5d..9d16d64ed2 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo <at> famulari.name>
+;;; Copyright © 2016, 2017, 2018, 2019, 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2016 Lukas Gradl <lgradl <at> openmailbox>
 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2016, 2017 Nikita <nikita <at> n0.is>
@@ -838,6 +838,42 @@ (define-public libb2
 BLAKE.")
     (license license:public-domain)))
 
+(define-public b2sum
+  ;; Upstream doesn't seem to use a versioned release workflow, so build from
+  ;; a recent commit.
+  (let ((commit "54f4faa4c16ea34bcd59d16e8da46a64b259fc07")
+        (revision "0"))
+    (package
+      (name "b2sum")
+      (version (git-version "20190724" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                       (url "https://github.com/BLAKE2/BLAKE2")
+                       (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "04z631v0vzl52g73v390ask5fnzi5wg83lcjkjhpmmymaz0jn152"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
+                            (string-append "PREFIX=" (assoc-ref %outputs "out")))
+         #:tests? #f ; No test suite
+         #:phases
+         (modify-phases %standard-phases
+           ;; XXX Can add-before and delete be expected to work like this?
+           (add-before 'configure 'change-directory
+                       (lambda _
+                         (chdir "b2sum")))
+           (delete 'configure))))
+      (home-page "https://www.blake2.net/")
+      (synopsis "BLAKE2 checksum tool")
+      (description "BLAKE2 is a cryptographic hash function faster than MD5,
+SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
+      ;; You may also choose to redistribute this program as Apache 2.0 or the
+      ;; OpenSSL license. See 'b2sum/b2sum.c' in the source distribution.
+      (license license:cc0))))
+
 (define-public rhash
   (package
     (name "rhash")
-- 
2.33.0





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Tue, 26 Oct 2021 16:09:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Tue, 26 Oct 2021 16:09:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 51198-done <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add b2sum.
Date: Tue, 26 Oct 2021 12:07:57 -0400
Pushed as 3d51fd19faee59d9455eebbb957cf6498ecc1220




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Tue, 26 Oct 2021 22:27:02 GMT) Full text and rfc822 format available.

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

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>, 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Wed, 27 Oct 2021 00:26:01 +0200
Leo Famulari <leo <at> famulari.name> writes:

> * gnu/packages/crypto.scm (b2sum): New variable.

Hi, I guix pulled and wanted to try this, but I get

>> b2sum --help
> Illegal instruction

(I'm on an old X200 thinkpad).  Might it be that build is not
deterministic (and we should disable some optimization)?

Thanks, Nicolò




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Tue, 26 Oct 2021 22:55:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Tue, 26 Oct 2021 18:53:55 -0400
On Wed, Oct 27, 2021 at 12:26:01AM +0200, Nicolò Balzarotti wrote:
> Leo Famulari <leo <at> famulari.name> writes:
> 
> > * gnu/packages/crypto.scm (b2sum): New variable.
> 
> Hi, I guix pulled and wanted to try this, but I get
> 
> >> b2sum --help
> > Illegal instruction
> 
> (I'm on an old X200 thinkpad).  Might it be that build is not
> deterministic (and we should disable some optimization)?

I guess it's because the package built with "-march=native".

What's the right choice for this parameter?

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

CC-ing Mark Weaver because he often has good advice on this subject.

'gnu/packages' does include some "-march=" examples.




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Tue, 26 Oct 2021 22:55:03 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: Mark H Weaver <mhw <at> netris.org>, 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Tue, 26 Oct 2021 18:54:36 -0400
On Tue, Oct 26, 2021 at 06:53:55PM -0400, Leo Famulari wrote:
> I guess it's because the package built with "-march=native".
> 
> What's the right choice for this parameter?
> 
> https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
> 
> CC-ing Mark Weaver because he often has good advice on this subject.
> 
> 'gnu/packages' does include some "-march=" examples.

Er, CC-ing for real now




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Tue, 26 Oct 2021 23:17:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Tue, 26 Oct 2021 19:16:22 -0400
On Wed, Oct 27, 2021 at 12:26:01AM +0200, Nicolò Balzarotti wrote:
> (I'm on an old X200 thinkpad).  Might it be that build is not
> deterministic (and we should disable some optimization)?

As a test, I replaced march=native with march=x86-64.

My benchmark is hashing a ~7GB tree of files [0].

Once the files are cached by the kernel:
"march=native": ~13 seconds
"march=x86-64": ~20 seconds

I wonder if some of the other values of -march are faster...

Or maybe the package could use #:substitutable #f, since b2sum is a very
quick build.

Although BLAKE3 / b3sum [1] is radically faster, b2sum is nice because
it's not in Rust, which is still suboptimal on Guix. With b3sum, my
benchmark takes less than 2 seconds!

[0]
`LC_ALL=C; find "$1" -type f -print0 | sort -z | xargs -0 b2sum | time b2sum`

[1] https://bugs.gnu.org/51289




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 27 Oct 2021 08:45:01 GMT) Full text and rfc822 format available.

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

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Wed, 27 Oct 2021 10:44:45 +0200
Hi Leo,

Leo Famulari <leo <at> famulari.name> writes:

> On Wed, Oct 27, 2021 at 12:26:01AM +0200, Nicolò Balzarotti wrote:
>> (I'm on an old X200 thinkpad).  Might it be that build is not
>> deterministic (and we should disable some optimization)?
>
> As a test, I replaced march=native with march=x86-64.
>
> [...]
>
> Or maybe the package could use #:substitutable #f, since b2sum is a very
> quick build.

This blog post [fn:1] on guix-hpc address the "Pre-built binaries
vs. performance" dilemma.

I guess the easiest way is to provide a variant (b2sum-avx or something
like that) with avx enabled.  Else, I'd just go with the unoptimized
version as it happens for many other packages, but let's hear from
others.

Thanks, Nicolò

[fn:1] https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 27 Oct 2021 15:39:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Wed, 27 Oct 2021 11:38:08 -0400
[Message part 1 (text/plain, inline)]
On Wed, Oct 27, 2021 at 10:44:45AM +0200, Nicolò Balzarotti wrote:
> This blog post [fn:1] on guix-hpc address the "Pre-built binaries
> vs. performance" dilemma.
>
> [fn:1] https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/

It's helpful, but it doesn't look like we are using that method in Guix
anymore. It was removed in this commit:

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=969adb235ee34decb65255e1ea821ff0e221ed3d

I guess it learned how to do runtime feature detection?

> I guess the easiest way is to provide a variant (b2sum-avx or something
> like that) with avx enabled.  Else, I'd just go with the unoptimized
> version as it happens for many other packages, but let's hear from
> others.

The easiest thing is require local building, since it's an extremely
cheap build. Only 1.5 seconds on my laptop, total (not just the build
phase). With blis, one had to consider the lengthy build time.

Because performance is critical for a tool like this, and because it's
cheap to build, I've attached a patch to require local building. This is
easier for me than creating a set of package variants that will need to
be expanded for each new generation of CPUs :)
[0001-gnu-b2sum-Build-on-the-local-machine.patch (text/plain, attachment)]

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Oct 2021 15:46:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 27 Oct 2021 15:57:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 51198 <at> debbugs.gnu.org,
 Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Wed, 27 Oct 2021 17:56:31 +0200
Hi!

Leo Famulari <leo <at> famulari.name> skribis:

> On Wed, Oct 27, 2021 at 10:44:45AM +0200, Nicolò Balzarotti wrote:
>> This blog post [fn:1] on guix-hpc address the "Pre-built binaries
>> vs. performance" dilemma.
>>
>> [fn:1] https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/
>
> It's helpful, but it doesn't look like we are using that method in Guix
> anymore. It was removed in this commit:
>
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=969adb235ee34decb65255e1ea821ff0e221ed3d
>
> I guess it learned how to do runtime feature detection?

BLIS has run-time/load-time feature detection now (which is the main
approach the blog argues for).

>> I guess the easiest way is to provide a variant (b2sum-avx or something
>> like that) with avx enabled.  Else, I'd just go with the unoptimized
>> version as it happens for many other packages, but let's hear from
>> others.
>
> The easiest thing is require local building, since it's an extremely
> cheap build. Only 1.5 seconds on my laptop, total (not just the build
> phase). With blis, one had to consider the lengthy build time.
>
> Because performance is critical for a tool like this, and because it's
> cheap to build, I've attached a patch to require local building. This is
> easier for me than creating a set of package variants that will need to
> be expanded for each new generation of CPUs :)
>
>>From 8b862425310cf631c30c823eb0fa2bfd79d36823 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo <at> famulari.name>
> Date: Wed, 27 Oct 2021 11:29:40 -0400
> Subject: [PATCH] gnu: b2sum: Build on the local machine.
>
> * gnu/packages/crypto.scm (b2sum)[arguments]: Set '#:substitutable? #f'.
> ---
>  gnu/packages/crypto.scm | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
> index 3acd147f25..de8bcf1d70 100644
> --- a/gnu/packages/crypto.scm
> +++ b/gnu/packages/crypto.scm
> @@ -858,9 +858,18 @@ (define-public b2sum
>                   (base32 "04z631v0vzl52g73v390ask5fnzi5wg83lcjkjhpmmymaz0jn152"))))
>        (build-system gnu-build-system)
>        (arguments
> -       `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
> -                            (string-append "PREFIX=" (assoc-ref %outputs "out")))
> +       `(;; By default, b2sum uses the compiler to generate instructions
> +         ;; tailored to the CPU of the running machine, using "-march=native".
> +         ;; This gives a ~1.5x speedup on a Core i5-6300U with a large dataset
> +         ;; paged in, whereas compilation of b2sum takes ~1.5 seconds.
> +         ;; b2sum does not support run-time feature detection:
> +         ;; https://github.com/BLAKE2/BLAKE2/issues/1
> +         ;; For more information, see the discussion beginning here:
> +         ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51198#13
> +         #:substitutable? #f

It’s okay but not entirely sufficient: on a cluster setup, you typically
talk to a daemon that’s on another machine, so the CPU features it’ll
detect there may be different from those you’ll use.  Likewise, as
discussed on IRC, you’d also need #:local-build? #t.

Anyway, I’d suggest using ‘guix hash -H blake2s-256’ or similar (it uses
libgcrypt, which does the right thing).  I think the latest Coreutils
provide a generic ‘cksum’, too, that probably does the right thing.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 03 Nov 2021 17:33:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 51198 <at> debbugs.gnu.org,
 Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Wed, 3 Nov 2021 13:32:35 -0400
[Message part 1 (text/plain, inline)]
On Wed, Oct 27, 2021 at 05:56:31PM +0200, Ludovic Courtès wrote:
> It’s okay but not entirely sufficient: on a cluster setup, you typically
> talk to a daemon that’s on another machine, so the CPU features it’ll
> detect there may be different from those you’ll use.  Likewise, as
> discussed on IRC, you’d also need #:local-build? #t.

It seems that #:local-build? is not available in gnu-build-system. Is
that correct?

Using the attached patch, building fails with "Unrecognized keyword:
#:local-build?".

Is there a way to turn it on for packages using gnu-build-system?
[0001-gnu-b2sum-Build-on-the-local-machine.patch (text/plain, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Sat, 06 Nov 2021 16:46:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 51198 <at> debbugs.gnu.org,
 Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Sat, 06 Nov 2021 17:45:01 +0100
Hi,

Leo Famulari <leo <at> famulari.name> skribis:

> On Wed, Oct 27, 2021 at 05:56:31PM +0200, Ludovic Courtès wrote:
>> It’s okay but not entirely sufficient: on a cluster setup, you typically
>> talk to a daemon that’s on another machine, so the CPU features it’ll
>> detect there may be different from those you’ll use.  Likewise, as
>> discussed on IRC, you’d also need #:local-build? #t.
>
> It seems that #:local-build? is not available in gnu-build-system. Is
> that correct?

Oh right, it’s missing from (guix build-system gnu).  We could easily
add it.

Though again, it would remain an approximation of what we really want.

HTH!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Sat, 27 Nov 2021 23:33:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 51198 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] build-system/gnu: Add #:local-build? parameter.
Date: Sat, 27 Nov 2021 18:32:37 -0500
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add #:local-build?
parameter and pass it to 'build-expression->derivation'.
---
 guix/build-system/gnu.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 6b481ad45c..fc923f0c5a 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -349,6 +349,7 @@ (define* (gnu-build store name input-drvs
                     (build (nix-system->gnu-triplet system))
                     (imported-modules %gnu-build-system-modules)
                     (modules %default-modules)
+                    (local-build? #f)
                     (substitutable? #t)
                     allowed-references
                     disallowed-references)
@@ -429,6 +430,7 @@ (define guile-for-build
                                 #:inputs input-drvs
                                 #:outputs outputs
                                 #:modules imported-modules
+                                #:local-build? local-build?
                                 #:substitutable? substitutable?
 
                                 #:allowed-references
@@ -504,6 +506,7 @@ (define* (gnu-cross-build store name
                           (build (nix-system->gnu-triplet system))
                           (imported-modules %gnu-build-system-modules)
                           (modules %default-modules)
+                          (local-build? #f)
                           (substitutable? #t)
                           allowed-references
                           disallowed-references)
@@ -595,6 +598,7 @@ (define guile-for-build
                                 #:inputs (append native-drvs target-drvs)
                                 #:outputs outputs
                                 #:modules imported-modules
+                                #:local-build? local-build?
                                 #:substitutable? substitutable?
 
                                 #:allowed-references
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Sat, 27 Nov 2021 23:33:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: 51198 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] gnu: b2sum: Build on the local machine.
Date: Sat, 27 Nov 2021 18:32:38 -0500
* gnu/packages/crypto.scm (b2sum)[arguments]: Set '#:substitutable? #f' and
'#:local-build? #t'.
---
 gnu/packages/crypto.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index b6f2010a80..d4c6717eb5 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -858,9 +858,19 @@ (define-public b2sum
                  (base32 "04z631v0vzl52g73v390ask5fnzi5wg83lcjkjhpmmymaz0jn152"))))
       (build-system gnu-build-system)
       (arguments
-       `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
-                            (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       `(;; By default, b2sum uses the compiler to generate instructions
+         ;; tailored to the CPU of the running machine, using "-march=native".
+         ;; This gives a ~1.5x speedup on a Core i5-6300U with a large dataset
+         ;; paged in, whereas compilation of b2sum takes ~1.5 seconds.
+         ;; b2sum does not support run-time feature detection:
+         ;; https://github.com/BLAKE2/BLAKE2/issues/1
+         ;; For more information, see the discussion beginning here:
+         ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51198#13
+         #:substitutable? #f
+         #:local-build? #t
          #:tests? #f ; No test suite
+         #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                            (string-append "PREFIX=" (assoc-ref %outputs "out")))
          #:phases
          (modify-phases %standard-phases
            (add-before 'build 'change-directory
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Sat, 27 Nov 2021 23:37:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 51198 <at> debbugs.gnu.org,
 Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Sat, 27 Nov 2021 18:36:48 -0500
On Sat, Nov 06, 2021 at 05:45:01PM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo <at> famulari.name> skribis:
> > It seems that #:local-build? is not available in gnu-build-system. Is
> > that correct?
> 
> Oh right, it’s missing from (guix build-system gnu).  We could easily
> add it.

I've sent patches to make this change. I checked that the derivation of
'hello' is unchanged when building without cross-compilation.

https://issues.guix.gnu.org/51198#12




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 01 Dec 2021 15:54:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Wed, 01 Dec 2021 16:34:09 +0100
Hi Leo,

On Sat, 27 Nov 2021 at 18:32, Leo Famulari <leo <at> famulari.name> wrote:
> * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add #:local-build?
> parameter and pass it to 'build-expression->derivation'.

The manual needs to be updated, I guess.  Something there:

<https://guix.gnu.org/manual/devel/en/guix.html#index-gnu_002dbuild_002dsystem>


This gnu-build-system triggers a world rebuild, isn’t it?  Maybe, it
could go to core-updates-frozen now, no? (Now = before merge :-))

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#51198; Package guix-patches. (Wed, 01 Dec 2021 17:51:02 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 51198 <at> debbugs.gnu.org
Subject: Re: bug#51198: [PATCH] gnu: Add b2sum.
Date: Wed, 1 Dec 2021 12:50:23 -0500
On Wed, Dec 01, 2021 at 04:34:09PM +0100, zimoun wrote:
> On Sat, 27 Nov 2021 at 18:32, Leo Famulari <leo <at> famulari.name> wrote:
> > * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add #:local-build?
> > parameter and pass it to 'build-expression->derivation'.
> 
> The manual needs to be updated, I guess.  Something there:
> 
> <https://guix.gnu.org/manual/devel/en/guix.html#index-gnu_002dbuild_002dsystem>

Good idea, I'll send a revised patch series.

> This gnu-build-system triggers a world rebuild, isn’t it?  Maybe, it
> could go to core-updates-frozen now, no? (Now = before merge :-))

As far as I can tell, this does not change any derivations, except of
course if a package definition uses the new #:local-build? option. So it
should be okay for the master branch, if it's a change that we want to
make.




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Fri, 18 Mar 2022 17:13:01 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Fri, 18 Mar 2022 17:13:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 51198-done <at> debbugs.gnu.org
Subject: Re: [bug#51198] [PATCH] gnu: Add b2sum.
Date: Fri, 18 Mar 2022 13:12:42 -0400
On Wed, Oct 27, 2021 at 12:26:01AM +0200, Nicolò Balzarotti wrote:
> Leo Famulari <leo <at> famulari.name> writes:
> 
> > * gnu/packages/crypto.scm (b2sum): New variable.
> 
> Hi, I guix pulled and wanted to try this, but I get
> 
> >> b2sum --help
> > Illegal instruction
> 
> (I'm on an old X200 thinkpad).  Might it be that build is not
> deterministic (and we should disable some optimization)?

I just pushed commit 386adb6df0e00e7170df0cdfaf0e04c38d0f3e11, which
removes the "march=native" compiler flag, so that the package should
work generically.

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=386adb6df0e00e7170df0cdfaf0e04c38d0f3e11

This commit also enables the 'tunable?' property of the package, so that
one can use this program with the highest performance in a way that is
tailored to their hardware.

Just add the --tune command-line option to any Guix command that
provides this package and it should do the right thing.

Thanks Nicolò for reporting the problem and thanks to Ludovic for
developing the solution.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Apr 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 10 days ago.

Previous Next


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