unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#74689] [PATCH 0/3] fix non-x86 world rebuild
@ 2024-12-04 16:11 Zheng Junjie
  2024-12-04 16:13 ` [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd." Zheng Junjie
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:11 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

The 64bit Hurd merge triggered a recompilation of the non-x86 world, and the following patches should fix it. no test on hurd.



Zheng Junjie (3):
  Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for
    the 64bit Hurd."
  Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
  Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the
    64bit Hurd."

 gnu/packages/bootstrap.scm      | 57 +++++++++++++++++++++------------
 gnu/packages/make-bootstrap.scm |  3 +-
 2 files changed, 39 insertions(+), 21 deletions(-)


base-commit: e00ca95e08bc1cc2cb39f3178485ef16defce0be
-- 
2.46.0





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

* [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
@ 2024-12-04 16:13 ` Zheng Junjie
  2024-12-04 16:31   ` Janneke Nieuwenhuizen
  2024-12-04 16:13 ` [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:13 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
---
 gnu/packages/make-bootstrap.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index e0dcca7b33e..d9c2f9bb827 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -538,7 +538,8 @@ (define %gcc-static
                 (substitute* (cons "gcc/config/rs6000/sysv4.h"
                                    (find-files "gcc/config"
                                                "^gnu-user.*\\.h$"))
-                  ((" -lgcc_s}}") "}}"))))))))
+                  ((" -lgcc_s}}") "}}")
+                  #t)))))))
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
-- 
2.46.0





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

* [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
  2024-12-04 16:13 ` [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 16:13 ` Zheng Junjie
  2024-12-04 16:33   ` Janneke Nieuwenhuizen
  2024-12-04 16:13 ` [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:13 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This reverts partial commit 204fe1b1f05f4438d1cf72c568b45696e55e54c9.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: I921984ef5eff58792ffc17b64675db6a8e79695c
---
 gnu/packages/bootstrap.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 226cf0804bd..ccab43fb2c1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -775,11 +775,15 @@ (define %bootstrap-glibc
               (chmod "lib" #o755)
 
               ;; Patch linker scripts so they refer to the right file-names.
-              (substitute* ,(if (target-hurd64?)
-                                ''("lib/libc.so" "lib/libm.so")
-                                "lib/libc.so")
-                (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
-                 (string-append out "/lib/" prefix)))))))))
+              ,(if (target-hurd64?)
+
+                   '(substitute* '("lib/libc.so" "lib/libm.so")
+                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
+                       (string-append out "/lib/" prefix)))
+                   '(substitute* "lib/libc.so"
+                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
+                       (string-append out "/lib/" prefix))))
+              #t))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-- 
2.46.0





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

* [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
  2024-12-04 16:13 ` [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd." Zheng Junjie
  2024-12-04 16:13 ` [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
@ 2024-12-04 16:13 ` Zheng Junjie
  2024-12-04 16:46   ` Janneke Nieuwenhuizen
  2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:13 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This reverts partial commit 877b925df16740f9419d165d39cb7f191a86d5d1.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
---
 gnu/packages/bootstrap.scm | 43 +++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index ccab43fb2c1..9046aaf6721 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -875,20 +875,22 @@ (define %bootstrap-gcc
            (let ((builddir (getcwd))
                  (bindir   (string-append out "/bin")))
 
-             (define (wrap-program program)
-               (let ((wrapped (format #f ".~a-wrapped" program)))
-                 (rename-file program wrapped)
-                 (call-with-output-file program
-                   (lambda (p)
-                     (format p "#!~a
+             ,@(if (target-hurd64?)
+                   '((define (wrap-program program)
+                       (let ((wrapped (format #f ".~a-wrapped" program)))
+                         (rename-file program wrapped)
+                         (call-with-output-file program
+                           (lambda (p)
+                             (format p "#!~a
 exec ~a/bin/~a -B~a/lib \
      -Wl,-rpath -Wl,~a/lib \
      -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
-                             bash
-                             out wrapped
-                             libc libc libc
-                             ,(glibc-dynamic-linker)))))
-               (chmod program #o555))
+                                     bash
+                                     out wrapped
+                                     libc libc libc
+                                     ,(glibc-dynamic-linker)))))
+                       (chmod program #o555)))
+                   '())
 
              (with-directory-excursion out
                (invoke tar "xvf"
@@ -896,10 +898,21 @@ (define %bootstrap-gcc
 
              (with-directory-excursion bindir
                (chmod "." #o755)
-               (for-each wrap-program
-                         ,(if (target-hurd64?)
-                              ''("gcc" "g++")
-                              ''("gcc")))))))))
+               ,@(if (target-hurd64?)
+                     `((for-each wrap-program '("gcc" "g++")))
+                     `((rename-file "gcc" ".gcc-wrapped")
+                       (call-with-output-file "gcc"
+                         (lambda (p)
+                           (format p "#!~a
+exec ~a/bin/.gcc-wrapped -B~a/lib \
+     -Wl,-rpath -Wl,~a/lib \
+     -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
+                                   bash
+                                   out libc libc libc
+                                   ,(glibc-dynamic-linker))))
+
+                       (chmod "gcc" #o555)
+                       #t))))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-- 
2.46.0





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

* [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:13 ` [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 16:31   ` Janneke Nieuwenhuizen
  2024-12-04 16:40     ` Janneke Nieuwenhuizen
  2024-12-04 17:08     ` Zheng Junjie
  0 siblings, 2 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 16:31 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

Hello Zheng,

> This reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
> ---
>  gnu/packages/make-bootstrap.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
> index e0dcca7b33e..d9c2f9bb827 100644
> --- a/gnu/packages/make-bootstrap.scm
> +++ b/gnu/packages/make-bootstrap.scm
> @@ -538,7 +538,8 @@ (define %gcc-static
>                  (substitute* (cons "gcc/config/rs6000/sysv4.h"
>                                     (find-files "gcc/config"
>                                                 "^gnu-user.*\\.h$"))
> -                  ((" -lgcc_s}}") "}}"))))))))
> +                  ((" -lgcc_s}}") "}}")
> +                  #t)))))))

Running

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix build --target=x86_64-pc-gnu bootstrap-tarballs --verbosity=2
--8<---------------cut here---------------end--------------->8---

gives:

--8<---------------cut here---------------start------------->8---
/gnu/store/9qy13rlkrl9q7wpkvbvz9bi89z4d9csq-gcc-static-14.2.0-builder:1:8712: source expression failed to match any pattern in form (substitute* (cons "gcc/config/rs6000/sysv4.h" (find-files "gcc/config" "^gnu-user.*\\.h$")) ((" -lgcc_s}}") "}}") #t)
--8<---------------cut here---------------end--------------->8---

The fix is trivial, the #t needs to go one level up....but it makes me
wonder: have you tested this patch, I'm wondering as to how this worked
to avoid a world rebuild to you?

Thanks for looking into this, I couldn't have imagined touching
make-bootstrap.scm would trigger world rebuilds.

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] 21+ messages in thread

* [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
  2024-12-04 16:13 ` [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
@ 2024-12-04 16:33   ` Janneke Nieuwenhuizen
  0 siblings, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 16:33 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès, Efraim Flashner

Zheng Junjie writes:

> This reverts partial commit 204fe1b1f05f4438d1cf72c568b45696e55e54c9.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.

@Efraim: Does this also trigger a world rebuild for you, I believe you
looked at (some of these) patches for risc-v64?

> Change-Id: I921984ef5eff58792ffc17b64675db6a8e79695c
> ---
>  gnu/packages/bootstrap.scm | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 226cf0804bd..ccab43fb2c1 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -775,11 +775,15 @@ (define %bootstrap-glibc
>                (chmod "lib" #o755)
>  
>                ;; Patch linker scripts so they refer to the right file-names.
> -              (substitute* ,(if (target-hurd64?)
> -                                ''("lib/libc.so" "lib/libm.so")
> -                                "lib/libc.so")
> -                (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> -                 (string-append out "/lib/" prefix)))))))))
> +              ,(if (target-hurd64?)
> +

I think we don't need this newline?  Otherwise, LGTM.

> +                   '(substitute* '("lib/libc.so" "lib/libm.so")
> +                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> +                       (string-append out "/lib/" prefix)))
> +                   '(substitute* "lib/libc.so"
> +                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
> +                       (string-append out "/lib/" prefix))))
> +              #t))))))
>      (inputs
>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))

-- 
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] 21+ messages in thread

* [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:31   ` Janneke Nieuwenhuizen
@ 2024-12-04 16:40     ` Janneke Nieuwenhuizen
  2024-12-04 17:08     ` Zheng Junjie
  1 sibling, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 16:40 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Janneke Nieuwenhuizen writes:

Hi

> Zheng Junjie writes:
>
> Hello Zheng,
>
>> This reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.
>>
>> This part accidentally triggered a world rebuild for non-x86 architectures.
>>
>> Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
>> ---
>>  gnu/packages/make-bootstrap.scm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
>> index e0dcca7b33e..d9c2f9bb827 100644
>> --- a/gnu/packages/make-bootstrap.scm
>> +++ b/gnu/packages/make-bootstrap.scm
>> @@ -538,7 +538,8 @@ (define %gcc-static
>>                  (substitute* (cons "gcc/config/rs6000/sysv4.h"
>>                                     (find-files "gcc/config"
>>                                                 "^gnu-user.*\\.h$"))
>> -                  ((" -lgcc_s}}") "}}"))))))))
>> +                  ((" -lgcc_s}}") "}}")
>> +                  #t)))))))
>
> Running
>
> ./pre-inst-env guix build --target=x86_64-pc-gnu bootstrap-tarballs --verbosity=2
>
>
> gives:
>
> /gnu/store/9qy13rlkrl9q7wpkvbvz9bi89z4d9csq-gcc-static-14.2.0-builder:1:8712: source expression failed to match any pattern in form (substitute* (cons "gcc/config/rs6000/sysv4.h" (find-files "gcc/config" "^gnu-user.*\\.h$")) ((" -lgcc_s}}") "}}") #t)
>
> The fix is trivial, the #t needs to go one level up....but it makes me
> wonder: have you tested this patch, I'm wondering as to how this worked
> to avoid a world rebuild to you?

Doing it like this

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 879c123e81..59c117f226 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -539,7 +539,7 @@ (define %gcc-static
                                    (find-files "gcc/config"
                                                "^gnu-user.*\\.h$"))
                   ((" -lgcc_s}}") "}}"))
-                #t))))))
+                #$@(if (target-hurd64?) '() '(#t))))))))
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
--8<---------------cut here---------------end--------------->8---

would be much preferable, as it doesn't force a rebuild of gcc-static
for the 64bit Hurd.

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




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

* [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
  2024-12-04 16:13 ` [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 16:46   ` Janneke Nieuwenhuizen
  2024-12-04 17:02     ` Zheng Junjie
  0 siblings, 1 reply; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 16:46 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

> This reverts partial commit 877b925df16740f9419d165d39cb7f191a86d5d1.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
> ---
>  gnu/packages/bootstrap.scm | 43 +++++++++++++++++++++++++-------------
>  1 file changed, 28 insertions(+), 15 deletions(-)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index ccab43fb2c1..9046aaf6721 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -875,20 +875,22 @@ (define %bootstrap-gcc
>             (let ((builddir (getcwd))
>                   (bindir   (string-append out "/bin")))
>  
> -             (define (wrap-program program)
> -               (let ((wrapped (format #f ".~a-wrapped" program)))
> -                 (rename-file program wrapped)
> -                 (call-with-output-file program
> -                   (lambda (p)
> -                     (format p "#!~a
> +             ,@(if (target-hurd64?)
> +                   '((define (wrap-program program)
> +                       (let ((wrapped (format #f ".~a-wrapped" program)))
> +                         (rename-file program wrapped)
> +                         (call-with-output-file program
> +                           (lambda (p)
> +                             (format p "#!~a
>  exec ~a/bin/~a -B~a/lib \
>       -Wl,-rpath -Wl,~a/lib \
>       -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> -                             bash
> -                             out wrapped
> -                             libc libc libc
> -                             ,(glibc-dynamic-linker)))))
> -               (chmod program #o555))
> +                                     bash
> +                                     out wrapped
> +                                     libc libc libc
> +                                     ,(glibc-dynamic-linker)))))
> +                       (chmod program #o555)))
> +                   '())
>  
>               (with-directory-excursion out
>                 (invoke tar "xvf"
> @@ -896,10 +898,21 @@ (define %bootstrap-gcc
>  
>               (with-directory-excursion bindir
>                 (chmod "." #o755)
> -               (for-each wrap-program
> -                         ,(if (target-hurd64?)
> -                              ''("gcc" "g++")
> -                              ''("gcc")))))))))
> +               ,@(if (target-hurd64?)
> +                     `((for-each wrap-program '("gcc" "g++")))
> +                     `((rename-file "gcc" ".gcc-wrapped")
> +                       (call-with-output-file "gcc"
> +                         (lambda (p)
> +                           (format p "#!~a
> +exec ~a/bin/.gcc-wrapped -B~a/lib \
> +     -Wl,-rpath -Wl,~a/lib \
> +     -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> +                                   bash
> +                                   out libc libc libc
> +                                   ,(glibc-dynamic-linker))))
> +
> +                       (chmod "gcc" #o555)
> +                       #t))))))))
>      (inputs
>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))

LGTM!  I guess we want to revert these again on core-packages-team?

-- 
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] 21+ messages in thread

* [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
                   ` (2 preceding siblings ...)
  2024-12-04 16:13 ` [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 16:57 ` Zheng Junjie
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
                     ` (2 more replies)
  2024-12-10 23:37 ` bug#74689: [PATCH 0/3] fix non-x86 world rebuild Ludovic Courtès
  2024-12-28  0:44 ` [bug#74689] [PATCH] Add predicates for decoded times and time deltas Paul Eggert
  5 siblings, 3 replies; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:57 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This partially reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
---
 gnu/packages/make-bootstrap.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index e0dcca7b33e..7e124f487ed 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -538,7 +538,8 @@ (define %gcc-static
                 (substitute* (cons "gcc/config/rs6000/sysv4.h"
                                    (find-files "gcc/config"
                                                "^gnu-user.*\\.h$"))
-                  ((" -lgcc_s}}") "}}"))))))))
+                  ((" -lgcc_s}}") "}}")
+                  #$@(if (target-hurd64?) '() '(#t)))))))))
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")

base-commit: e00ca95e08bc1cc2cb39f3178485ef16defce0be
-- 
2.46.0





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

* [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
  2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
@ 2024-12-04 16:57   ` Zheng Junjie
  2024-12-04 17:06     ` Janneke Nieuwenhuizen
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
  2024-12-04 17:05   ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Janneke Nieuwenhuizen
  2 siblings, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:57 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This partially reverts commit 204fe1b1f05f4438d1cf72c568b45696e55e54c9.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: I921984ef5eff58792ffc17b64675db6a8e79695c
---
 gnu/packages/bootstrap.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 226cf0804bd..dcf385b03e9 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -775,11 +775,14 @@ (define %bootstrap-glibc
               (chmod "lib" #o755)
 
               ;; Patch linker scripts so they refer to the right file-names.
-              (substitute* ,(if (target-hurd64?)
-                                ''("lib/libc.so" "lib/libm.so")
-                                "lib/libc.so")
-                (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
-                 (string-append out "/lib/" prefix)))))))))
+              ,(if (target-hurd64?)
+                   '(substitute* '("lib/libc.so" "lib/libm.so")
+                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
+                       (string-append out "/lib/" prefix)))
+                   '(substitute* "lib/libc.so"
+                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
+                       (string-append out "/lib/" prefix))))
+              #t))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-- 
2.46.0





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

* [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
  2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
@ 2024-12-04 16:57   ` Zheng Junjie
  2024-12-04 17:07     ` Janneke Nieuwenhuizen
  2024-12-04 17:05   ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Janneke Nieuwenhuizen
  2 siblings, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 16:57 UTC (permalink / raw)
  To: 74689; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès

This partially reverts commit 877b925df16740f9419d165d39cb7f191a86d5d1.

This part accidentally triggered a world rebuild for non-x86 architectures.

Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
---
 gnu/packages/bootstrap.scm | 59 +++++++++++++++++++++++---------------
 1 file changed, 36 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index dcf385b03e9..f2620f844c3 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -775,14 +775,14 @@ (define %bootstrap-glibc
               (chmod "lib" #o755)
 
               ;; Patch linker scripts so they refer to the right file-names.
-              ,(if (target-hurd64?)
-                   '(substitute* '("lib/libc.so" "lib/libm.so")
-                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
-                       (string-append out "/lib/" prefix)))
-                   '(substitute* "lib/libc.so"
-                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
-                       (string-append out "/lib/" prefix))))
-              #t))))))
+              ,@(if (target-hurd64?)
+                    '((substitute* '("lib/libc.so" "lib/libm.so")
+                        (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
+                         (string-append out "/lib/" prefix))))
+                    '((substitute* "lib/libc.so"
+                        (("/[^ ]+/lib/(libc|ld)" _ prefix)
+                         (string-append out "/lib/" prefix)))
+                      #t))))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
@@ -874,20 +874,22 @@ (define %bootstrap-gcc
            (let ((builddir (getcwd))
                  (bindir   (string-append out "/bin")))
 
-             (define (wrap-program program)
-               (let ((wrapped (format #f ".~a-wrapped" program)))
-                 (rename-file program wrapped)
-                 (call-with-output-file program
-                   (lambda (p)
-                     (format p "#!~a
+             ,@(if (target-hurd64?)
+                   `((define (wrap-program program)
+                       (let ((wrapped (format #f ".~a-wrapped" program)))
+                         (rename-file program wrapped)
+                         (call-with-output-file program
+                           (lambda (p)
+                             (format p "#!~a
 exec ~a/bin/~a -B~a/lib \
      -Wl,-rpath -Wl,~a/lib \
      -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
-                             bash
-                             out wrapped
-                             libc libc libc
-                             ,(glibc-dynamic-linker)))))
-               (chmod program #o555))
+                                     bash
+                                     out wrapped
+                                     libc libc libc
+                                     ,(glibc-dynamic-linker)))))
+                       (chmod program #o555)))
+                   '())
 
              (with-directory-excursion out
                (invoke tar "xvf"
@@ -895,10 +897,21 @@ (define %bootstrap-gcc
 
              (with-directory-excursion bindir
                (chmod "." #o755)
-               (for-each wrap-program
-                         ,(if (target-hurd64?)
-                              ''("gcc" "g++")
-                              ''("gcc")))))))))
+               ,@(if (target-hurd64?)
+                     `((for-each wrap-program '("gcc" "g++")))
+                     `((rename-file "gcc" ".gcc-wrapped")
+                       (call-with-output-file "gcc"
+                         (lambda (p)
+                           (format p "#!~a
+exec ~a/bin/.gcc-wrapped -B~a/lib \
+     -Wl,-rpath -Wl,~a/lib \
+     -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
+                                   bash
+                                   out libc libc libc
+                                   ,(glibc-dynamic-linker))))
+
+                       (chmod "gcc" #o555)
+                       #t))))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-- 
2.46.0





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

* [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
  2024-12-04 16:46   ` Janneke Nieuwenhuizen
@ 2024-12-04 17:02     ` Zheng Junjie
  0 siblings, 0 replies; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 17:02 UTC (permalink / raw)
  To: Janneke Nieuwenhuizen; +Cc: Andreas Enge, 74689, Ludovic Courtès

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

Janneke Nieuwenhuizen <janneke@gnu.org> writes:

> Zheng Junjie writes:
>
>> This reverts partial commit 877b925df16740f9419d165d39cb7f191a86d5d1.
>>
>> This part accidentally triggered a world rebuild for non-x86 architectures.
>>
>> Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
>> ---
>>  gnu/packages/bootstrap.scm | 43 +++++++++++++++++++++++++-------------
>>  1 file changed, 28 insertions(+), 15 deletions(-)
>>
>> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
>> index ccab43fb2c1..9046aaf6721 100644
>> --- a/gnu/packages/bootstrap.scm
>> +++ b/gnu/packages/bootstrap.scm
>> @@ -875,20 +875,22 @@ (define %bootstrap-gcc
>>             (let ((builddir (getcwd))
>>                   (bindir   (string-append out "/bin")))
>>  
>> -             (define (wrap-program program)
>> -               (let ((wrapped (format #f ".~a-wrapped" program)))
>> -                 (rename-file program wrapped)
>> -                 (call-with-output-file program
>> -                   (lambda (p)
>> -                     (format p "#!~a
>> +             ,@(if (target-hurd64?)
>> +                   '((define (wrap-program program)
>> +                       (let ((wrapped (format #f ".~a-wrapped" program)))
>> +                         (rename-file program wrapped)
>> +                         (call-with-output-file program
>> +                           (lambda (p)
>> +                             (format p "#!~a
>>  exec ~a/bin/~a -B~a/lib \
>>       -Wl,-rpath -Wl,~a/lib \
>>       -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
>> -                             bash
>> -                             out wrapped
>> -                             libc libc libc
>> -                             ,(glibc-dynamic-linker)))))
>> -               (chmod program #o555))
>> +                                     bash
>> +                                     out wrapped
>> +                                     libc libc libc
>> +                                     ,(glibc-dynamic-linker)))))
>> +                       (chmod program #o555)))
>> +                   '())
>>  
>>               (with-directory-excursion out
>>                 (invoke tar "xvf"
>> @@ -896,10 +898,21 @@ (define %bootstrap-gcc
>>  
>>               (with-directory-excursion bindir
>>                 (chmod "." #o755)
>> -               (for-each wrap-program
>> -                         ,(if (target-hurd64?)
>> -                              ''("gcc" "g++")
>> -                              ''("gcc")))))))))
>> +               ,@(if (target-hurd64?)
>> +                     `((for-each wrap-program '("gcc" "g++")))
>> +                     `((rename-file "gcc" ".gcc-wrapped")
>> +                       (call-with-output-file "gcc"
>> +                         (lambda (p)
>> +                           (format p "#!~a
>> +exec ~a/bin/.gcc-wrapped -B~a/lib \
>> +     -Wl,-rpath -Wl,~a/lib \
>> +     -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
>> +                                   bash
>> +                                   out libc libc libc
>> +                                   ,(glibc-dynamic-linker))))
>> +
>> +                       (chmod "gcc" #o555)
>> +                       #t))))))))
>>      (inputs
>>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))
>
> LGTM!  I guess we want to revert these again on core-packages-team?

I think, yes

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

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

* [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 17:05   ` Janneke Nieuwenhuizen
  2 siblings, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 17:05 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

> This partially reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
> ---
>  gnu/packages/make-bootstrap.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
> index e0dcca7b33e..7e124f487ed 100644
> --- a/gnu/packages/make-bootstrap.scm
> +++ b/gnu/packages/make-bootstrap.scm
> @@ -538,7 +538,8 @@ (define %gcc-static
>                  (substitute* (cons "gcc/config/rs6000/sysv4.h"
>                                     (find-files "gcc/config"
>                                                 "^gnu-user.*\\.h$"))
> -                  ((" -lgcc_s}}") "}}"))))))))
> +                  ((" -lgcc_s}}") "}}")
> +                  #$@(if (target-hurd64?) '() '(#t)))))))))

I don't see how this would work for you, the #t ends up inside the
(substitute ...), you want it outside, no?  So, with this extra
change:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 7e124f487e..59c117f226 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -538,8 +538,8 @@ (define %gcc-static
                 (substitute* (cons "gcc/config/rs6000/sysv4.h"
                                    (find-files "gcc/config"
                                                "^gnu-user.*\\.h$"))
-                  ((" -lgcc_s}}") "}}")
-                  #$@(if (target-hurd64?) '() '(#t)))))))))
+                  ((" -lgcc_s}}") "}}"))
+                #$@(if (target-hurd64?) '() '(#t))))))))
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
--8<---------------cut here---------------end--------------->8---

Other than this, LGTM

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




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

* [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
@ 2024-12-04 17:06     ` Janneke Nieuwenhuizen
  0 siblings, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 17:06 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

> This partially reverts commit 204fe1b1f05f4438d1cf72c568b45696e55e54c9.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: I921984ef5eff58792ffc17b64675db6a8e79695c
> ---
>  gnu/packages/bootstrap.scm | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 226cf0804bd..dcf385b03e9 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -775,11 +775,14 @@ (define %bootstrap-glibc
>                (chmod "lib" #o755)
>  
>                ;; Patch linker scripts so they refer to the right file-names.
> -              (substitute* ,(if (target-hurd64?)
> -                                ''("lib/libc.so" "lib/libm.so")
> -                                "lib/libc.so")
> -                (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> -                 (string-append out "/lib/" prefix)))))))))
> +              ,(if (target-hurd64?)
> +                   '(substitute* '("lib/libc.so" "lib/libm.so")
> +                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> +                       (string-append out "/lib/" prefix)))
> +                   '(substitute* "lib/libc.so"
> +                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
> +                       (string-append out "/lib/" prefix))))
> +              #t))))))
>      (inputs
>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))

LGTM!

-- 
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] 21+ messages in thread

* [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
  2024-12-04 16:57   ` [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
@ 2024-12-04 17:07     ` Janneke Nieuwenhuizen
  0 siblings, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 17:07 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

> This partially reverts commit 877b925df16740f9419d165d39cb7f191a86d5d1.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
> ---
>  gnu/packages/bootstrap.scm | 59 +++++++++++++++++++++++---------------
>  1 file changed, 36 insertions(+), 23 deletions(-)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index dcf385b03e9..f2620f844c3 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm

LGTM!

> @@ -775,14 +775,14 @@ (define %bootstrap-glibc
>                (chmod "lib" #o755)
>  
>                ;; Patch linker scripts so they refer to the right file-names.
> -              ,(if (target-hurd64?)
> -                   '(substitute* '("lib/libc.so" "lib/libm.so")
> -                      (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> -                       (string-append out "/lib/" prefix)))
> -                   '(substitute* "lib/libc.so"
> -                      (("/[^ ]+/lib/(libc|ld)" _ prefix)
> -                       (string-append out "/lib/" prefix))))
> -              #t))))))
> +              ,@(if (target-hurd64?)
> +                    '((substitute* '("lib/libc.so" "lib/libm.so")
> +                        (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> +                         (string-append out "/lib/" prefix))))
> +                    '((substitute* "lib/libc.so"
> +                        (("/[^ ]+/lib/(libc|ld)" _ prefix)
> +                         (string-append out "/lib/" prefix)))
> +                      #t))))))))
>      (inputs
>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))
> @@ -874,20 +874,22 @@ (define %bootstrap-gcc
>             (let ((builddir (getcwd))
>                   (bindir   (string-append out "/bin")))
>  
> -             (define (wrap-program program)
> -               (let ((wrapped (format #f ".~a-wrapped" program)))
> -                 (rename-file program wrapped)
> -                 (call-with-output-file program
> -                   (lambda (p)
> -                     (format p "#!~a
> +             ,@(if (target-hurd64?)
> +                   `((define (wrap-program program)
> +                       (let ((wrapped (format #f ".~a-wrapped" program)))
> +                         (rename-file program wrapped)
> +                         (call-with-output-file program
> +                           (lambda (p)
> +                             (format p "#!~a
>  exec ~a/bin/~a -B~a/lib \
>       -Wl,-rpath -Wl,~a/lib \
>       -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> -                             bash
> -                             out wrapped
> -                             libc libc libc
> -                             ,(glibc-dynamic-linker)))))
> -               (chmod program #o555))
> +                                     bash
> +                                     out wrapped
> +                                     libc libc libc
> +                                     ,(glibc-dynamic-linker)))))
> +                       (chmod program #o555)))
> +                   '())
>  
>               (with-directory-excursion out
>                 (invoke tar "xvf"
> @@ -895,10 +897,21 @@ (define %bootstrap-gcc
>  
>               (with-directory-excursion bindir
>                 (chmod "." #o755)
> -               (for-each wrap-program
> -                         ,(if (target-hurd64?)
> -                              ''("gcc" "g++")
> -                              ''("gcc")))))))))
> +               ,@(if (target-hurd64?)
> +                     `((for-each wrap-program '("gcc" "g++")))
> +                     `((rename-file "gcc" ".gcc-wrapped")
> +                       (call-with-output-file "gcc"
> +                         (lambda (p)
> +                           (format p "#!~a
> +exec ~a/bin/.gcc-wrapped -B~a/lib \
> +     -Wl,-rpath -Wl,~a/lib \
> +     -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> +                                   bash
> +                                   out libc libc libc
> +                                   ,(glibc-dynamic-linker))))
> +
> +                       (chmod "gcc" #o555)
> +                       #t))))))))
>      (inputs
>       `(("tar" ,(bootstrap-executable "tar" (%current-system)))
>         ("xz"  ,(bootstrap-executable "xz" (%current-system)))

-- 
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] 21+ messages in thread

* [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 16:31   ` Janneke Nieuwenhuizen
  2024-12-04 16:40     ` Janneke Nieuwenhuizen
@ 2024-12-04 17:08     ` Zheng Junjie
  2024-12-04 17:13       ` Janneke Nieuwenhuizen
  1 sibling, 1 reply; 21+ messages in thread
From: Zheng Junjie @ 2024-12-04 17:08 UTC (permalink / raw)
  To: Janneke Nieuwenhuizen; +Cc: Andreas Enge, 74689, Ludovic Courtès

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

Janneke Nieuwenhuizen <janneke@gnu.org> writes:

> Zheng Junjie writes:
>
> Hello Zheng,
>
>> This reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.
>>
>> This part accidentally triggered a world rebuild for non-x86 architectures.
>>
>> Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
>> ---
>>  gnu/packages/make-bootstrap.scm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
>> index e0dcca7b33e..d9c2f9bb827 100644
>> --- a/gnu/packages/make-bootstrap.scm
>> +++ b/gnu/packages/make-bootstrap.scm
>> @@ -538,7 +538,8 @@ (define %gcc-static
>>                  (substitute* (cons "gcc/config/rs6000/sysv4.h"
>>                                     (find-files "gcc/config"
>>                                                 "^gnu-user.*\\.h$"))
>> -                  ((" -lgcc_s}}") "}}"))))))))
>> +                  ((" -lgcc_s}}") "}}")
>> +                  #t)))))))
>
> Running
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix build --target=x86_64-pc-gnu bootstrap-tarballs --verbosity=2
> --8<---------------cut here---------------end--------------->8---
>
> gives:
>
> --8<---------------cut here---------------start------------->8---
> /gnu/store/9qy13rlkrl9q7wpkvbvz9bi89z4d9csq-gcc-static-14.2.0-builder:1:8712:
> source expression failed to match any pattern in form (substitute*
> (cons "gcc/config/rs6000/sysv4.h" (find-files "gcc/config"
> "^gnu-user.*\\.h$")) ((" -lgcc_s}}") "}}") #t)
> --8<---------------cut here---------------end--------------->8---
>
> The fix is trivial, the #t needs to go one level up....but it makes me
> wonder: have you tested this patch, I'm wondering as to how this worked
> to avoid a world rebuild to you?
>
> Thanks for looking into this, I couldn't have imagined touching
> make-bootstrap.scm would trigger world rebuilds.

x86 is not affected because it bootstrap from full source

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=master#n1915

>
> Greetings,
> Janneke

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

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

* [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
  2024-12-04 17:08     ` Zheng Junjie
@ 2024-12-04 17:13       ` Janneke Nieuwenhuizen
  0 siblings, 0 replies; 21+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-12-04 17:13 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689, Ludovic Courtès

Zheng Junjie writes:

> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>
>> Zheng Junjie writes:
>>
>> Hello Zheng,
>>
>>> This reverts commit ec8a5ec15f898e864705e5a5c834532e3fa8d0a4.
>>>
>>> This part accidentally triggered a world rebuild for non-x86 architectures.
>>>
>>> Change-Id: Id2f9bcbcda8dc86ea407e9a7857a854dc1a742b5
>>> ---
>>>  gnu/packages/make-bootstrap.scm | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)

[..]

>> Thanks for looking into this, I couldn't have imagined touching
>> make-bootstrap.scm would trigger world rebuilds.
>
> x86 is not affected because it bootstrap from full source
>
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=master#n1915

That makes sense, thanks!

-- 
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] 21+ messages in thread

* bug#74689: [PATCH 0/3] fix non-x86 world rebuild
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
                   ` (3 preceding siblings ...)
  2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
@ 2024-12-10 23:37 ` Ludovic Courtès
  2024-12-28  0:44 ` [bug#74689] [PATCH] Add predicates for decoded times and time deltas Paul Eggert
  5 siblings, 0 replies; 21+ messages in thread
From: Ludovic Courtès @ 2024-12-10 23:37 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: Andreas Enge, 74689-done, Janneke Nieuwenhuizen

Zheng Junjie <zhengjunjie@iscas.ac.cn> skribis:

> The 64bit Hurd merge triggered a recompilation of the non-x86 world, and the following patches should fix it. no test on hurd.
>
>
>
> Zheng Junjie (3):
>   Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for
>     the 64bit Hurd."
>   Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
>   Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the
>     64bit Hurd."

I believe this is now pushed.  Thank you!

Closing.

Ludo’.




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

* [bug#74689] [PATCH] Add predicates for decoded times and time deltas
  2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
                   ` (4 preceding siblings ...)
  2024-12-10 23:37 ` bug#74689: [PATCH 0/3] fix non-x86 world rebuild Ludovic Courtès
@ 2024-12-28  0:44 ` Paul Eggert
  2024-12-28 15:56   ` Richard Lawrence
  5 siblings, 1 reply; 21+ messages in thread
From: Paul Eggert @ 2024-12-28  0:44 UTC (permalink / raw)
  To: Richard Lawrence; +Cc: 74689

What's the use case for these proposed predicates? I'm finding it hard 
to review the patch without knowing what it's for.

Surely this should be in time-date.el rather than simple.el.

The implementation of decoded-time-p seems complicated and doesn't match 
what decode-time produces. Wouldn't it be simpler to call (ignore-errors 
(equal val (decode-time (encode-time val))))?




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

* [bug#74689] [PATCH] Add predicates for decoded times and time deltas
  2024-12-28  0:44 ` [bug#74689] [PATCH] Add predicates for decoded times and time deltas Paul Eggert
@ 2024-12-28 15:56   ` Richard Lawrence
  2024-12-28 17:26     ` Paul Eggert
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Lawrence @ 2024-12-28 15:56 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 74689

Paul Eggert <eggert@cs.ucla.edu> writes:

> What's the use case for these proposed predicates? I'm finding it hard 
> to review the patch without knowing what it's for.

Well, one reason is just general completeness: it's always useful, for
any type, to be able to check that a value is of that type before
passing it to functions that expect that type, e.g. decoded-time-add.

More concretely, in the new implementation of iCalendar/RFC5545 I have
been working on (see Bug#74994), I decided to represent iCalendar times
and date-times as decoded times (with the idea that decoded-times are
the "native" Emacs way to represent these values). This in turn means I
need a way to verify that values are of this type before e.g. doing
calendar arithmetic with them, or serializing a decoded-time value back
out to a string. There are also many places where the iCalendar standard
allows both dates and date-times as values, and I need to dispatch based
on the type at runtime: e.g. to get the month, I need to use
`calendar-extract-month' with a plain date value, but
`decoded-time-month' with a date-time value. I need type predicates to
do such dispatching.

> Surely this should be in time-date.el rather than simple.el.

OK, makes sense -- I'll move it there.

> The implementation of decoded-time-p seems complicated and doesn't match 
> what decode-time produces. 

What seems complicated about it? (Just the use of cl-typep? That can
easily be removed.) What are the mismatches with what decode-time
produces?

> Wouldn't it be simpler to call
> (ignore-errors (equal val (decode-time (encode-time val))))?

I could certainly change it to that if it's preferable, though that
doesn't strike me personally as simpler: it's fewer lines of code, but
rests on implicit assumptions about the implementation details of
decode-time and encode-time. To me it seems simpler to explicitly encode
the constraints that decoded times are supposed to obey.

In any case, maybe the problem here is actually my original choice to
represent iCalendar date-times as decoded times. If decoded times aren't
right for that purpose, I could instead define a new type; but that
would mean I won't be able to re-use all the functions that already work
with decoded-times, unless I can adapt them to work with the new type,
and might end up writing a lot of boilerplate or duplicated code.

Hope that helps clarify things!




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

* [bug#74689] [PATCH] Add predicates for decoded times and time deltas
  2024-12-28 15:56   ` Richard Lawrence
@ 2024-12-28 17:26     ` Paul Eggert
  0 siblings, 0 replies; 21+ messages in thread
From: Paul Eggert @ 2024-12-28 17:26 UTC (permalink / raw)
  To: Richard Lawrence; +Cc: 74689

On 12/28/24 07:56, Richard Lawrence wrote:
> I need to use
> `calendar-extract-month' with a plain date value, but
> `decoded-time-month' with a date-time value. I need type predicates to
> do such dispatching.

Not necessarily; you can instead try each function in turn and use the 
first that works.

I have some qualms about saying that decoded times are a "type". Whether 
a decoded time is valid depends on the timezone: (0 30 2 10 3 2024 0 t 
-21600) is a valid decoded time in Phoenix but not in Denver, because 
clocks sprang forward over that time in Denver but not in Phoenix. When 
data interpretation gets that complicated, the Emacs notion of "type" is 
not always the best.




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

end of thread, other threads:[~2024-12-28 17:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 16:11 [bug#74689] [PATCH 0/3] fix non-x86 world rebuild Zheng Junjie
2024-12-04 16:13 ` [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd." Zheng Junjie
2024-12-04 16:31   ` Janneke Nieuwenhuizen
2024-12-04 16:40     ` Janneke Nieuwenhuizen
2024-12-04 17:08     ` Zheng Junjie
2024-12-04 17:13       ` Janneke Nieuwenhuizen
2024-12-04 16:13 ` [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
2024-12-04 16:33   ` Janneke Nieuwenhuizen
2024-12-04 16:13 ` [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
2024-12-04 16:46   ` Janneke Nieuwenhuizen
2024-12-04 17:02     ` Zheng Junjie
2024-12-04 16:57 ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Zheng Junjie
2024-12-04 16:57   ` [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so." Zheng Junjie
2024-12-04 17:06     ` Janneke Nieuwenhuizen
2024-12-04 16:57   ` [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." Zheng Junjie
2024-12-04 17:07     ` Janneke Nieuwenhuizen
2024-12-04 17:05   ` [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, " Janneke Nieuwenhuizen
2024-12-10 23:37 ` bug#74689: [PATCH 0/3] fix non-x86 world rebuild Ludovic Courtès
2024-12-28  0:44 ` [bug#74689] [PATCH] Add predicates for decoded times and time deltas Paul Eggert
2024-12-28 15:56   ` Richard Lawrence
2024-12-28 17:26     ` Paul Eggert

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