mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 11:50:39 +00:00
guix: map the whole DISTSRC in -fdebug-prefix-map #36708
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!36708
Loading…
Reference in a new issue
No description provided.
Delete branch "guix-debug-prefix-map"
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?
Fixes #34414.
Why
The Guix build scripts set
-fdebug-prefix-map=${DISTSRC}/src=.. Generated sources (for example the capnp proxies) are in the build tree, outside${DISTSRC}/src, so their debug info kept the absolute/distsrc-base/distsrc-<commit>-<host>/build/...path. Sources fromsrc/were relative. With two kinds of paths, it is hard to set up source path mapping in a debugger.This maps
${DISTSRC}instead, inbuild_linux.sh,build_linux_gui.sh,build_win.shandbuild_win_gui.sh. The macOS scripts do not set-fdebug-prefix-map, so this PR does not change them.What changes in the debug paths
All source paths are now relative to the repository root:
src/./netaddress.cpp./src/netaddress.cpp/distsrc-base/distsrc-<commit>-<host>/build/src/ipc/capnp/init.capnp.proxy-client.c++./build/src/ipc/capnp/init.capnp.proxy-client.c++To find the sources in gdb, use the repository root as the source directory (
directory /path/to/bitcoin) instead ofsrc/.How I checked
readelf --debug-dump=info,--debug-dump=rawlineand--debug-dump=stroflibexec/bitcoin-node.dbg(x86_64-linux-gnu): nodistsrcstring. Sources show as./src/..., generated capnp files as./build/src/....bitcoind.exe.dbgfrom the Windows debug zip: nodistsrcstring.I will post the Guix hashes for this commit in a comment. I do not have an aarch64 build machine at the moment, so a build from someone with one is welcome.
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.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
dependsreferences 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.
Guix build of
00867d70c0(x86_64 build machine):I found no actionable issues in this static review.
Reviewed:
00867d70c01b· Full review report · Previous reportspermalink
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]
43a33e513c(master)
9172f4dc28(pull/36708/merge)
bd1be406251b0830...8d97d6cf1ea779c6...f25f9e09ede2f54a...42adae4be565366b...8914e06f638d0188...5bf9005b911e369e...825652890c01c086...daebc976af67d1e4...80c35cf9e61559f2...18e89203a7d0d0d5...66caba904aa20fb0...303d668984409a95...adaf018e7c491ea0...10428a2dc224263b...19f3931aa23a3bd8...821b2f1a717399ce...8854ecbdd1c4c527...08bd8a302e280993...86192da4bd7e12c2...86b590ef0b0ef5ec...3c270d4945bd6d7e...f036eb8da1f31818...5102faf1a020f55a...5e1891b915fe0b60...3342e6211801f147...a3fc83f325860960...10bb847d2df1639a...e63042c5ecdc9ab7...e9823de8fc4cdeed...92767d4e2ba0dfed...5cc61b2feffba75f...611ef6796972ac20...2dcff22293f3b9f1...2f56d532875c4454...fb4b47f6714e128b...d1a67894b08c12a4...897e63af3a39b976...919815d1552dc225...1848ddacee205ec5...ca57c2b9377f091a...b0f192888345f26a...1aeb5c6f746d973c...493cd803369bf35a...8db1c19a21d945f1...7078d254e4746a3f...fcc0ccb947616c83...dafd7c1a2eac818d...Hmm, I was thinking this is a nice change, but I am not so sure now. Maybe this and the issue should just be closed?
Recall that there is still plenty of stuff not mapped, like
/bitcoin/depends/..., or/usr/include/.... So mapping capnp seems like a rounding error that doesn't really matter? (Recall a user won't have the build dir anyway for this guix release build)So I think this can still be done, but I think it would mostly be a "style cleanup".
Fair point. I checked the line tables of bitcoin-node.dbg from my build, and after this change about a third of the source directories are still absolute (/bitcoin/depends/..., /usr/include/..., plus the toolchain's /tmp/guix-build-...). So the capnp mapping alone does not give fully relative debug info, and it is mostly cosmetic. Feel free to close this one.
do you think mapping of all paths, including depends, be worth it, or is it not worth the review? I'm ok to do update this one if you think so.
#36709 is separate: it fixes a real build failure with --system, which I hit while trying to test this PR.
See also https://github.com/bitcoin/bitcoin/pull/36270, but that just re-writes the path and the user would still have to fetch the sources themselves (and likely rewrite the debug paths themselves again)
I think I'll close this for now. The changes are fine, but as a pure style cleanup, it may be not worth it. Let's wait until the motivation is stronger and then re-open.