unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
@ 2024-08-15 16:54 Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’ Ludovic Courtès
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:54 UTC (permalink / raw)
  To: 72643
  Cc: Ludovic Courtès, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

Hello!

This patch series fixes Hurd support (i586-gnu) on ‘core-updates’,
as described <https://issues.guix.gnu.org/72315>.  It does so by
updating the ‘glibc-bootstrap’ tarball.

I built the new tarball from the third commit and dropped it
under gnu/packages/aux-files, which where the commit marked as
“DRAFT” picks it up.  Of course we’ll change that to a URL at
ftp.gnu.org/gnu/guix/bootstrap/i586-gnu once we agree on the
strategy.

For convenience, I uploaded the tarball here:

  https://people.bordeaux.inria.fr/lcourtes/tmp/glibc-stripped-2.39-i586-pc-gnu.tar.xz
  https://people.bordeaux.inria.fr/lcourtes/tmp/glibc-stripped-2.39-i586-pc-gnu.tar.xz.sig

  nix-sha256: 0x2x6w611k6v9qdabacawamw2475p04hm3s0q95xcg063wjq4ig2

I was able to build this successfully:

  ./pre-inst-env guix build \
    -e '(@@ (gnu packages commencement) glibc-final-with-bootstrap-bash)' \
    -s i586-gnu

I’ll try to build some more and see.

I’d like to push this to ‘core-updates’ soon since it’s probably the
last blocker before we can merge.

Thoughts?

Ludo’.

Ludovic Courtès (6):
  gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’.
  gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the
    Hurd.
  gnu: make-bootstrap: Include libdl.a and libutil.a in
    ‘glibc-stripped’.
  DRAFT gnu: glibc-bootstrap: Update i586-gnu variant.
  gnu: perl-boot0: Use gexps.
  gnu: commencement: Build ‘perl-boot0’ without stack protector on the
    Hurd.

 gnu/packages/bootstrap.scm      | 105 ++++++++++++++++----------------
 gnu/packages/commencement.scm   |  45 ++++++++------
 gnu/packages/make-bootstrap.scm |  27 ++++----
 guix/build/make-bootstrap.scm   |  30 ++++++---
 4 files changed, 117 insertions(+), 90 deletions(-)


base-commit: 6fe957f749bc500bce49e4fa1cfa4d8c32227f32
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd Ludovic Courtès
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643; +Cc: Ludovic Courtès, Ludovic Courtès

Previously, ‘guix build bootstrap-tarballs --target=aarch64-linux-gnu’
or similar would construct a cross-libc where ‘%current-target-system’
is set.  This would lead to a failure in the
‘add-cross-binutils-to-PATH’ phase, which assumes that
‘%current-target-system’ is #f; indeed, ‘cross-libc’ already returns a
cross libc and so ‘%current-target-system’ must be set to #f.

* gnu/packages/make-bootstrap.scm (%glibc-stripped)[inputs]: Move libc to…
[native-inputs]: … here.

Change-Id: Ifbf5e519ba3198940f4de4a36075d5302e923172
---
 gnu/packages/make-bootstrap.scm | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index d5b6b818b3..679aa46d60 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -448,19 +448,20 @@ (define (%glibc-stripped)
            (make-stripped-libc (assoc-ref %outputs "out")
                                (assoc-ref %build-inputs "libc")
                                (assoc-ref %build-inputs "kernel-headers")))))
-      (inputs `(("kernel-headers"
-                 ,(if (or (and (%current-target-system)
-                               (target-hurd? (%current-target-system)))
-                          (string-suffix? "-hurd" (%current-system)))
-                      gnumach-headers
-                      linux-libre-headers))
-                ("libc" ,(let ((target (%current-target-system)))
-                           (if target
-                               (glibc-for-bootstrap
-                                (parameterize ((%current-target-system #f))
-                                  (cross-libc target)))
-                               glibc)))))
-      (native-inputs '())
+      (native-inputs
+       `(("libc" ,(let ((target (%current-target-system)))
+                    (if target
+                        (glibc-for-bootstrap
+                         (parameterize ((%current-target-system #f))
+                           (cross-libc target)))
+                        glibc)))))
+      (inputs
+       `(("kernel-headers"
+          ,(if (or (and (%current-target-system)
+                        (target-hurd? (%current-target-system)))
+                   (string-suffix? "-hurd" (%current-system)))
+               gnumach-headers
+               linux-libre-headers))))
       (propagated-inputs '())
 
       ;; Only one output.
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’ Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 3/6] gnu: make-bootstrap: Include libdl.a and libutil.a in ‘glibc-stripped’ Ludovic Courtès
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643; +Cc: Ludovic Courtès

Previously the second ‘copy-recursively’ call would fail with EEXIST
since glibc@2.39 already provides $includedir/include/mach.

* guix/build/make-bootstrap.scm (make-stripped-libc)[copy-mach-headers]:
Pass #:select? to ‘copy-recursively’ to exclude files already present
under INCDIR.

Change-Id: I7e5a93e46eefa18299c231468c720072468fdb10
---
 guix/build/make-bootstrap.scm | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/guix/build/make-bootstrap.scm b/guix/build/make-bootstrap.scm
index 0d29338ce3..6cb5262f8e 100644
--- a/guix/build/make-bootstrap.scm
+++ b/guix/build/make-bootstrap.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2015, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2019, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -84,13 +84,27 @@ (define (make-stripped-libc output libc kernel-headers)
 when producing a bootstrap libc."
 
   (define (copy-mach-headers output kernel-headers)
-    (let* ((incdir (string-append output "/include")))
+    (let ((mach-headers (readlink
+                         (string-append kernel-headers "/include/mach")))
+          (incdir (string-append output "/include")))
       (copy-recursively (string-append libc "/include") incdir)
 
-      (copy-recursively (string-append kernel-headers "/include/mach")
-                        (string-append incdir "/mach"))
-      #t))
-  
+      ;; As of glibc 2.39, essential Mach headers get installed by glibc
+      ;; itself in its own includedir, except for most of mach/machine/*.h.
+      ;; Copy anything that's missing from MACH-HEADERS.
+      (copy-recursively mach-headers
+                        (string-append incdir "/mach")
+                        #:select?
+                        (let ((prefix (string-length mach-headers))
+                              (target (string-append incdir "/mach")))
+                          (lambda (file stat)
+                            ;; Select everything but files and symlinks that
+                            ;; already exist under TARGET.
+                            (or (eq? 'directory (stat:type stat))
+                                (let ((suffix (string-drop file prefix)))
+                                  (not (file-exists?
+                                        (in-vicinity target suffix))))))))))
+
   (define (copy-libc+linux-headers output kernel-headers)
     (let* ((incdir (string-append output "/include")))
       (copy-recursively (string-append libc "/include") incdir)
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 3/6] gnu: make-bootstrap: Include libdl.a and libutil.a in ‘glibc-stripped’.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’ Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant Ludovic Courtès
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643; +Cc: Ludovic Courtès

As of glibc 2.39, libdl.so and libutil.so are gone (they are part of
libc proper since 2.34), but empty .a files are provided for backward
compatibility with code using -ldl and -lutil.  Keep them.

* guix/build/make-bootstrap.scm (make-stripped-libc)[%libc-object-files-rx]:
Mach libdl.a and libutil.a.

Change-Id: I967c6f34a443366224293362b8a2302fe86fd5a0
---
 guix/build/make-bootstrap.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/make-bootstrap.scm b/guix/build/make-bootstrap.scm
index 6cb5262f8e..287e4db2c7 100644
--- a/guix/build/make-bootstrap.scm
+++ b/guix/build/make-bootstrap.scm
@@ -110,9 +110,11 @@ (define (make-stripped-libc output libc kernel-headers)
       (copy-recursively (string-append libc "/include") incdir)
       (copy-linux-headers output kernel-headers)))
 
+  ;; Include *.so, *.so.*, but also empty ar archives provided for backward
+  ;; compatibility as of libc 2.39: libdl.a and libutil.a.
   (define %libc-object-files-rx "^(crt.*|ld.*|lib(c|m|dl|rt|pthread|nsl|\
 util).*\\.so(\\..*)?|lib(machuser|hurduser).so.*|(libc(rt|)|libpthread)\
-_nonshared\\.a)$")
+_nonshared\\.a|lib(dl|util)\\.a)$")
 
   (setvbuf (current-output-port) 'line)
   (let* ((libdir (string-append output "/lib")))
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
                   ` (2 preceding siblings ...)
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 3/6] gnu: make-bootstrap: Include libdl.a and libutil.a in ‘glibc-stripped’ Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 5/6] gnu: perl-boot0: Use gexps Ludovic Courtès
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643; +Cc: Ludovic Courtès, Ludovic Courtès

DRAFT: Change it when glibc-bootstrap tarball is uploaded somewhere.

‘glibc-stripped-2.39-i586-pc-gnu.tar.xz’ was built from x86_64-linux
from the previous commit with:

  ./pre-inst-env guix build --target=i586-pc-gnu \
     -e '((@@ (gnu packages make-bootstrap) %glibc-bootstrap-tarball))'

Fixes <https://issues.guix.gnu.org/72315>.

* gnu/packages/bootstrap.scm (%bootstrap-glibc): Update i586-gnu
variant.

Change-Id: I2d770e8001896059e1f27e50f7a4ddf15e4b5812
---
 gnu/packages/bootstrap.scm | 105 +++++++++++++++++++------------------
 1 file changed, 54 insertions(+), 51 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index a36bb289cd..e79fa36cb0 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2020, 2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -37,7 +37,7 @@ (define-module (gnu packages bootstrap)
                 #:select (raw-derivation derivation-input derivation->output-path))
   #:use-module (guix utils)
   #:use-module ((guix build utils) #:select (elf-file?))
-  #:use-module ((guix gexp) #:select (lower-object))
+  #:use-module ((guix gexp) #:select (lower-object local-file))
   #:use-module (guix monads)
   #:use-module (guix memoization)
   #:use-module (guix i18n)
@@ -758,55 +758,58 @@ (define %bootstrap-glibc
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-       ("tarball" ,(bootstrap-origin
-                    (origin
-                     (method url-fetch)
-                     (uri (map (cut string-append <> "/" (%current-system)
-                                    (match (%current-system)
-                                      ("armhf-linux"
-                                       "/20150101/glibc-2.20.tar.xz")
-                                      ("aarch64-linux"
-                                       "/20170217/glibc-2.25.tar.xz")
-                                      ("powerpc64le-linux"
-                                       "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
-                                      ("i586-gnu"
-                                       "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
-                                      ("powerpc-linux"
-                                       "/20200923/glibc-2.32.tar.xz")
-                                      ("riscv64-linux"
-                                       "/20210725/glibc-2.31.tar.xz")
-                                      (_
-                                       "/20131110/glibc-2.18.tar.xz")))
-                               %bootstrap-base-urls))
-                     (sha256
-                      (match (%current-system)
-                        ("x86_64-linux"
-                         (base32
-                          "0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
-                        ("i686-linux"
-                         (base32
-                          "1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
-                        ("armhf-linux"
-                         (base32
-                          "18cmgvpllqfpn6khsmivqib7ys8ymnq0hdzi3qp24prik0ykz8gn"))
-                        ("aarch64-linux"
-                         (base32
-                          "07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
-                        ("powerpc64le-linux"
-                         (base32
-                          "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
-                        ("riscv64-linux"
-                         (base32
-                          "0d9x80vm7ca1pd2whcmpm1h14zxpb58kqajlxlwffzm04xfsjnxm"))
-                        ("i586-gnu"
-                         (base32
-                          "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
-                        ("powerpc-linux"
-                         (base32
-                          "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
-                        ("mips64el-linux"
-                         (base32
-                          "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
+       ("tarball" ,(if (string=? (%current-system) "i586-gnu")
+                       (local-file
+                        (search-auxiliary-file "glibc-stripped-2.39-i586-pc-gnu.tar.xz"))
+                       (bootstrap-origin
+                        (origin
+                          (method url-fetch)
+                          (uri (map (cut string-append <> "/" (%current-system)
+                                         (match (%current-system)
+                                           ("armhf-linux"
+                                            "/20150101/glibc-2.20.tar.xz")
+                                           ("aarch64-linux"
+                                            "/20170217/glibc-2.25.tar.xz")
+                                           ("powerpc64le-linux"
+                                            "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
+                                           ("i586-gnu"
+                                            "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+                                           ("powerpc-linux"
+                                            "/20200923/glibc-2.32.tar.xz")
+                                           ("riscv64-linux"
+                                            "/20210725/glibc-2.31.tar.xz")
+                                           (_
+                                            "/20131110/glibc-2.18.tar.xz")))
+                                    %bootstrap-base-urls))
+                          (sha256
+                           (match (%current-system)
+                             ("x86_64-linux"
+                              (base32
+                               "0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
+                             ("i686-linux"
+                              (base32
+                               "1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
+                             ("armhf-linux"
+                              (base32
+                               "18cmgvpllqfpn6khsmivqib7ys8ymnq0hdzi3qp24prik0ykz8gn"))
+                             ("aarch64-linux"
+                              (base32
+                               "07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
+                             ("powerpc64le-linux"
+                              (base32
+                               "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
+                             ("riscv64-linux"
+                              (base32
+                               "0d9x80vm7ca1pd2whcmpm1h14zxpb58kqajlxlwffzm04xfsjnxm"))
+                             ("i586-gnu"
+                              (base32
+                               "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+                             ("powerpc-linux"
+                              (base32
+                               "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
+                             ("mips64el-linux"
+                              (base32
+                               "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg"))))))))))
     (synopsis "Bootstrap binaries and headers of the GNU C Library")
     (description synopsis)
     (home-page #f)
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 5/6] gnu: perl-boot0: Use gexps.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
                   ` (3 preceding siblings ...)
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 6/6] gnu: commencement: Build ‘perl-boot0’ without stack protector on the Hurd Ludovic Courtès
  2024-08-16 14:07 ` [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Janneke Nieuwenhuizen
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643
  Cc: Ludovic Courtès, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (perl-boot0)[arguments]: Use gexps.

Change-Id: I5c6358ce09a42bfb702d91325efa3ca81fe5494a
---
 gnu/packages/commencement.scm | 40 +++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index b31f976900..62bb2d6c96 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2464,27 +2464,27 @@ (define perl-boot0
     (source (bootstrap-origin (package-source perl)))
     (inputs (%boot0-inputs))
     (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:validate-runpath? #f
+     (append (list #:implicit-inputs? #f
+                   #:guile %bootstrap-guile
+                   #:validate-runpath? #f
 
-       ;; At the very least, this must not depend on GCC & co.
-       #:disallowed-references ,(list %bootstrap-binutils)
-
-       ,@(substitute-keyword-arguments (package-arguments perl)
-           ((#:phases phases)
-            `(modify-phases ,phases
-               ;; Pthread support is missing in the bootstrap compiler
-               ;; (broken spec file), so disable it.
-               (add-before 'configure 'disable-pthreads
-                 (lambda _
-                   (substitute* "Configure"
-                     (("^libswanted=(.*)pthread" _ before)
-                      (string-append "libswanted=" before)))))))
-           ;; Do not configure with '-Dusethreads' since pthread
-           ;; support is missing.
-           ((#:configure-flags configure-flags)
-            `(delete "-Dusethreads" ,configure-flags)))))))
+                   ;; At the very least, this must not depend on GCC & co.
+                   #:disallowed-references (list %bootstrap-binutils))
+             (substitute-keyword-arguments (package-arguments perl)
+               ((#:phases phases)
+                #~(modify-phases #$phases
+                    ;; Pthread support is missing in the bootstrap compiler
+                    ;; (broken spec file), so disable it.
+                    (add-before 'configure 'disable-pthreads
+                      (lambda _
+                        (substitute* "Configure"
+                          (("^libswanted=(.*)pthread" _ before)
+                           (string-append "libswanted=" before)))))))
+               ;; Do not configure with '-Dusethreads' since pthread
+               ;; support is missing.
+               ((#:configure-flags configure-flags)
+                #~(delete "-Dusethreads"
+                          #$configure-flags)))))))
 
 (define m4-boot0
   (package
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 6/6] gnu: commencement: Build ‘perl-boot0’ without stack protector on the Hurd.
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
                   ` (4 preceding siblings ...)
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 5/6] gnu: perl-boot0: Use gexps Ludovic Courtès
@ 2024-08-15 16:58 ` Ludovic Courtès
  2024-08-16 14:07 ` [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Janneke Nieuwenhuizen
  6 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-15 16:58 UTC (permalink / raw)
  To: 72643
  Cc: Ludovic Courtès, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (perl-boot0)[arguments]: Pass “-A
ccflags=-fno-stack-protector” on GNU/Hurd.

Change-Id: I04d4e276cdcc1bbf589273791a3f64e5a17c4152
---
 gnu/packages/commencement.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 62bb2d6c96..0aec12c72b 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2484,7 +2484,14 @@ (define perl-boot0
                ;; support is missing.
                ((#:configure-flags configure-flags)
                 #~(delete "-Dusethreads"
-                          #$configure-flags)))))))
+
+                          ;; On i586-gnu, linking fails with "undefined
+                          ;; reference to `__stack_chk_guard'" so avoid
+                          ;; '-fstack-protector'.
+                          #$(if (target-hurd?)
+                                #~(cons* "-A" "ccflags=-fno-stack-protector"
+                                         #$configure-flags)
+                                configure-flags))))))))
 
 (define m4-boot0
   (package
-- 
2.45.2





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

* [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
  2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
                   ` (5 preceding siblings ...)
  2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 6/6] gnu: commencement: Build ‘perl-boot0’ without stack protector on the Hurd Ludovic Courtès
@ 2024-08-16 14:07 ` Janneke Nieuwenhuizen
  2024-08-16 17:56   ` bug#72643: " Ludovic Courtès
  6 siblings, 1 reply; 11+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-08-16 14:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 72643, Efraim Flashner, Ekaitz Zarraga

Ludovic Courtès writes:

Hi!

> This patch series fixes Hurd support (i586-gnu) on ‘core-updates’,
> as described <https://issues.guix.gnu.org/72315>.  It does so by
> updating the ‘glibc-bootstrap’ tarball.

[..]

> I’d like to push this to ‘core-updates’ soon since it’s probably the
> last blocker before we can merge.
>
> Thoughts?

As mentioned on IRC, I've reconfigured my system to core-updates+this
patch series and it works for me.  I'm using a close variant of the
`devel-hurd.tmpl' from the hurd-team branch

    https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/examples/devel-hurd.tmpl?h=hurd-team

and removed the new imagemagick dependency

--8<---------------cut here---------------start------------->8---
--- a/gnu/system/examples/devel-hurd.tmpl
+++ b/gnu/system/examples/devel-hurd.tmpl
@@ -59,7 +59,7 @@
 (define guix-packages
   (filter-map input->package
               (fold alist-delete (package-direct-inputs guix)
-                    '("glibc-utf8-locales" "graphviz" "po4a"))))
+                    '("glibc-utf8-locales" "graphviz" "imagemagick" "po4a"))))
--8<---------------cut here---------------end--------------->8---
 
Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




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

* bug#72643: [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
  2024-08-16 14:07 ` [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Janneke Nieuwenhuizen
@ 2024-08-16 17:56   ` Ludovic Courtès
  2024-08-18  9:02     ` [bug#72643] " Janneke Nieuwenhuizen
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-16 17:56 UTC (permalink / raw)
  To: Janneke Nieuwenhuizen
  Cc: Ekaitz Zarraga, Josselin Poiret, 72315-done, Efraim Flashner,
	72643-done

Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> As mentioned on IRC, I've reconfigured my system to core-updates+this
> patch series and it works for me.

Pushed as 817838c38bbeb4ef7dcb64af5fce168aeb51306e, thanks for testing!

> I'm using a close variant of the `devel-hurd.tmpl' from the hurd-team
> branch
>
>     https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/examples/devel-hurd.tmpl?h=hurd-team
>
> and removed the new imagemagick dependency
>
> --- a/gnu/system/examples/devel-hurd.tmpl
> +++ b/gnu/system/examples/devel-hurd.tmpl
> @@ -59,7 +59,7 @@
>  (define guix-packages
>    (filter-map input->package
>                (fold alist-delete (package-direct-inputs guix)
> -                    '("glibc-utf8-locales" "graphviz" "po4a"))))
> +                    '("glibc-utf8-locales" "graphviz" "imagemagick" "po4a"))))

I’ve submitted a patch to remove it:

  https://issues.guix.gnu.org/72674

Regarding ‘hurd-team’, I admit I had forgotten about it.  What are the
important things we should bring over to ‘master’ or ‘core-updates’?

Thanks,
Ludo’.




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

* [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
  2024-08-16 17:56   ` bug#72643: " Ludovic Courtès
@ 2024-08-18  9:02     ` Janneke Nieuwenhuizen
  2024-08-20 12:37       ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-08-18  9:02 UTC (permalink / raw)
  To: Ludovic Courtès
  Cc: Ekaitz Zarraga, Josselin Poiret, 72315-done, Efraim Flashner,
	72643-done

Ludovic Courtès writes:

Hello,

> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> As mentioned on IRC, I've reconfigured my system to core-updates+this
>> patch series and it works for me.
>
> Pushed as 817838c38bbeb4ef7dcb64af5fce168aeb51306e, thanks for testing!

Yay!

>> --- a/gnu/system/examples/devel-hurd.tmpl
>> +++ b/gnu/system/examples/devel-hurd.tmpl
>> @@ -59,7 +59,7 @@
>>  (define guix-packages
>>    (filter-map input->package
>>                (fold alist-delete (package-direct-inputs guix)
>> -                    '("glibc-utf8-locales" "graphviz" "po4a"))))
>> +                    '("glibc-utf8-locales" "graphviz" "imagemagick" "po4a"))))
>
> I’ve submitted a patch to remove it:
>
>   https://issues.guix.gnu.org/72674

Thanks, that's great.

> Regarding ‘hurd-team’, I admit I had forgotten about it.  What are the
> important things we should bring over to ‘master’ or ‘core-updates’?

I don't think so; most of it is not really finished.  Possibly

--8<---------------cut here---------------start------------->8---
d7562eae93 hurd: Support system init in /libexec/runsystem.
b9b5f1ee5f hurd-boot: Support system init: Create essential device nodes.
ddba840edd system: hurd: Add swap-services to hurd-default-essential-services.
--8<---------------cut here---------------end--------------->8---

that help booting the Hurd after installing it on real hardware from a
GNU/Linux Guix installation with `guix init ... /hurd'.  After `guix
init', you'll have to reconfigure the GNU/Linux system, adding
menu-entries from /hurd/boot/grub.cfg (at least, that's what I did using
some ugly regex parsing in config.scm).

But these are not so interesting, because they will support booting Hurd
only once.  Supporting a second boot is more tricky and only has these
even less finished patches

--8<---------------cut here---------------start------------->8---
fa003825ef DRAFT hurd-boot: Support second boot.
6b34e08e4d DRAFT hurd: Support second boot.
--8<---------------cut here---------------end--------------->8---

These only work if the filesystem is clean -- which most of the time is
not the case when you restart -- why would you restart if not for a
kernel crash.  That means you'll have to boot into GNU/Linux and fsck
/hurd.

I'm using

--8<---------------cut here---------------start------------->8---
59ae639ac6 DRAFT system: examples: Add devel-hurd.tmpl.
--8<---------------cut here---------------end--------------->8---

as a convenience to build a childhurd to develop in (as opposed to just
offloading to).

ISTM that I've been the only user of these and they're not all that
great.  So yeah.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




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

* [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
  2024-08-18  9:02     ` [bug#72643] " Janneke Nieuwenhuizen
@ 2024-08-20 12:37       ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-08-20 12:37 UTC (permalink / raw)
  To: Janneke Nieuwenhuizen
  Cc: Ekaitz Zarraga, Josselin Poiret, 72315-done, Efraim Flashner,
	72643-done

Hello,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> ISTM that I've been the only user of these and they're not all that
> great.  So yeah.

OK, thanks for explaining.  Let’s keep that in mind for our future Hurd
endeavors!

Ludo’.




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

end of thread, other threads:[~2024-08-20 12:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 16:54 [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’ Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 3/6] gnu: make-bootstrap: Include libdl.a and libutil.a in ‘glibc-stripped’ Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 5/6] gnu: perl-boot0: Use gexps Ludovic Courtès
2024-08-15 16:58 ` [bug#72643] [PATCH core-updates 6/6] gnu: commencement: Build ‘perl-boot0’ without stack protector on the Hurd Ludovic Courtès
2024-08-16 14:07 ` [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support Janneke Nieuwenhuizen
2024-08-16 17:56   ` bug#72643: " Ludovic Courtès
2024-08-18  9:02     ` [bug#72643] " Janneke Nieuwenhuizen
2024-08-20 12:37       ` Ludovic Courtès

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