From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Pierre Langlois <pierre.langlois@gmx.com>
Cc: 59913@debbugs.gnu.org
Subject: bug#59913: [tentative PATCH] Failure to guix pull on aarch64 since recent make-linux-libre*
Date: Fri, 13 Jan 2023 10:39:45 -0500 [thread overview]
Message-ID: <87pmbifnpa.fsf@gmail.com> (raw)
In-Reply-To: <87k031xxss.fsf@gmx.com> (Pierre Langlois's message of "Thu, 08 Dec 2022 23:31:48 +0000")
Hi Pierre,
Pierre Langlois <pierre.langlois@gmx.com> writes:
> Hi Guix!
>
> I've been getting errors while running `guix pull' on an aarch64 system,
> during the final guix-package-cache step:
>
> (repl-version 0 1 1)
> Generating package cache for '/gnu/store/m8in1imi93snq711d7568dj9hlrx4diz-profile'...
>
> Backtrace:
> In ice-9/boot-9.scm:
> 1747:15 19 (with-exception-handler #<procedure af1570 at ice-9/bo?> ?)
> 1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/repl.scm:
> 99:21 17 (_)
> In unknown file:
> 16 (_ #<procedure 82fd00 at guix/repl.scm:100:25 ()> #<pr?> ?)
> 15 (primitive-load "/gnu/store/3x6g541ixbmdjav4ky6dp1ryj4l?")
> In ice-9/boot-9.scm:
> 1752:10 14 (with-exception-handler _ _ #:unwind? _ # _)
> In gnu/packages.scm:
> 438:11 13 (generate-package-cache _)
> In srfi/srfi-1.scm:
> 460:18 12 (fold #<procedure expand-cache expr> _ _)
> In gnu/packages.scm:
> 390:9 11 (expand-cache . _)
> In guix/packages.scm:
> 1317:17 10 (supported-package? #<package linux-libre@4.14.300 gnu?> ?)
> In guix/memoization.scm:
> 101:0 9 (_ #<hash-table 31605e0 13974/28099> #<package linux-l?> ?)
> In guix/packages.scm:
> 1295:37 8 (_)
> 1555:16 7 (package->bag _ _ _ #:graft? _)
> 1660:43 6 (thunk)
> In gnu/packages/linux.scm:
> 986:37 5 (arguments #<package linux-libre@4.14.300 gnu/packages/?>)
> In guix/gexp.scm:
> 460:52 4 (%local-file #f #<promise #<procedure 4df2660 at gnu/p?> ?)
> In unknown file:
> 3 (basename #f #<undefined>)
> In ice-9/boot-9.scm:
> 1685:16 2 (raise-exception _ #:continuable? _)
> 1780:13 1 (_ #<&compound-exception components: (#<&assertion-fail?>)
> In unknown file:
> 0 (backtrace #<undefined>)
>
> (exception wrong-type-arg (value "scm_to_utf8_stringn") (value "Wrong type argument in position ~A (expecting ~A): ~S") (value (1 "string" #f)) (value (#f)))
>
>
> I was able to decipher the backtrace to *maybe* put together a fix, but
> I'm unsure why the problem started. My best guess is that it started
> with commit dfc6957a5af7d179d4618eb19d4f555c519bc6f2, even though I
> can't find where the issue actually is, it looks fine to me!
>
> What seems to happen is that the `kernel-config' function now receive an
> `arch' argument for an architecture that isn't actually supported by
> that kernel, as is the case for linux-libre@4.14.300. And, correctly,
> the function should not expect to ever get such arch value to begin
> with, so we get a `(local-file #f)'.
>
> (define* (kernel-config arch #:key variant)
> "Return a file-like object of the Linux-Libre build configuration file for
> ARCH and optionally VARIANT, or #f if there is no such configuration."
> (let* ((name (string-append (if variant (string-append variant "-") "")
> (if (string=? "i386" arch) "i686" arch) ".conf"))
> (file (string-append "linux-libre/" name)))
> (local-file (search-auxiliary-file file))))
>
> I think it's fair for that function expect the arch to be valid (why
> would you ask the config for an unsupported arch?).
>
> I think it should be possible to fix this by checking the arch is
> supported at the call site:
>
>>From 77829140f14928e30cbe4e53c625be3ba2f5895f Mon Sep 17 00:00:00 2001
> From: Pierre Langlois <pierre.langlois@gmx.com>
> Date: Thu, 8 Dec 2022 23:41:40 +0000
> Subject: [PATCH] gnu: make-linux-libre*: Do not get config for unsupported
> systems.
>
> * gnu/packages/linux.scm (make-linux-libre*)[phases] <configure>: Check
> arch is in supported-systems before calling configuration-file.
> ---
> gnu/packages/linux.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 5ae6366593..87fc9fe94c 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -983,6 +983,7 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
> (or (%current-target-system)
> (%current-system))))))
> (and configuration-file arch
> + (member arch supported-systems)
> (configuration-file
> arch
> #:variant (version-major+minor version))))
Thanks for investigating the issue. I'm hitting the same kind of
problem (it seems) trying to migrate make-u-boot-package to gexps, so
I'm revisiting this.
It seems to me that the produced backtrace is overly cryptic; perhaps
configuration-file should throw an exception with a more detailed error
"unsupported architecture -- not generating configuration file" or
similar?
Or should the generate-package-cache machinery catch these #f itself?
That's the same place where it fails in my case with this patch applied:
https://issues.guix.gnu.org/60224#30, and with the reproducer:
--8<---------------cut here---------------start------------->8---
(package-transitive-supported-systems u-boot-malta (%current-system))
--8<---------------cut here---------------end--------------->8---
I'm still digging into the issue to get a better understanding.
--
Thanks,
Maxim
next prev parent reply other threads:[~2023-01-13 17:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 23:31 bug#59913: [tentative PATCH] Failure to guix pull on aarch64 since recent make-linux-libre* Pierre Langlois
2022-12-08 23:59 ` Pierre Langlois
2022-12-09 0:36 ` Pierre Langlois
2023-01-13 15:39 ` Maxim Cournoyer [this message]
[not found] <167059225344.15591.17976801315617510996@vcs2.savannah.gnu.org>
2022-12-09 19:18 ` bug#59913: branch master updated: Revert "gnu: make-linux-libre*: Remove input labels." Pierre Langlois
2022-12-09 20:06 ` Maxim Cournoyer
2022-12-09 21:33 ` Pierre Langlois
2022-12-13 9:52 ` bug#59913: [tentative PATCH] Failure to guix pull on aarch64 since recent make-linux-libre* Ludovic Courtès
2023-01-13 21:04 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmbifnpa.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=59913@debbugs.gnu.org \
--cc=pierre.langlois@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.