Skip to content

Conversation

151henry151
Copy link

@151henry151 151henry151 commented Aug 23, 2025

Remove deprecated CMake RPATH settings (CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH) that are no longer needed after reordering Guix build script to perform binary checks after installation.

Remove RPATH workarounds from CMakeLists.txt and src/CMakeLists.txt
Reorder Guix script to check installed binaries instead of build tree binaries
Update TODO comments

Builds successfully on Linux
Full Guix build in progress

Addresses TODO items in CMakeLists.txt:620 and src/CMakeLists.txt:412

This is my first attempt at contributing to bitcoin core so please, provide me any feedback that you might have. Thanks!

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 23, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33247.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #33278 (cmake: make missing Python interpreter behaviour more explicit by stickies-v)
  • #33229 (multiprocess: Don't require bitcoin -m argument when IPC options are used by ryanofsky)
  • #32380 (Modernize use of UTF-8 in Windows code by hebasto)

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.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my first attempt at contributing to bitcoin core so please, provide me any feedback that you might have. Thanks!

Thank you for your interest in contributing to this project!

The changes you are referring to as completed, i.e. "reordering Guix script commands to perform binary checks after the installation step", have not actually been done yet. See contrib/guix/libexec/build.sh, from line 251 onwards.

@151henry151
Copy link
Author

This is my first attempt at contributing to bitcoin core so please, provide me any feedback that you might have. Thanks!

Thank you for your interest in contributing to this project!

The changes you are referring to as completed, i.e. "reordering Guix script commands to perform binary checks after the installation step", have not actually been done yet. See contrib/guix/libexec/build.sh, from line 251 onwards.

Thanks for your helpful reply @hebasto. I've pushed another commit attempting to perform the actual reordering of the Guix script commands to perform those checks after the installation step; I tested it locally and it seemed to build successfully, hope I got the right idea here.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a027234, all checks are still performed on the binaries in the build tree, whereas they are supposed to be performed on the binaries in the installation location.

@hebasto
Copy link
Member

hebasto commented Aug 24, 2025

... I tested it locally and it seemed to build successfully...

When a developer tests changes in the Guix scripts locally, they usually posts the resulting binary hashes. For example, as in #33217 (review).

@151henry151
Copy link
Author

151henry151 commented Aug 24, 2025

Thanks for the feedback hebasto, I'll continue working on this

Conflicts

Reviewers, this pull request conflicts with the following ones:

* [#32380](https://github.com/bitcoin/bitcoin/pull/32380) (Modernize use of UTF-8 in Windows code by hebasto)

The conflict resolves easily by keeping both changes.

@janb84
Copy link
Contributor

janb84 commented Aug 24, 2025

This is my first attempt at contributing to bitcoin core so please, provide me any feedback that you might have. Thanks!

Welcome, please also change this message for a description of the changes made in this PR. Helpful tips are in creating-the-pull-request

@151henry151
Copy link
Author

In a027234, all checks are still performed on the binaries in the build tree, whereas they are supposed to be performed on the binaries in the installation location.

Thanks for the feedback.

The previous change moved checks after installation but was still using cmake --build targets which check build tree binaries. I've now fixed this to directly call the security and symbol check scripts on the installed binaries in ${INSTALLPATH}/bin/, ensuring checks are performed on the final installed binaries with proper RPATHs.

When a developer tests changes in the Guix scripts locally, they usually posts the resulting binary hashes. For example, as in #33217 (review).

I'm currently running a full Guix build locally to generate the binary hashes. The build is in progress and I'll post the resulting hashes once it completes.

@151henry151
Copy link
Author

151henry151 commented Aug 25, 2025

My Guix build resulting binary hashes:

75d4eb10b95a64c595ee1ddf31d3c1e0086958a1ae3d64f9e2bbc4930cd88366  dist-archive/bitcoin-e922e27a2ecd.tar.gz

f7d2d6cd820561229ab5fa476c06484ced81a1fa8b90d2fbbd7a82fa915aa956  x86_64-linux-gnu/bitcoin-e922e27a2ecd-x86_64-linux-gnu-debug.tar.gz

df24c2269cf96dbf011692fbc0b21dab7786abd43dbb82e4351f0117e95169e5  x86_64-linux-gnu/bitcoin-e922e27a2ecd-x86_64-linux-gnu.tar.gz

@maflcko
Copy link
Member

maflcko commented Aug 25, 2025

Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits

151henry151

This comment was marked as duplicate.

@151henry151
Copy link
Author

There was a TODO still in the src/CMakeLists.txt file; I cleaned it up and squashed the commits just now and think that it is now all correct.

@DrahtBot
Copy link
Contributor

Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

File commit 6ca6f3b
(master)
commit 1ac12bc
(pull/33247/merge)
*-aarch64-linux-gnu-debug.tar.gz abcc0baac5e7b752... 8ce308bbc579ad49...
*-aarch64-linux-gnu.tar.gz 4a8653178ccbdddb... ed54dfe44406b72a...
*-arm-linux-gnueabihf-debug.tar.gz 95d3d74d5682c24a... 86d72da5723c7b7d...
*-arm-linux-gnueabihf.tar.gz e25759641901b072... d53eee042815730f...
*-arm64-apple-darwin-codesigning.tar.gz 366f30df86e875e8... 9aee1e5a66c0b9d5...
*-arm64-apple-darwin-unsigned.tar.gz 1c83672238b93111... e07f9aec2228734e...
*-arm64-apple-darwin-unsigned.zip ad51645f12fb5dc7... 87aa37bf869b5b55...
*-powerpc64-linux-gnu-debug.tar.gz df430f763352d69c... 39f3f3ebb73204d8...
*-powerpc64-linux-gnu.tar.gz 7dd5cbe718652deb... 0e6ef9dea9eeafd2...
*-riscv64-linux-gnu-debug.tar.gz d258d893caa4d9b7... 48ad366e15a9c433...
*-riscv64-linux-gnu.tar.gz 3f182eee5fd9c395... 48cf7092c537d8cd...
*-x86_64-apple-darwin-codesigning.tar.gz 3998753c28bfa555... 7397d894c9cabe8c...
*-x86_64-apple-darwin-unsigned.tar.gz b4474a38f90d8d72... 147d8db165c37ccd...
*-x86_64-apple-darwin-unsigned.zip 6028f331e23a3f0f... 60a73a9684ce8e1d...
*-x86_64-linux-gnu-debug.tar.gz 881ca6a16e6f2ac5... b55f8fb6ec93d54b...
*-x86_64-linux-gnu.tar.gz 01fc4a45eb400557... 0aac741f62f5299c...
*.tar.gz 0711f5eb93cb4d47... 0191779babb2b28f...
SHA256SUMS.part 1801e58d5cf74ae8... beb6ef46d809ac3d...
guix_build.log cbdad833bb02e563... b87aee0c1d625b91...
guix_build.log.diff b3dfe2faa87aaa23...

@151henry151
Copy link
Author

Is there anything further required here? I understand that review for pull requests can take a long time (especially for non-critical things such as this one) but just wanted to check in and see if there's further action needed from me, or anything about this pull request that I could improve.

@maflcko
Copy link
Member

maflcko commented Sep 4, 2025

Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits

…targets

Remove deprecated CMake settings (CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH)
that are no longer needed after reordering Guix build script to perform binary
checks after installation.

Changes:
- Remove CMAKE_SKIP_BUILD_RPATH TRUE setting from main CMakeLists.txt
- Remove SKIP_BUILD_RPATH OFF property setting from src/CMakeLists.txt
- Reorder Guix script to check installed binaries instead of build tree binaries
- Remove unused CMake maintenance targets (check-security, check-symbols)
- Update TODO comments to reflect completed changes

This addresses the TODO items mentioned in:
- CMakeLists.txt:620
- src/CMakeLists.txt:412

Relevant discussions:
- hebasto#236 (comment)
- bitcoin#30312 (comment)
@151henry151
Copy link
Author

Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits

I'm still learning, but I think I did the squashing correctly now, hopefully! Thanks for your patience and hope I can be of some value to the project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants