unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49565] [PATCH] gnu: glibc-headers-mesboot: Use %build-inputs in setenv phase
@ 2021-07-15  0:46 Thiago Jung Bauermann via Guix-patches via
  2021-07-15  2:04 ` Thiago Jung Bauermann via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2021-07-15  0:46 UTC (permalink / raw)
  To: 49565; +Cc: Thiago Jung Bauermann

When cross-building from x86-64-linux to powerpc64le-linux,
(assoc-ref inputs "libc") returns #f so get it from %build-inputs
instead.

For consistency, do the same for the other inputs as well.

* gnu/packages/commencement.scm (glibc-headers-mesboot)[arguments]: Get
packages from ‘%build-inputs’ rather than ‘inputs’.
---
 gnu/packages/commencement.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

When running

```
$ ./pre-inst-env guix build \
	--target=powerpc64le-linux-gnu.gcc \
	gcc-toolchain@11
```

on current core-updates branch (commit 8456581375cf), I get the
following error during the build of glibc-mesboot-2.16:

--8<---------------cut here---------------start------------->8---
phase `setenv' failed after 0.0 seconds
Backtrace:
In ice-9/boot-9.scm:
 157: 15 [catch #t #<catch-closure c93c40> ...]
In unknown file:
   ?: 14 [apply-smob/1 #<catch-closure c93c40>]
In ice-9/boot-9.scm:
  63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 12 [eval # #]
In ice-9/boot-9.scm:
2320: 11 [save-module-excursion #<procedure cc1b00 at
ice-9/boot-9.scm:3961:3 ()>]
3966: 10 [#<procedure cc1b00 at ice-9/boot-9.scm:3961:3 ()>]
1645: 9 [%start-stack load-stack #<procedure cc2ba0 at
ice-9/boot-9.scm:3957:10 ()>]
1650: 8 [#<procedure cc8db0 ()>]
In unknown file:
   ?: 7 [primitive-load
"/gnu/store/7ny6wjvw8pqw1zcgwq8bxja7946l2l2d-glibc-mesboot-2.16.0-builder"]
In ice-9/boot-9.scm:
 157: 6 [catch srfi-34 ...]
In srfi/srfi-1.scm:
 616: 5 [for-each #<procedure 1500040 at
guix/build/gnu-build-system.scm:909:14 (expr)> ...]
In ice-9/boot-9.scm:
 171: 4 [with-throw-handler #t ...]
In guix/build/gnu-build-system.scm:
 925: 3 [#<procedure 14de940 at guix/build/gnu-build-system.scm:924:21
()>]
In ice-9/eval.scm:
 411: 2 [eval # #]
In unknown file:
   ?: 1 [string-append " -L " ...]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 14de900 at ice-9/boot-9.scm:97:6 (thrown-k . args)>
wrong-type-arg ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 14de900 at
ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure string-append: Wrong type
(expecting string): #f
--8<---------------cut here---------------end--------------->8---

I deduced that this is because `(assoc-ref inputs "libc")` is returning #f.
And indeed, changing the code to look in %build-inputs instead fixes the
issue. I also noticed that most other places which look for a "libc"
package do so in %build-inputs rather than in inputs.

Just changing the line for "libc" is enough to fix the build but for
consistency, also change the other variables as well.

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index fb028390a260..ab22bca2fb8f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2133,10 +2133,10 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (invoke "tar" "xvf" source)
                (chdir (string-append "glibc-" ,version))))
            (replace 'setenv
-             (lambda* (#:key inputs #:allow-other-keys)
-               (let* ((headers  (assoc-ref inputs "headers"))
-                      (libc     (assoc-ref inputs "libc"))
-                      (gcc      (assoc-ref inputs "gcc"))
+             (lambda _
+               (let* ((headers  (assoc-ref %build-inputs "headers"))
+                      (libc     (assoc-ref %build-inputs "libc"))
+                      (gcc      (assoc-ref %build-inputs "gcc"))
                       (cppflags (string-append
                                  " -I " (getcwd) "/nptl/sysdeps/pthread/bits"
                                  " -D BOOTSTRAP_GLIBC=1"))




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

end of thread, other threads:[~2021-07-22  0:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15  0:46 [bug#49565] [PATCH] gnu: glibc-headers-mesboot: Use %build-inputs in setenv phase Thiago Jung Bauermann via Guix-patches via
2021-07-15  2:04 ` Thiago Jung Bauermann via Guix-patches via
2021-07-15 12:58 ` Maxime Devos
2021-07-15 15:03   ` Thiago Jung Bauermann via Guix-patches via
2021-07-15 16:00     ` Maxime Devos
2021-07-15 17:02       ` Thiago Jung Bauermann via Guix-patches via
2021-07-16  1:31 ` [bug#49565] [PATCH core-updates] gnu: bootstrap: Use %current-target-system to decide bootstrap path Thiago Jung Bauermann via Guix-patches via
2021-07-16  8:20   ` Maxime Devos
2021-07-16 20:01     ` Thiago Jung Bauermann via Guix-patches via
2021-07-18 16:10       ` Maxime Devos
2021-07-18 16:45         ` Thiago Jung Bauermann via Guix-patches via
2021-07-20  0:01     ` [bug#49565] [PATCH core-updates v2] " Thiago Jung Bauermann via Guix-patches via
2021-07-20 13:16       ` Thiago Jung Bauermann via Guix-patches via
2021-07-21 20:30         ` Thiago Jung Bauermann via Guix-patches via
2021-07-21 22:01           ` [bug#49565] [PATCH] gnu: glibc-headers-mesboot: Use %build-inputs in setenv phase Ludovic Courtès
2021-07-22  0:32             ` Thiago Jung Bauermann via Guix-patches via

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