GNU bug report logs - #57050
[PATCH 0/6] gnu: Update Racket to 8.6. Add Zuo.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Mon, 8 Aug 2022 06:07:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 57050 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>, Liliana Marie Prikler <liliana.prikler <at> gmail.com>, Philip McGrath <philip <at> philipmcgrath.com>, Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [bug#57050] [PATCH v2 10/13] gnu: racket-vm-bc: Add workaround for ppc64le.
Date: Thu, 11 Aug 2022 07:08:20 -0400
This is an attempt to avoid a problem with Racket BC on ppc64 reported
in <https://issues.guix.gnu.org/57050#19> that was exposed by attempting
to use Racket BC to bootstrap Chez Scheme. Thanks to Matthew Flatt for
the workaround: <https://racket.discourse.group/t/950/22>.

* gnu/packages/racket.scm (racket-vm-bc)[arguments]<#:configure-flags>:
Increase the number of bytes that should be available on the stack for
"safety" when checking for stack overflow.
---
 gnu/packages/racket.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 3b96cf46ef..008adcc072 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -432,7 +432,20 @@ (define-public racket-vm-bc
      (substitute-keyword-arguments (package-arguments racket-vm-cgc)
        ((#:configure-flags _ '())
         #~(cons "--enable-bconly"
-                #$(racket-vm-common-configure-flags)))))
+                #$(cond
+                   ((target-ppc64le?)
+                    ;; Attempt to avoid a problem bootstrapping Chez Scheme:
+                    ;; see <https://issues.guix.gnu.org/57050#19>
+                    ;; and <https://racket.discourse.group/t/950/22>.
+                    #~(map
+                       (lambda (flag)
+                         (if (string-prefix? "CPPFLAGS=" flag)
+                             (string-append flag
+                                            " -DSTACK_SAFETY_MARGIN=200000")
+                             flag))
+                       #$(racket-vm-common-configure-flags)))
+                   (else
+                    (racket-vm-common-configure-flags)))))))
     (synopsis "Racket BC [3M] implementation")
     (description "The Racket BC (``before Chez'' or ``bytecode'')
 implementation was the default before Racket 8.0.  It uses a compiler written
-- 
2.32.0





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

Previous Next


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