unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine.
@ 2025-01-01 11:24 Adam Faiz via Guix-patches via
  2025-01-01 17:42 ` jgart via Guix-patches via
  2025-01-02  3:04 ` Adam Faiz via Guix-patches via
  0 siblings, 2 replies; 3+ messages in thread
From: Adam Faiz via Guix-patches via @ 2025-01-01 11:24 UTC (permalink / raw)
  To: 75241

From 261ce5c615524ed80e6be7ddf7f903faa53b5154 Mon Sep 17 00:00:00 2001
Message-ID: <261ce5c615524ed80e6be7ddf7f903faa53b5154.1735722848.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@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@gmail.com>
 ;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
 ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2024 Adam Faiz <adam.faiz@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




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

* [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine.
  2025-01-01 11:24 [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine Adam Faiz via Guix-patches via
@ 2025-01-01 17:42 ` jgart via Guix-patches via
  2025-01-02  3:04 ` Adam Faiz via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: jgart via Guix-patches via @ 2025-01-01 17:42 UTC (permalink / raw)
  To: 75241

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


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine.
  2025-01-01 11:24 [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine Adam Faiz via Guix-patches via
  2025-01-01 17:42 ` jgart via Guix-patches via
@ 2025-01-02  3:04 ` Adam Faiz via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Faiz via Guix-patches via @ 2025-01-02  3:04 UTC (permalink / raw)
  To: jgart; +Cc: 75241

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




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

end of thread, other threads:[~2025-01-02  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-01 11:24 [bug#75241] [PATCH] gnu: gerbil: Don't target the build machine Adam Faiz via Guix-patches via
2025-01-01 17:42 ` jgart via Guix-patches via
2025-01-02  3:04 ` Adam Faiz via Guix-patches via

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).