GNU bug report logs - #74290
[PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Sun, 10 Nov 2024 10:35:02 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: 74290 <at> debbugs.gnu.org
Subject: [PATCH v4 13/58] gnu: bash: Avoid hang when cross-built for the Hurd.
Date: Sun, 24 Nov 2024 08:54:36 +0100
For example, without this patch bash hangs while configuring diffutils.
Reproducer:

cat >x.awk <<EOF
x... repeat 16384 (the actual pipe size) times
EOF

* gnu/packages/bash.scm (bash): When cross-building for the Hurd, add new
"create-pipesize.h" stage.

Change-Id: I02c1dcf2d63849626ba3448cd52766db822dc77c
---
 gnu/packages/bash.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 56918d79bd..642a405985 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -175,6 +175,20 @@ (define-public bash
 
         #:phases
         (modify-phases %standard-phases
+          ,@(if (and (target-hurd?) (not (system-hurd?)))
+                `((add-after 'configure 'create-pipesize.h
+                    ;; The Bash Makefile mentions how PIPESIZE calculation is
+                    ;; "technically wrong" when cross-compiling, and offers no
+                    ;; way to override it.  On the 64bit Hurd, it can make
+                    ;; bash hang.
+                    (lambda _
+                      (with-directory-excursion "builtins"
+                        (with-output-to-file "psize.aux"
+                          (lambda _ (display "dummy to pacify make\n")))
+                        (with-output-to-file "pipesize.h"
+                          (lambda _ (display "#define PIPESIZE 16384\n")))))))
+                '())
+
           (add-after 'install 'install-sh-symlink
             (lambda* (#:key outputs #:allow-other-keys)
               ;; Add a `sh' -> `bash' link.
-- 
2.46.0





This bug report was last modified 175 days ago.

Previous Next


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