unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44337] [squid] Reproducibility bug in squid package
@ 2020-10-30 20:56 Jean-Baptiste Note
  2020-11-02 13:38 ` bug#44337: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Baptiste Note @ 2020-10-30 20:56 UTC (permalink / raw)
  To: 44337

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Dear,

The squid package as provided from substitute servers currently crashes
on my (admittedly old) Core 2 Duo server.  Though generally observed in
a different context (virtualization), this is an FAQ from SQUID -- see:

https://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError

I think the fix of disabling -march=native should actually be applied.
In the current state, not only does the package not work on some x86_64
machines, but the outcome of the build depends on the builder machine
and thus defeats reproducibility.

Please find attached a patch implementing the fix from the FAQ, which
yields a SQUID usable on my home server, and reproducible from the two
build machines at my disposal.

NB: maybe a more general fix could be envisionned for these kind of
-march=native issues; this is admittedly a pretty local fix.

Kind regards,
Jean-Baptiste


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: squid fix --]
[-- Type: text/x-patch, Size: 1182 bytes --]

From 199ca1036197064d609a8f76a7eb46b6e72996fb Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Note <jean-baptiste.note@m4x.org>
Date: Wed, 28 Oct 2020 11:22:39 -0400
Subject: [PATCH] gnu: squid: Fix build reproducibility issue.

* gnu/packages/networking.scm (squid): Add --disable-arch-native configure
flag.
---
 gnu/packages/networking.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 4f506b4bbf..3f4e1e639b 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1559,7 +1559,11 @@ TCP connection, TLS handshake and so on) in the terminal.")
         (base32 "1q1ywpic6s7dfjj3cwzcfgscc4zq0aih462gyas7j1z683ss14b8"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     '(#:configure-flags
+       ;; disable -march=native in build for reproducibility; see
+       ;; https://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError
+       (list "--disable-arch-native")
+       #:phases
        (modify-phases %standard-phases
          (add-before 'build 'fix-true-path
            (lambda* (#:key inputs #:allow-other-keys)
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#44337: [squid] Reproducibility bug in squid package
  2020-10-30 20:56 [bug#44337] [squid] Reproducibility bug in squid package Jean-Baptiste Note
@ 2020-11-02 13:38 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-11-02 13:38 UTC (permalink / raw)
  To: Jean-Baptiste Note; +Cc: 44337-done

Hi Jean-Baptiste,

Jean-Baptiste Note <jean-baptiste.note@m4x.org> skribis:

> The squid package as provided from substitute servers currently crashes
> on my (admittedly old) Core 2 Duo server.  Though generally observed in
> a different context (virtualization), this is an FAQ from SQUID -- see:
>
> https://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError
>
> I think the fix of disabling -march=native should actually be applied.
> In the current state, not only does the package not work on some x86_64
> machines, but the outcome of the build depends on the builder machine
> and thus defeats reproducibility.

Indeed.  Our goal is to provide “generic” binaries, so disabling
‘-march=native’ is the right thing anyway.

> NB: maybe a more general fix could be envisionned for these kind of
> -march=native issues; this is admittedly a pretty local fix.

In practice it seems that packages rarely do that by default (with
linear algebra software being an exception), though I don’t have hard
figures.

>>From 199ca1036197064d609a8f76a7eb46b6e72996fb Mon Sep 17 00:00:00 2001
> From: Jean-Baptiste Note <jean-baptiste.note@m4x.org>
> Date: Wed, 28 Oct 2020 11:22:39 -0400
> Subject: [PATCH] gnu: squid: Fix build reproducibility issue.
>
> * gnu/packages/networking.scm (squid): Add --disable-arch-native configure
> flag.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-02 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 20:56 [bug#44337] [squid] Reproducibility bug in squid package Jean-Baptiste Note
2020-11-02 13:38 ` bug#44337: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).