-
Notifications
You must be signed in to change notification settings - Fork 38.7k
contrib: fix BUILDDIR in gen-bitcoin-conf script #31332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31332. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MarnixCroes!
tACK b3a96b3
Summary of the Changes
This PR addresses an issue introduced by the new cmake build process, which places the build output in the ./build directory. Specifically, it updates the BUILDDIR path in the script to point to this directory, ensuring compatibility with in-tree builds.
This behavior is consistent with the instructions outlined in contrib/devtools/README.md:
With in-tree builds this tool can be run from any directory within the
repository. To use this tool with out-of-tree builds setBUILDDIR. For
example:BUILDDIR=$PWD/build contrib/devtools/gen-bitcoin-conf.sh
Potential Conflict
It’s worth noting that this PR conflicts with #31161 by @hebasto, which proposes a more holistic solution to this issue.
If Hebasto’s PR is merged first, this PR could potentially break those changes. It might be beneficial to coordinate between these two PRs to avoid introducing unnecessary conflicts or redundant solutions.
Testing Results
Platform
- Distributor ID: Ubuntu
- Description: Ubuntu 22.04.5 LTS
- Release: 22.04
- Codename: jammy
Master Branch
I was able to reproduce the issue on the master branch. The script fails to locate bitcoind due to the directory discrepancy caused by the cmake build process. Evidence of the issue can be seen in the screenshot below:

PR Branch
Testing the PR resolved the issue, and the script successfully generated the bitcoin.conf file in the correct location. Evidence of the fix is shown in the screenshot below:

Further Testing
To ensure stability, I rebuilt the entire Bitcoin Core project with the changes from this PR and encountered no issues. Everything worked as expected.
Closing Thoughts
This PR effectively resolves the issue in its current context, but careful coordination with #31161 is necessary to avoid conflicts or redundant fixes. Great work on the implementation!
BrandonOdiwuor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK b3a96b3
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Furthermore, that documentation is pretty clear that out of tree builds should set |
|
Are you still working on this? |
|
Can I take this up if no one is working? |
Agree, I think we can close this. |
|
sorry forgot to reply. while It's not clear for me what is the desired way forward. |
|
#31332 (comment) is pretty clear that the current docs and script is correct. If the script is changed, the docs will have to be adjusted as well. Otherwise there will be confusion and bugs. So any of the following can be done:
|
I have no preference either way, but I think the only reasonable options:
As it is now, the docs and script are consistent with each other in master, but conflicting in this PR. |
|
I picked this up and fixed both script and docs #31742. The change was also needed for the |
|
Ok, closing for #31742 |
…n-manpages.py 63a8791 contrib: fix BUILDDIR in gen-bitcoin-conf script and gen-manpages.py (jurraca) Pull request description: The `gen-bitcoin-conf.sh` and `gen-manpages.py` scripts assume a top level `src/` build dir, but in-tree builds are no longer allowed, nor recommended in the build steps. If a user builds `bitcoind` as recommended, these scripts fail. To fix it, we update the `BUILDDIR` env var and update the README accordingly. Follows up on initial work and discussion in #31332 . ACKs for top commit: fjahr: Code review ACK 63a8791 achow101: ACK 63a8791 Tree-SHA512: cf4d5b0d2e8b1f5db759bec01e131d8a0c511a2fd183389d2a0488d5fe4a906db2579d944f408b5c966f619edc6b2534023c3521f1fa5f8edd0216d29f3e48db
On master the gen-bitcoin-conf script doesn't work as it cannot find bitcoind.
This is because of the build dir that is now being used since cmake.
This PR fixes it.
master
PR