[bug#78471,core-packages-team,0/5] Restoring the Hurd

Message ID OQTj7JO--F-9@tutamail.com
State New
Headers

Commit Message

yelninei--- via Guix-patches via May 17, 2025, 2:53 p.m. UTC
  Hello,

Here are (hopefully) the last remaining patches to fix #77709.
I have built things up to bison and automake succesfully.
Some notes:
I am bad at naming things and labelled the glibc patches according to the gnulib-test they fix.

I tried to add comments explaining why things are changed, I hope they are clear enough.

In the pthread-once patch I removed the note from the debian patch regarding the symbol version of pthread-once because as soon as glibc 2.42 is available in guix everything will be built against the 2.42 symbol automatically.

For the --disable-year2038 changes, several packages in commencement.scm already have it unconditionally and this is now repeated twice on i586-gnu by inheriting the args.
Is there a better way to get only the 32bit hurd target than the

(and (target-hurd?)
     (not (target64bit?)))

i am using currently?

I dont know what the convention is when the #:configure-flag keyword is added only for a specific target if the keyword is also spliced in or not, but this is only a cosmetic change.

The automake test suite seems to be extremely flaky. It fails when the host glibc is 2.39 because of locale errors on stderr  (the test checks for empty stderr)  and some other tests that required multiple tries (~8) to get lucky. 
However the t/output-order.sh failure due to libgc warnings from the guile driver on stderr currently on master no longer occurs.

Ludovic also mentioned to merge glibc and glibc/hurd again.


Yelninei (5):
  gnu: glibc/hurd: Fix gnulib tests.
  gnu: findutils: Disable 64bit time_t on the 32bit Hurd.
  gnu: util-linux: Disable 64bit time_t on the 32bit Hurd.
  gnu: tar: Disable 64bit time_t on the 32bit Hurd.
  gnu: bison: Link with pthread on the Hurd.

gnu/local.mk                                  |   3 +
gnu/packages/base.scm                         |  13 ++
gnu/packages/bison.scm                        |  10 +-
gnu/packages/commencement.scm                 |   3 +-
gnu/packages/linux.scm                        |   7 +-
.../glibc-hurd-2.41-pthread-once.patch        | 185 ++++++++++++++++++
.../glibc-hurd-2.41-pthread-sigmask.patch     |  22 +++
.../patches/glibc-hurd-2.41-symlink.patch     |  32 +++
8 files changed, 271 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/glibc-hurd-2.41-pthread-once.patch
create mode 100644 gnu/packages/patches/glibc-hurd-2.41-pthread-sigmask.patch
create mode 100644 gnu/packages/patches/glibc-hurd-2.41-symlink.patch


base-commit: 4935a8066168c3efc0520d132b6c6a3116eb5d54
  

Patch

From 3730d78b3ec57e7fe281d5dd69628e7047203ed3 Mon Sep 17 00:00:00 2001
Message-ID: <3730d78b3ec57e7fe281d5dd69628e7047203ed3.1747473280.git.yelninei@tutamail.com>
In-Reply-To: <cover.1747473280.git.yelninei@tutamail.com>
References: <cover.1747473280.git.yelninei@tutamail.com>
From: Yelninei <yelninei@tutamail.com>
Date: Mon, 12 May 2025 16:09:00 +0000
Subject: [PATCH core-packages-team 5/5] gnu: bison: Link with pthread on the
 Hurd.

* gnu/packages/bison.scm (bison): Add LIBS=-lphtread on the Hurd.
* gnu/packages/commencement.scm (bison-boot0): Strip configure-flags.

Change-Id: If47c10c3a653df5fd07119a6fa53a40527d37b56
---
 gnu/packages/bison.scm        | 10 ++++++++--
 gnu/packages/commencement.scm |  3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 6cd7abe4206..feca0743048 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -24,6 +24,7 @@  (define-module (gnu packages bison)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages perl)
@@ -44,14 +45,19 @@  (define-public bison
         "1wjvbbzrr16k1jlby3l436an3kvv492h08arbnf0gwgprha05flv"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Building in parallel on many-core systems may cause an error such as
+     `(;; Building in parallel on many-core systems may cause an error such as
        ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
        ;; directory".  See <https://bugs.gnu.org/36238>.
        #:parallel-build? #f
        ;; Similarly, when building tests in parallel, Make may produce this error:
        ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
        ;; or directory".  Full log in <https://bugs.gnu.org/36238>.
-       #:parallel-tests? #f))
+       #:parallel-tests? #f
+       ;; On the Hurd with glibc 2.41 bison uses weak symbols from pthread
+       ;; but does not link to it.
+       ,@(if (target-hurd?)
+             (list #:configure-flags ''("LIBS=-lpthread"))
+             '())))
     (native-inputs (list perl
                          ;; m4 is not present in PATH when cross-building.
                          m4))
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index edd4a1db468..1ffb72945a1 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2639,7 +2639,8 @@  (define bison-boot0
            (_
             '(#:configure-flags '("gl_cv_func_posix_spawn_works=no"))))
 
-       ,@(package-arguments bison)))))
+       ,@(strip-keyword-arguments '(#:configure-flags)
+				  (package-arguments bison))))))
 
 (define flex-boot0
   ;; This Flex is needed to build MiG as well as Linux-Libre headers.
-- 
2.49.0