#36709 guix: compute --build triplet when lowering, not at load time
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36709 guix: compute --build triplet when lowering, not at load time | Ready | 0 | Positive | 0 + 4 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Converts `building-on` in `contrib/guix/toolchains.scm` from an eagerly evaluated variable into a procedure evaluated when lowering derivations. This ensures cross-toolchain packages use the target system passed via Guix's `--system` flag rather than the host system running `guix shell`.
Problem: When running Guix with `--system` under emulation on a host of a different architecture (for example, `--system=aarch64-linux` on an x86_64 host), `guix shell` loads manifests before applying `--system`. As a result, `building-on` captures the host's `%current-system`, causing cross toolchains like `gcc-cross-sans-libc` to configure with mismatched `--build` triplets and fail to build.
Evidence of importance:
- PR description demonstrates build failure: 'checking for CET support... configure: error: compiler and assembler with CET support are required for --enable-cet' when building under `--system=aarch64-linux` on x86_64
- PR description confirms native builds produce identical toolchain derivations to master on both `linux_static.scm` and `manifest_gui.scm`
Risk of a mistake: medium (build). A mistake in Guix toolchain definitions could alter compiler build flags or break reproducible release builds across supported architectures.
Changed since the previous assessment: No functional changes; the previous description was generated before the patch was available.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- reviewer: further review after author answered sedited's question 2026-10-30
- reviewer: code review following author reply and Concept ACK 2026-10-30
Agreement
Positive
support without stated reasons, no open objection (hebasto)
Thread notes: Initial record. hebasto offered a Concept ACK, and sedited asked about the author's motivation and setup, which jespada answered. / Initial record. sedited asked why the author ran into this, which was answered; hebasto left a Concept ACK.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| sedited (member) | question, usefulness | How and why did the author run into this issue? | answered · author explained they encountered it while testing build reproducibility across architectures under QEMU emulation | answered | yes | 2026-10-30: 'How and why did you run into this?' Status from: 2026-10-30: jespada: 'I hit it while trying to build https://github.com/bitcoin/bitcoin/pull/36708 with an aarch64 build machine' |
Support:
- hebasto (member) (Concept ACK, 2026-10-30): Concept ACK. [not substantive]
Participants:
- hebasto (member, support, 1 statements 2026-10-30 to 2026-10-30): Concept ACK
- sedited (member, question, 1 statements 2026-10-30 to 2026-10-30): asked how and why the author ran into the issue
Files
8 lines under test/bench/ci.
- contrib/guix/toolchains.scm +4/-4
Card
The short text the ranking pass compares across PRs.
Converts the `building-on` triplet resolution in `contrib/guix/toolchains.scm` from an eagerly evaluated variable into a procedure evaluated when lowering derivations. When running Guix with `--system` on a foreign host via emulation (such as building for aarch64 on x86_64), manifests previously evaluated `%current-system` at module load time, generating an incorrect `--build` triplet that broke cross-toolchain configuration for `gcc-cross-sans-libc`. The change fixes emulated cross-system Guix builds without modifying the derivations produced for native release builds.
Data
thread read through 2026-10-30 (3 statements), head 1ea9ffd556
labels: Build system
Categories
Build and CI
P3 · platform fix (ranking pass: Moved up from 43: fixes an actual Guix build failure under foreign-architecture emulation)
Fixes a Guix build failure when running under foreign architecture emulation with `--system`. Guix shell currently captures the host `%current-system` at load time before applying `--system`, causing cross toolchains like `gcc-cross-sans-libc` to fail configuration due to mismatched triplets.
Membership: Matches 'Build system' label and edits 'contrib/guix/toolchains.scm', which configures Guix cross-toolchain packages.
Factors: security/stability 0, bug 1, performance 0, user value 0, leverage 1