Skip to content

Conversation

151henry151
Copy link
Owner

Summary

This PR removes deprecated CMake RPATH settings that are no longer needed after improvements to the Guix build process. These settings were originally added as workarounds for binary checks performed before installation, but are now redundant.

Changes

  • Remove CMAKE_SKIP_BUILD_RPATH TRUE from main CMakeLists.txt
  • Remove SKIP_BUILD_RPATH OFF property setting from src/CMakeLists.txt (bitcoin-chainstate executable)
  • Update TODO comments to reflect that these settings have been removed
  • Preserve NetBSD-specific logic - CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE is still needed for that platform

Background

These settings were originally added as workarounds for a specific issue in the Guix build system:

  1. Original Problem: Guix was performing binary checks (verifying executables) before the installation step
  2. Issue: During these checks, executables had RPATHs pointing to temporary build directories (e.g., /tmp/build/...)
  3. Workaround: Disable RPATH embedding during build so binaries wouldn't have these temporary paths

Why This Can Be Removed Now

Recent improvements to the build process have made these workarounds unnecessary:

Testing

  • Build verification: Successfully builds on Linux (Debian)
  • NetBSD preservation: NetBSD-specific RPATH logic remains intact
  • No functional changes: This is a cleanup that doesn't affect runtime behavior

Related Discussions

Checklist

  • This is a focused change (build system cleanup only)
  • No functional changes to Bitcoin Core behavior
  • Builds successfully on Linux
  • Preserves necessary platform-specific logic (NetBSD)
  • Updates relevant documentation/comments
  • Follows Bitcoin Core coding style guidelines

Notes for Reviewers

This is a straightforward cleanup PR that removes deprecated CMake settings. The changes are minimal and well-documented. The NetBSD-specific logic is preserved as it's still needed for that platform.

This addresses the TODO items mentioned in:

  • CMakeLists.txt:620
  • src/CMakeLists.txt:412

…settings

Remove deprecated CMake settings that are no longer needed after
reordering Guix script commands to perform binary checks after the
installation step.

Changes:
- Remove CMAKE_SKIP_BUILD_RPATH TRUE setting from main CMakeLists.txt
- Remove SKIP_BUILD_RPATH OFF property setting from src/CMakeLists.txt
- Update TODO comments to reflect that these settings have been removed

The NetBSD-specific logic for CMAKE_INSTALL_RPATH_USE_LINK_PATH is
preserved as it's still needed for that platform.

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

Relevant discussions:
- hebasto#236 (comment)
- bitcoin#30312 (comment)
@151henry151 151henry151 marked this pull request as ready for review August 23, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant