mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:44:38 +00:00
guix: compute --build triplet when lowering, not at load time #36709
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36709
Loading…
Reference in a new issue
No description provided.
Delete branch "guix-building-on-system"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
building-onincontrib/guix/toolchains.scmreads(%current-system)once, when the module is loaded.guix shellloads the manifest before it applies--system, so the value is the system of the machine that runs the build, not the system that Guix builds for.So a build with
ADDITIONAL_GUIX_ENVIRONMENT_FLAGS="--system=aarch64-linux"on an x86_64 machine (for example withqemu-binfmt-service-type, to get an aarch64 build machine) configures the aarch64 cross toolchain with--build=x86_64-guix-linux-gnu.gcc-cross-sans-libcthen fails to configure:What changes
building-onbecomes a procedure, and its three call sites call it. Guix then computes the triplet for each derivation, under the system that the derivation is built for.How I checked
HOST=x86_64-linux-gnu guix shell -n --system=aarch64-linux -m contrib/guix/linux_static.scm(withtoolchains.scmon the load path, asguix-builddoes) givesgcc-cross-sans-libcwith--build=x86_64-guix-linux-gnu. With this PR it gives--build=aarch64-guix-linux-gnu. That is the same derivation thatguix build -d --system=aarch64-linuxgives on master.--system): the toolchain derivations fromlinux_static.scmandmanifest_gui.scmare identical on master and with this PR. So this PR does not change release builds.x86_64-linux-gnuon x86_64 built the whole cross toolchain and the non-GUI binaries. The GUI environment then failed in the tests ofpython-pylint(timeout under emulation) andmaturin(snapshot mismatch). These packages have no aarch64 substitutes at the pinned Guix commit, and the failures are not related to this change.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
-static-piebitcoind by fanquake)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
How and why did you run into this?
Concept ACK.
I hit it while trying to build https://github.com/bitcoin/bitcoin/pull/36708 with an aarch64 build machine (QEMU binfmt emulation on an x86_64 box, via ADDITIONAL_GUIX_ENVIRONMENT_FLAGS="--system=aarch64-linux"), to check that the build is reproducible across build architectures. I have a Guix box so I was looking for Guix issues to help with.
I found no actionable issues in this static review.
Reviewed:
d7a8360f4ef5· Full review report · Previous reportspermalink
🐙 This pull request conflicts with the target branch and needs rebase.
ACK
d7a8360f4e.My Guix build:
Concept ACK
ACK
d7a8360f4ePrior when using
ADDITIONAL_GUIX_ENVIRONMENT_FLAGS="--system=*-linux"cc @willcl-ark I think you were also running into this before.
Backported this to
32.xin #36984.ralph referenced this pull request2026-11-27 15:36:31 +00:00