Hello, There is currently a proposed change [0] to modify the behavior of the LOOKUP-PLATFORM-BY-SYSTEM, LOOKUP-PLATFORM-BY-TARGET and LOOKUP-PLATFORM-BY-TARGET-OR-SYSTEM public procedures from (guix platforms) that would have them return an exception instead of #f when no platform could be found.
[0] https://issues.guix.gnu.org/60802 This is motivated so that a clearer error can be produced when these procedures are used deep in the following reproducer: --8<---------------cut here---------------start------------->8--- (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? _) --8<---------------cut here---------------end--------------->8--- With the change installed, the backtrace now reads as: --8<---------------cut here---------------start------------->8--- ice-9/boot-9.scm:1685:16: In procedure raise-exception: ERROR: 1. &platform-not-found-error Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ,bt In gnu/packages/cross-base.scm: 383:15 3 (arguments #<package linux-libre-headers-cross-mips64el-linux-gnuabi64@5.10.35 gnu/packag…>) In gnu/packages/linux.scm: 693:27 2 (arguments #<package linux-libre-headers@5.10.35 gnu/packages/linux.scm:672 7f409be93a50>) In guix/platform.scm: 130:6 1 (lookup-platform-by-target-or-system "x86_64-linux") In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) --8<---------------cut here---------------end--------------->8--- which more directly communicates the source of the problem. For more information, see the issue that motivated it: https://issues.guix.gnu.org/60786 -- Thanks, Maxim