[PATCH 0/3] fix non-x86 world rebuild

  • Open
  • quality assurance status badge
Details
2 participants
  • Janneke Nieuwenhuizen
  • Zheng Junjie
Owner
unassigned
Submitted by
Zheng Junjie
Severity
normal
Z
Z
Zheng Junjie wrote 10 hours ago
(address . guix-patches@gnu.org)
cover.1733328333.git.zhengjunjie@iscas.ac.cn
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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(address . 74689@debbugs.gnu.org)
da79efe38d12eff1cfd8fd329f47acfab1abd21e.1733328333.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (16 lines)
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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
(address . 74689@debbugs.gnu.org)
e4944eb2c14596962655bb0d2bc0a70400a7d137.1733328333.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (66 lines)
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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
(address . 74689@debbugs.gnu.org)
9fed162df36c76cef39a2734baa71e34c98373c5.1733328333.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (27 lines)
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
J
J
Janneke Nieuwenhuizen wrote 10 hours ago
Re: [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87h67jcsvr.fsf@gnu.org
Zheng Junjie writes:

Hello Zheng,

Toggle quote (21 lines)
> 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

Toggle snippet (3 lines)
./pre-inst-env guix build --target=x86_64-pc-gnu bootstrap-tarballs --verbosity=2

gives:

Toggle snippet (3 lines)
/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?

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
J
J
Janneke Nieuwenhuizen wrote 10 hours ago
Re: [bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87cyi7csrd.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (4 lines)
> 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?

Toggle quote (21 lines)
> 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.

Toggle quote (11 lines)
> + '(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
J
J
Janneke Nieuwenhuizen wrote 10 hours ago
Re: [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
878qsvcsf9.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Hi

Toggle quote (38 lines)
> 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

Toggle snippet (15 lines)
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")

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
J
J
Janneke Nieuwenhuizen wrote 10 hours ago
Re: [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87zflbbdlh.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (74 lines)
> 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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(address . 74689@debbugs.gnu.org)
564993090580244a965311b5bb510655a9f85d97.1733331428.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (18 lines)
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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
(address . 74689@debbugs.gnu.org)
285c99b508322a12003211f85b549dbe94b6d464.1733331428.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (26 lines)
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
Z
Z
Zheng Junjie wrote 10 hours ago
[PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
(address . 74689@debbugs.gnu.org)
0028b452cf4f37da502d786a9be69abeddb2c15c.1733331428.git.zhengjunjie@iscas.ac.cn
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(-)

Toggle diff (89 lines)
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
Z
Z
Zheng Junjie wrote 10 hours ago
Re: [bug#74689] [PATCH 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
8734j3js96.fsf@iscas.ac.cn
Janneke Nieuwenhuizen <janneke@gnu.org> writes:

Toggle quote (78 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmdQizYACgkQO1qpk+Gi
3/C2QBAAuWXAIoPa8ImExGG7R2CHG02q1n2oMdWFv7Ai1iFJjc4rpSm/waTMl8Xs
PSi2G7qhOESLunkxcQIIMYehEtqXfETwouYGie3V+aD0l1bL9NgFREK1hQGR8bav
ZG1Wc6FC/1TojjqoCph8fRQkfSC8NPiJ4ZsDqwClNciNB0D71bJn2n7qp9Z6RdtW
aDH6nz6UZAlfYqlCYuBwHY+td57wH52uR/Bc0h9lFl297meK2WFmEup+MhaNfrgt
yTcoANSCF2T8xP1NZu0PXGNlBMc3HG0n36tlgae12tW6P0MQrU6l4al8S6aSfXhD
XHXk9qH0ZGMUB98/QQcncrhGcloJFQKsKqk5gzYGtHl5r9idId3/A6KpdlIxT9eB
F2EZQFW10zFQEL5f+UipAdafmocXMBMKB0CcdqTHkHgR2J/QD9M62K2xN7Q4lkFf
shDn9DbaefNCKZ+RN60WN+kKoHp7gFBIh03ajtLJ3FtAAKqNqPShsxHCl5O0Qv2X
kKKWYy7z79T0npnrg73cG+7eKejZ8aZWG4yBg0XdlmjRe34uiVQtplC8CRgW3roM
YvFHLafgCRSsWMze5QXxADsgD/W/1e9xkBdp0duOc1Gnd6k8+XSV3UkyNdOelApn
UX2vPI0k+qfkJ+A8tPmcl8mcz0TutLwpAkKiXAvaeM7/TwhEXIw=
=nJ+g
-----END PGP SIGNATURE-----

J
J
Janneke Nieuwenhuizen wrote 10 hours ago
Re: [bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87ttbjbcqj.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (21 lines)
> 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:

Toggle snippet (17 lines)
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")

Other than this, LGTM

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote 9 hours ago
Re: [bug#74689] [PATCH v2 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87plm7bco5.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (34 lines)
> 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
J
J
Janneke Nieuwenhuizen wrote 9 hours ago
Re: [bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd."
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87ldwvbcnf.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (14 lines)
> 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!

Toggle quote (84 lines)
> @@ -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
Z
Z
Zheng Junjie wrote 9 hours ago
Re: [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd."
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87wmgfidfr.fsf@iscas.ac.cn
Janneke Nieuwenhuizen <janneke@gnu.org> writes:

Toggle quote (47 lines)
> 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.

Toggle quote (3 lines)
>
> Greetings,
> Janneke
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmdQjHgACgkQO1qpk+Gi
3/CqqxAAiHUPWTYNSytcJLnsnRntqoqUtvWccX/nC7X4TEQUpNEXzj3KCBDrrrEj
zbV8Hp8gLxY3BDyNieVhdQ+6qJsL6tX1XXkaeiKcDFvjwPx7n/UC+LzEYKJuYRGW
XcGfZrB+SqD68We3L9XMpNIlzby4y5cV44E+FZQTauGC5PAyDWiPEh20JocEfJFQ
UBKF2u37ZCJbE4fWuI5nYR4kdLoH/DPhbUHm4Mdt3fBlkZWgosRRx4yChi/3Uo6s
SvKwMIUnNOUfaxRGVst3JkUwyblAfncRLbrPtZYeXsVul6sEGT6pqXUiIMFf0fD8
a0qaWZNkMwmyZ+MG6/aWJEGesWHOiaTv8uEC7+oD4hft3y0tJRD0lPwZ27EYAb8v
0imNiF8lIFgOeBM86kv8AwXrRduY6Jlfv9DZJkMu1BdY5/dysuakyg2Hj2Uy2US4
pdZ6MrELRzihT0Pv0KNEGyfiUI5TvYX4cnqkWBbjbsgmcobNACp6Uqdfs1gg2dTz
u9s9lhssyOYKI44WAeAQCnuDGe67DS7J4xc3QGX2V9uJwvW/zS3KYNOgIZWCHAaE
xxpSKN6cJEVWWtae7HY/3qGwF+jwSfO92Pq4rIap1TGy7QB53UifCI+YSNuasiYh
16lezeQCIrrnOoa5rltk9Ws71k/e86L93jLc1Sqpht1vF0sLghY=
=pUQn
-----END PGP SIGNATURE-----

J
J
Janneke Nieuwenhuizen wrote 9 hours ago
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87h67jbcc9.fsf@gnu.org
Zheng Junjie writes:

Toggle quote (15 lines)
> 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(-)

[..]

Toggle quote (7 lines)
>> 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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74689@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74689
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch