unsupported mips64el architecture can cause cryptic backtraces

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 13 Jan 2023 18:26
cross-kernel-headers can produce broken packages
(name . bug-guix)(address . bug-guix@gnu.org)
87lem6firn.fsf@gmail.com
Hello,

This issue was triggered by having make-uboot-package uses #:target [0],
but it already exists on current master. I've spent some time narrowing
down the issue, and it is caused by the package returned by
cross-kernel-headers in (gnu packages cross-base) being produced with a
bogus arguments field, or at least one that can't be access via the
package-arguments accessor:

Toggle snippet (19 lines)
(use-modules (guix packages)
(gnu packages cross-base))

(define linux-libre-headers-cross-mips64el-linux-gnuabi64
(cross-kernel-headers "mips64el-linux-gnuabi64"))

(package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guix-user) [1]> ,bt
In gnu/packages/cross-base.scm:
388:33 1 (loop (#:phases (modify-phases %standard-phases (delete (quote configure)) (# (…) …) …) …) …)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

M
M
Maxim Cournoyer wrote on 13 Jan 2023 23:12
(address . 60786@debbugs.gnu.org)
87358ef5j8.fsf@gmail.com
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (29 lines)
> Hello,
>
> This issue was triggered by having make-uboot-package uses #:target [0],
> but it already exists on current master. I've spent some time narrowing
> down the issue, and it is caused by the package returned by
> cross-kernel-headers in (gnu packages cross-base) being produced with a
> bogus arguments field, or at least one that can't be access via the
> package-arguments accessor:
>
> (use-modules (guix packages)
> (gnu packages cross-base))
>
> (define linux-libre-headers-cross-mips64el-linux-gnuabi64
> (cross-kernel-headers "mips64el-linux-gnuabi64"))
>
> (package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guix-user) [1]> ,bt
> In gnu/packages/cross-base.scm:
> 388:33 1 (loop (#:phases (modify-phases %standard-phases (delete (quote configure)) (# (…) …) …) …) …)
> In ice-9/boot-9.scm:
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> [0] https://issues.guix.gnu.org/60224#30

OK, I think I've found the culprit:

Toggle snippet (4 lines)
(setenv "ARCH" ,(platform-linux-architecture
(lookup-platform-by-target target)))

in the definition of cross-kernel-headers*, in (gnu packages
cross-base).

When the target is "mips64el-linux-gnuabi64", lookup-platform-by-target
returns #f, which platform-linux-architecture does not expect.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 14 Jan 2023 04:09
control message for bug #60786
(address . control@debbugs.gnu.org)
87o7r1err2.fsf@gmail.com
retitle 60786 unsupported mips64el architecture can cause cryptic backtraces
quit
L
L
Ludovic Courtès wrote on 14 Jan 2023 15:29
Re: bug#60786: unsupported mips64el architecture can cause cryptic backtraces
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 60786@debbugs.gnu.org)
87sfgd9ol2.fsf_-_@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (2 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

[...]

Toggle quote (7 lines)
>> This issue was triggered by having make-uboot-package uses #:target [0],
>> but it already exists on current master. I've spent some time narrowing
>> down the issue, and it is caused by the package returned by
>> cross-kernel-headers in (gnu packages cross-base) being produced with a
>> bogus arguments field, or at least one that can't be access via the
>> package-arguments accessor:

It’s not that the field cannot be accessed; the field is thunked, and
thus exceptions can be thrown when you access it, as you found out:

Toggle quote (5 lines)
> OK, I think I've found the culprit:
>
> (setenv "ARCH" ,(platform-linux-architecture
> (lookup-platform-by-target target)))

Ludo’.
M
M
Maxim Cournoyer wrote on 2 Feb 2023 17:14
control message for bug #60786
(address . control@debbugs.gnu.org)
87lelgoxhr.fsf@gmail.com
close 60786
quit
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 60786
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