GNU bug report logs - #75241
[PATCH] gnu: gerbil: Don't target the build machine.

Previous Next

Package: guix-patches;

Reported by: Adam Faiz <adam.faiz <at> disroot.org>

Date: Wed, 1 Jan 2025 11:25:01 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 75241 in the body.
You can then email your comments to 75241 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#75241; Package guix-patches. (Wed, 01 Jan 2025 11:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adam Faiz <adam.faiz <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 01 Jan 2025 11:25:02 GMT) Full text and rfc822 format available.

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

From: Adam Faiz <adam.faiz <at> disroot.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: gerbil: Don't target the build machine.
Date: Wed, 1 Jan 2025 19:24:42 +0800
From 261ce5c615524ed80e6be7ddf7f903faa53b5154 Mon Sep 17 00:00:00 2001
Message-ID: <261ce5c615524ed80e6be7ddf7f903faa53b5154.1735722848.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Wed, 1 Jan 2025 17:07:11 +0800
Subject: [PATCH] gnu: gerbil: Don't target the build machine.

* gnu/packages/scheme.scm (gerbil)[arguments]: Add configure-flag to not build
with '-march=native'.
---
 gnu/packages/scheme.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 6f9d00e440..d8cb3b1de1 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2024 Skylar Hill <stellarskylark <at> posteo.net>
 ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2024 Adam Faiz <adam.faiz <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1187,6 +1188,8 @@ (define-public gerbil
         (base32 "1dff14bzqkq6scyyhnwhc3ky96j6lr84mnghk4da0x6vifw7p0p1"))))
     (arguments
      (list
+      #:configure-flags
+      #~(list "--enable-march=")
       #:phases #~(modify-phases %standard-phases
                    (delete 'bootstrap)
                    (add-after 'set-paths 'set-cc

base-commit: ba0340eec2e50439cfd94e85b40bf41c2d488a74
-- 
2.46.0




Information forwarded to guix-patches <at> gnu.org:
bug#75241; Package guix-patches. (Wed, 01 Jan 2025 17:43:02 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 75241 <at> debbugs.gnu.org
Subject: [PATCH] gnu: gerbil: Don't target the build machine.
Date: Wed, 01 Jan 2025 11:42:10 -0600
[Message part 1 (text/plain, inline)]
Hi, thanks for the contribution.

Can you explain the context and motivation around this change?

It would help me in reviewing this.

Thanks!

-- 
all the best,
jgart
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#75241; Package guix-patches. (Thu, 02 Jan 2025 03:05:02 GMT) Full text and rfc822 format available.

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

From: Adam Faiz <adam.faiz <at> disroot.org>
To: jgart <jgart <at> dismail.de>
Cc: 75241 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: gerbil: Don't target the build machine.
Date: Thu, 2 Jan 2025 11:04:26 +0800
Hi jgart,

> Hi, thanks for the contribution.
> 
> Can you explain the context and motivation around this change?
> 
> It would help me in reviewing this.
> 
> Thanks!

Sure! I wanted to try out Gerbil Scheme, so I installed the gerbil package. Unfortunately, using it's interpreter 'gxi' immediately gave an "Illegal instruction" error on my computer. After inspecting the configure script, I found that it defaults to compiling specifically for the CPU instructions available on the machine performing the build(-march=native). This leads to build results that aren't portable or reproducible across different machines of the same CPU architecture.

Avoiding this requires setting --enable-march to the empty string, which is only done for OpenBSD in the configure script, so the patch I sent sets this as a configure flag. It might be counterintuitive that there isn't a --disable-march option, but I wanted to fix the problem with the least work. If you feel there's a better way to solve the problem, please let me know.

> 
> -- 
> all the best,
> jgart
Sincerely,
Adam




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 09 Feb 2025 16:53:01 GMT) Full text and rfc822 format available.

Notification sent to Adam Faiz <adam.faiz <at> disroot.org>:
bug acknowledged by developer. (Sun, 09 Feb 2025 16:53:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Adam Faiz <adam.faiz <at> disroot.org>
Cc: 75241-done <at> debbugs.gnu.org
Subject: Re: [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine.
Date: Sun, 09 Feb 2025 17:51:56 +0100
[Message part 1 (text/plain, inline)]
Adam Faiz <adam.faiz <at> disroot.org> skribis:

>>From 261ce5c615524ed80e6be7ddf7f903faa53b5154 Mon Sep 17 00:00:00 2001
> Message-ID: <261ce5c615524ed80e6be7ddf7f903faa53b5154.1735722848.git.adam.faiz <at> disroot.org>
> From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
> Date: Wed, 1 Jan 2025 17:07:11 +0800
> Subject: [PATCH] gnu: gerbil: Don't target the build machine.
>
> * gnu/packages/scheme.scm (gerbil)[arguments]: Add configure-flag to not build
> with '-march=native'.

Applied with the change below, thanks!

Ludo'.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 95d999eb46c..4c9ad0628b8 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -1267,8 +1267,9 @@ (define-public gerbil
         (base32 "1dff14bzqkq6scyyhnwhc3ky96j6lr84mnghk4da0x6vifw7p0p1"))))
     (arguments
      (list
-      #:configure-flags
-      #~(list "--enable-march=")
+      ;; Do not build with '-march=native'.
+      #:configure-flags #~(list "--enable-march=")
+
       #:phases #~(modify-phases %standard-phases
                    (delete 'bootstrap)
                    (add-after 'set-paths 'set-cc

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

This bug report was last modified 104 days ago.

Previous Next


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