Skip to content

build: Prevent system header fallback and include path pollution#34143

Merged
fanquake merged 4 commits intobitcoin:masterfrom
hebasto:251223-boost-layout
Feb 11, 2026
Merged

build: Prevent system header fallback and include path pollution#34143
fanquake merged 4 commits intobitcoin:masterfrom
hebasto:251223-boost-layout

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Dec 23, 2025

Currently, header-only dependencies in the depends subsystem are installed into the standard include/ subdirectory. This inadvertently exposes their headers to the compiler via -I flags brought in by other dependencies (e.g., libevent or sqlite). This "include path pollution" masks missing dependencies in the build configuration. While the build might succeed by accident due to this overlap, it creates a fragile state. If the overlapping library is removed, the build will break, or, worse, the compiler may silently fall back to the host system's default paths (e.g., /usr/include).

This PR improves build system security and hygiene by enforcing strict, distinguished include paths for header-only dependencies. The missing dependencies revealed by this change (Boost::headers, USDT::headers) have been fixed in separate commits.

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 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/34143.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK theuni, fanquake
Concept ACK willcl-ark

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:

  • #34411 ([POC] Full Libevent removal 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.

@DrahtBot
Copy link
Contributor

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

File commit d861c38
(master)
commit fc47676
(pull/34143/merge)
*-aarch64-linux-gnu-debug.tar.gz f9d3466be61a6744... aa205a142b3e0679...
*-aarch64-linux-gnu.tar.gz eeba55f49bb0cea8... 1f63f2ac82a3a9d6...
*-arm-linux-gnueabihf-debug.tar.gz 377cb91a664d226d... 7382c420ee6d9afa...
*-arm-linux-gnueabihf.tar.gz e9439c9e75940962... f1d7d1df4e0b27e1...
*-arm64-apple-darwin-codesigning.tar.gz e24ade4558599abc... 36db4b587b2a1f80...
*-arm64-apple-darwin-unsigned.tar.gz 139e5c93b62e6bd9... 8a2c8c8c4ddecd97...
*-arm64-apple-darwin-unsigned.zip 7938b4588c399d57... 7601a21a0eb3b5ea...
*-powerpc64-linux-gnu-debug.tar.gz c673cfd562f48b6b... c5cf337561643c15...
*-powerpc64-linux-gnu.tar.gz 6089f3e1aeaff9f2... f0e69970d9148f61...
*-riscv64-linux-gnu-debug.tar.gz 81def88068aa605d... e0bcdda86d024735...
*-riscv64-linux-gnu.tar.gz ca77e2eeff5a7997... 1b276f8d8b508587...
*-x86_64-apple-darwin-codesigning.tar.gz 0c79942deef08bb4... 4445c35eabc5a5c0...
*-x86_64-apple-darwin-unsigned.tar.gz 6f6a22f4292aa086... 7e9725da2a01d31e...
*-x86_64-apple-darwin-unsigned.zip 9bd50bc5b804299f... cd302fca0fe6acf5...
*-x86_64-linux-gnu-debug.tar.gz a6f0a158b31947a7... 8832ff496bdef1c0...
*-x86_64-linux-gnu.tar.gz 152bfb79e73d6c5c... c314349c64f3b42f...
*.tar.gz 11c03cf932f54c54... 42bd5bfa5f3c093d...
SHA256SUMS.part 1d1e22a8c246fe3b... 5d7796eab94e93f7...
guix_build.log ec31c8f59d97cbaa... 97ab9e864bd8a123...
guix_build.log.diff 08e07a75cde5ff16...

@janb84
Copy link
Contributor

janb84 commented Dec 28, 2025

my Guix Build Output

Host architecture: aarch64
Commit: 2a6901529c73

5eb1bd5a15708f4270eebbbb8f9e7f7f431da2c8d69603826f47ac18e58b31fd  guix-build-2a6901529c73/output/aarch64-linux-gnu/SHA256SUMS.part
b46120b21bacb54cb999a7ee34906203b74a82a7a797adfaf5160ffe39df179f  guix-build-2a6901529c73/output/aarch64-linux-gnu/bitcoin-2a6901529c73-aarch64-linux-gnu-debug.tar.gz
8d0ab4938c9b3dab75d0a3c75b97aca6ed35644fcdd42eedd95b5b6152892285  guix-build-2a6901529c73/output/aarch64-linux-gnu/bitcoin-2a6901529c73-aarch64-linux-gnu.tar.gz
d61e0f3bdb67fb09bd95f9457f2e4fa5949b88045a21ec5519291ee6bea77051  guix-build-2a6901529c73/output/arm-linux-gnueabihf/SHA256SUMS.part
b0b1ded64d6f62e4e42fd24e8429a616d372b3d1302a041f73737b2593588558  guix-build-2a6901529c73/output/arm-linux-gnueabihf/bitcoin-2a6901529c73-arm-linux-gnueabihf-debug.tar.gz
004b14d5513ce82262cc9510401714a97af37522eff3481a0d70db581f06cd3c  guix-build-2a6901529c73/output/arm-linux-gnueabihf/bitcoin-2a6901529c73-arm-linux-gnueabihf.tar.gz
9dad3b1374d23171fa400dc286551ee61ac188bec14d576a038ed6de1820fd1a  guix-build-2a6901529c73/output/arm64-apple-darwin/SHA256SUMS.part
e101af1b0fd333d5e498da19278b00d844e44f14e46678804577124bd1d9eaef  guix-build-2a6901529c73/output/arm64-apple-darwin/bitcoin-2a6901529c73-arm64-apple-darwin-codesigning.tar.gz
b21d7e342bf3e3dbf4a30b547d0eab4c5482e6c48cafc7e52ed6ce84f274f771  guix-build-2a6901529c73/output/arm64-apple-darwin/bitcoin-2a6901529c73-arm64-apple-darwin-unsigned.tar.gz
57fe0760877802005946963d87c3a6b5849f3d03fd7ad412b2c55f345d0af163  guix-build-2a6901529c73/output/arm64-apple-darwin/bitcoin-2a6901529c73-arm64-apple-darwin-unsigned.zip
7f074c95551f7bbf9f23a85f0ad46aebf9a6069f17e3c89230257ae96b107338  guix-build-2a6901529c73/output/dist-archive/bitcoin-2a6901529c73.tar.gz
920dc7d726be94004b3003b7d0d1e7ac59ce1fe64275cc42712bb1fa63737e8d  guix-build-2a6901529c73/output/powerpc64-linux-gnu/SHA256SUMS.part
d3f6f76cc2df64b263612224efdbc5cda29960d939ed7fef56fdb2547618f23e  guix-build-2a6901529c73/output/powerpc64-linux-gnu/bitcoin-2a6901529c73-powerpc64-linux-gnu-debug.tar.gz
0970e286347486e9fef88f15e2409911d09fbbf2cf1d52e8a06a4cc247923e48  guix-build-2a6901529c73/output/powerpc64-linux-gnu/bitcoin-2a6901529c73-powerpc64-linux-gnu.tar.gz
1a9b469909c685d46aeea0668dff6f532570154e4f8abe7224d94c92ef28d1c5  guix-build-2a6901529c73/output/riscv64-linux-gnu/SHA256SUMS.part
c5a49c68ae6346d1510b497c483e25b04c1aac22f4b9580a15efb80c5590a3cb  guix-build-2a6901529c73/output/riscv64-linux-gnu/bitcoin-2a6901529c73-riscv64-linux-gnu-debug.tar.gz
2bd07c73dc5a13ee33d27db52d903a7f4a71fac45db7b636c37b02c6d3fb4b5f  guix-build-2a6901529c73/output/riscv64-linux-gnu/bitcoin-2a6901529c73-riscv64-linux-gnu.tar.gz
55b3a2b6258cb645547eb01c3ef46fcd97d4cb27ca8dd84c9c9a91ea1314cf81  guix-build-2a6901529c73/output/x86_64-apple-darwin/SHA256SUMS.part
8e52dc444786c392ac6010b6bb2c8d2536d8da4731a4ef87f211af548bf9dced  guix-build-2a6901529c73/output/x86_64-apple-darwin/bitcoin-2a6901529c73-x86_64-apple-darwin-codesigning.tar.gz
373ceed73edcc41a343d2bce9b3f6d36634ca873b5d53959464f89435417f585  guix-build-2a6901529c73/output/x86_64-apple-darwin/bitcoin-2a6901529c73-x86_64-apple-darwin-unsigned.tar.gz
80e3980143fd4d5d8728e660ff01d029c1a8aab69f9718decd0b2149e287d88d  guix-build-2a6901529c73/output/x86_64-apple-darwin/bitcoin-2a6901529c73-x86_64-apple-darwin-unsigned.zip
392c4d7911daf946bbf913ee27975bfda37693a992ca61794018e39c2fbad68f  guix-build-2a6901529c73/output/x86_64-linux-gnu/SHA256SUMS.part
6bc8ce0727114c65006e98392795d255ed74e2f7a2ebf9ea7518c369fe577fe3  guix-build-2a6901529c73/output/x86_64-linux-gnu/bitcoin-2a6901529c73-x86_64-linux-gnu-debug.tar.gz
95207f982880b179ec329efd8f0c8cee89868874953d7c8125c2fde44c1edf0f  guix-build-2a6901529c73/output/x86_64-linux-gnu/bitcoin-2a6901529c73-x86_64-linux-gnu.tar.gz
e269e1eae037b5c76f168945566c44d0695398f287ca6b131f789591ec88462c  guix-build-2a6901529c73/output/x86_64-w64-mingw32/SHA256SUMS.part
65961e3ab4f98f24db751802a58e1bb1640d956f3b0ae5ee081cef4a8fe897f4  guix-build-2a6901529c73/output/x86_64-w64-mingw32/bitcoin-2a6901529c73-win64-codesigning.tar.gz
928be5ef461640e856bb9ded3e40a2e8ef131beb8423aa930f43cec34a50a973  guix-build-2a6901529c73/output/x86_64-w64-mingw32/bitcoin-2a6901529c73-win64-debug.zip
5521ed52afad02466930117496741114e7c62792bac25fc707869711c4a115c8  guix-build-2a6901529c73/output/x86_64-w64-mingw32/bitcoin-2a6901529c73-win64-setup-unsigned.exe
adc5553e1a162662ef668093dba297874a075ddb04992c9f15b58e4fe2131e43  guix-build-2a6901529c73/output/x86_64-w64-mingw32/bitcoin-2a6901529c73-win64-unsigned.zip

@theuni
Copy link
Member

theuni commented Jan 20, 2026

Nice. Concept ACK to moving, but I'd like to explore something else before making this boost-specific.

Ideally, all packages would be installed to their own prefix so that no two include dirs are the same. As-is, we could (using your example) run into the same conflict between libevent and sqlite.

The reason depends uses a common prefix by default is that some depends packages depend on other depends packages (the qt/x11 ones, for example).

Since those are the exception rather than the rule, perhaps in the future it would be worth switching to per-package prefixes, and requiring the deps to specify dependent package prefixes where necessary.

For CMake packages, which is most these days (including boost), I wonder if we could do something like this instead:

diff --git a/depends/funcs.mk b/depends/funcs.mk
index 60e7889a4ec..921464b37ba 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -223,6 +223,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
                -DCMAKE_NM=`which $$($(1)_nm)` \
                -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
                -DCMAKE_INSTALL_LIBDIR=lib/ \
+               -DCMAKE_INSTALL_INCLUDEDIR=$(1)/include \
                -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
                -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
                -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE \

That way the package is still found in the depends root prefix, but each cmake dep gets its own include path.

A quick test shows that this works for boost but it's broken for zmq (doesn't find the includedir), libevent (doesn't install to the includedir), and libmultiprocess (not sure what the problem is there). Am I missing something, or are all of those really misbehaving?

@hebasto
Copy link
Member Author

hebasto commented Jan 21, 2026

For CMake packages, which is most these days (including boost), I wonder if we could do something like this instead:

diff --git a/depends/funcs.mk b/depends/funcs.mk
index 60e7889a4ec..921464b37ba 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -223,6 +223,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
                -DCMAKE_NM=`which $$($(1)_nm)` \
                -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \
                -DCMAKE_INSTALL_LIBDIR=lib/ \
+               -DCMAKE_INSTALL_INCLUDEDIR=$(1)/include \
                -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
                -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \
                -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE \

That way the package is still found in the depends root prefix, but each cmake dep gets its own include path.

A quick test shows that this works for boost but it's broken for zmq (doesn't find the includedir), libevent (doesn't install to the includedir), and libmultiprocess (not sure what the problem is there). Am I missing something, or are all of those really misbehaving?

This approach seems fragile to me, as CMAKE_INSTALL_INCLUDEDIR is defined in the GNUInstallDirs module, which might not be used by every package. For instance, it was introduced to libevent only in libevent/libevent#1397.

Regarding libzmq, a fix for the bug has been proposed in zeromq/libzmq#4832.

@theuni
Copy link
Member

theuni commented Jan 21, 2026

Ok, thanks for confirming.

FWIW, this does seem like the right thing for us to be doing, but apparently with CMake it's unlikely that a custom CMAKE_INSTALL_INCLUDEDIR will be respected for a majority of dependencies, so I agree that it's probably not worth the hassle of setting it for all packages.

As an alternative, according to their docs, Boost explicitly supports building with CMAKE_INSTALL_INCLUDEDIR. Specifying that would be more explicit about what's happening here, as opposed to using the versioned layout which just happens to do what we want. Any reason not to use that for the boost build and set it to a depends-specific subdir instead?

Either way, please add a comment about why we're setting the var.

@theuni
Copy link
Member

theuni commented Jan 21, 2026

Also, nice work on the fix for zmq :)

@hebasto hebasto changed the title build: Switch to "versioned" install layout for boost package and add missed Boost::headers build: Prevent system header fallback and include path pollution Jan 21, 2026
@hebasto
Copy link
Member Author

hebasto commented Jan 21, 2026

@theuni

Thank you for the review! Your feedback has been addressed.

Additionally, I applied the same approach to the systemtap package and fixed the related missing dependency.

The PR description has been updated.

@hebasto hebasto force-pushed the 251223-boost-layout branch from 2a69015 to 2921491 Compare January 21, 2026 22:40
@theuni
Copy link
Member

theuni commented Jan 22, 2026

Grr, the systemtap issue kinda reinforces my point about using CMAKE_INSTALL_INCLUDEDIR. Thinking about it more, it'd be nice to set that, fix (and upstream) the packages where it's broken, and ignore the ones where it's non-functional.

What do you think about:

  • Carrying the zmq patch
  • Fixing libmultiprocess/capnp (it's not clear to me where the issue lies)
  • Setting CMAKE_INSTALL_INCLUDEDIR globally?

Seems to me: worst case (like our libevent version) it's simply ignored, some cases it's broken so we fix and upstream, best case it actually catches things. Assuming carrying any necessary patches is trivial enough, I don't really see any downside?

@theuni
Copy link
Member

theuni commented Jan 22, 2026

Ugh, there are actually several libmultiprocess issues.

First, capnproto needs a fix:

diff --git a/c++/src/capnp/CMakeLists.txt b/c++/src/capnp/CMakeLists.txt
index 9980fde6..8b93617e 100644
--- a/c++/src/capnp/CMakeLists.txt
+++ b/c++/src/capnp/CMakeLists.txt
@@ -71,3 +71,3 @@ target_include_directories(capnp INTERFACE
   $<BUILD_INTERFACE:${PARENT_DIR}>
-  $<INSTALL_INTERFACE:include>
+  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
 )
diff --git a/c++/src/kj/CMakeLists.txt b/c++/src/kj/CMakeLists.txt
index 48c49b74..bf30b00b 100644
--- a/c++/src/kj/CMakeLists.txt
+++ b/c++/src/kj/CMakeLists.txt
@@ -91,3 +91,3 @@ target_include_directories(kj PUBLIC
   $<BUILD_INTERFACE:${PARENT_DIR}>
-  $<INSTALL_INTERFACE:include>
+  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
 )

Then, for some reason (I suspect I'm missing something else in capnproto), libmultiprocess still needs help finding them..

diff --git a/src/ipc/libmultiprocess/CMakeLists.txt b/src/ipc/libmultiprocess/CMakeLists.txt
index a36023b1810..89351deaecd 100644
--- a/src/ipc/libmultiprocess/CMakeLists.txt
+++ b/src/ipc/libmultiprocess/CMakeLists.txt
@@ -144,3 +144,4 @@ target_include_directories(mputil PRIVATE
   $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>)
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
+  $<BUILD_INTERFACE:${CAPNP_INCLUDE_DIRECTORY}>)
 target_link_libraries(mputil PUBLIC CapnProto::kj)
@@ -184,2 +185,3 @@ target_include_directories(multiprocess PUBLIC
   $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+  $<BUILD_INTERFACE:${CAPNP_INCLUDE_DIRECTORY}>
   $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

THEN, there's the issue of mpgen hard-coding capnproto include paths and not respecting CAPNP_EXECUTABLE/CAPNPC_CXX_EXECUTABLE.

I do think those things are worth fixing, but there's no need for that to get in the way of the other fixes.

Copy link
Member

@theuni theuni left a comment

Choose a reason for hiding this comment

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

utACK 2921491

@hebasto
Copy link
Member Author

hebasto commented Jan 22, 2026

Ugh, there are actually several libmultiprocess issues.

cc @ryanofsky

@hebasto
Copy link
Member Author

hebasto commented Jan 25, 2026

My Guix build:

$ uname -m && find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
x86_64
00edb8bb6e51e78b33fb11fdcdf9b2f45c4c14fa8f7ffa1268a5bf4053fa07a5  guix-build-29214919fa03/output/aarch64-linux-gnu/SHA256SUMS.part
0a552b9e4c7ba85ecdf25f078e3fa6ba8dd6329ba9d8e14986ca172e39da3c5d  guix-build-29214919fa03/output/aarch64-linux-gnu/bitcoin-29214919fa03-aarch64-linux-gnu-debug.tar.gz
2b95b3f8d096a61a0d8aca91ceb23f215ff19b18d69402806dfe856ac66ae20d  guix-build-29214919fa03/output/aarch64-linux-gnu/bitcoin-29214919fa03-aarch64-linux-gnu.tar.gz
efd64763669cc57e7e28a9c101ac2b87f9dff9b3d527985870672c142ffb72ef  guix-build-29214919fa03/output/arm-linux-gnueabihf/SHA256SUMS.part
52adf5c3a7b121f940af71609c3934b2b458538ac9ce4f467aca01222463861f  guix-build-29214919fa03/output/arm-linux-gnueabihf/bitcoin-29214919fa03-arm-linux-gnueabihf-debug.tar.gz
f01545f641da70335d648a451aff49ca20743ba0ab9c90dc071bb268517cc494  guix-build-29214919fa03/output/arm-linux-gnueabihf/bitcoin-29214919fa03-arm-linux-gnueabihf.tar.gz
8d0c103124e1de45a20ab9bccb5f6e472cf66b75754f693f1d7048b09badc9ef  guix-build-29214919fa03/output/arm64-apple-darwin/SHA256SUMS.part
0905f370b495568ac12aad2b23aabbaa066aa0cf21db1f2ba8ec5d4604e57370  guix-build-29214919fa03/output/arm64-apple-darwin/bitcoin-29214919fa03-arm64-apple-darwin-codesigning.tar.gz
014e516279b4f44115b050ea8e680fadf998e0e7f17996300df2739e6e005524  guix-build-29214919fa03/output/arm64-apple-darwin/bitcoin-29214919fa03-arm64-apple-darwin-unsigned.tar.gz
7b0b8960049861848e6c6d3e047c3b16aa9f8746b58a24286db94c5732cb28c6  guix-build-29214919fa03/output/arm64-apple-darwin/bitcoin-29214919fa03-arm64-apple-darwin-unsigned.zip
e6f09db4402fd396e1247006d7e1e3eb014f32f8d7ea92ae7dfa6e656b64e2c8  guix-build-29214919fa03/output/dist-archive/bitcoin-29214919fa03.tar.gz
1247c558e878d061674289fe64ce5f6caa5104b4c7076493895ac8217a198ef5  guix-build-29214919fa03/output/powerpc64-linux-gnu/SHA256SUMS.part
879a4bb92073c1b379fd68e84811cb3d8eed75b393a5d34b090ea317fa1a1b44  guix-build-29214919fa03/output/powerpc64-linux-gnu/bitcoin-29214919fa03-powerpc64-linux-gnu-debug.tar.gz
174545a07eb9abecb6d86e2acc5547d52cc6ae1561300536ee9f0d88b092bf4e  guix-build-29214919fa03/output/powerpc64-linux-gnu/bitcoin-29214919fa03-powerpc64-linux-gnu.tar.gz
fed409926b48e18f0b430dcdf92e908c69210deccc1f9502c7f0228eb369223d  guix-build-29214919fa03/output/riscv64-linux-gnu/SHA256SUMS.part
592ea33e41adc0d28600703b911e05135c3dd22512f0c0f2f4703d0a060b13cd  guix-build-29214919fa03/output/riscv64-linux-gnu/bitcoin-29214919fa03-riscv64-linux-gnu-debug.tar.gz
43b0d5a08957fa2c7bc7190ce4720b8b228a4104d9adddc30aa34f8de12ffe2f  guix-build-29214919fa03/output/riscv64-linux-gnu/bitcoin-29214919fa03-riscv64-linux-gnu.tar.gz
1cd29f87eb9233e19a67f65f8d1025f897b7b8a0c9a9d2972e5903b66a8aec3d  guix-build-29214919fa03/output/x86_64-apple-darwin/SHA256SUMS.part
515e4a37184426d9f1bc4b47f714a73e7b276fc61813d93bd1c787925704735d  guix-build-29214919fa03/output/x86_64-apple-darwin/bitcoin-29214919fa03-x86_64-apple-darwin-codesigning.tar.gz
b42186929bcbe6fa178cae8205902aa880b7e96b92e1b7f5c28466e998e666f3  guix-build-29214919fa03/output/x86_64-apple-darwin/bitcoin-29214919fa03-x86_64-apple-darwin-unsigned.tar.gz
dea2dad5d055fd9b827b4aa37f7d9eb7d19993331967fe0d0024acee86bd77f2  guix-build-29214919fa03/output/x86_64-apple-darwin/bitcoin-29214919fa03-x86_64-apple-darwin-unsigned.zip
74d5847668219c17618805416dcf28cf3200388f9e91b08d30de3670e9f3dd23  guix-build-29214919fa03/output/x86_64-linux-gnu/SHA256SUMS.part
ac0d537d45aa5459ab6ca5ba6583da1540f87b8d38a0b5bf68e055316b41aef7  guix-build-29214919fa03/output/x86_64-linux-gnu/bitcoin-29214919fa03-x86_64-linux-gnu-debug.tar.gz
734d88f2cb29f0cc54cc6ccd8ee6246d5ec9030eee0f5cfaa5b715fe5c2c064e  guix-build-29214919fa03/output/x86_64-linux-gnu/bitcoin-29214919fa03-x86_64-linux-gnu.tar.gz
e2340ccd2838455955ff4396ac2b63738727d6354a75b31bab3f115cf4ffb748  guix-build-29214919fa03/output/x86_64-w64-mingw32/SHA256SUMS.part
6bb522e50ddf922cc2ae457fa683189a5c86e212fd541df4f830cd7ca3a49cc5  guix-build-29214919fa03/output/x86_64-w64-mingw32/bitcoin-29214919fa03-win64-codesigning.tar.gz
a6b12c9d9a1e548ce4c8532e30644b4a4fa43c9d97457af8ad26aedd34c718e2  guix-build-29214919fa03/output/x86_64-w64-mingw32/bitcoin-29214919fa03-win64-debug.zip
122eb2f3debb9bed5ff9b14ec3c02a8f4394a45351735f85555822d0d9c79aeb  guix-build-29214919fa03/output/x86_64-w64-mingw32/bitcoin-29214919fa03-win64-setup-unsigned.exe
fca881a9d2a4b60e8467c17b15d030ce02497698db43ecb0204cbd5f4814be0d  guix-build-29214919fa03/output/x86_64-w64-mingw32/bitcoin-29214919fa03-win64-unsigned.zip

hebasto added a commit that referenced this pull request Feb 5, 2026
a50d0b6 build: don't pass on boost dependency to kernel consumers (Cory Fields)

Pull request description:

  This is unnecessary now that the kernel now exports a (boost-less) API.

  Noticed while slimming down boost dependencies in #34495.

ACKs for top commit:
  stickies-v:
    ACK a50d0b6
  hebasto:
    ACK a50d0b6, I have reviewed the code and it looks OK. I tested it by applying the Boost-specifc commits from #34143 and building with depends.

Tree-SHA512: e2d12356f41dd51dd729362121a33bd4f395821d53dd9a0bb0d5d6a53aba2ca2064e0709d9799dc6751b3d61ea576d2efc0e28296fdba26f2809dbcb0feabe44
@hebasto hebasto force-pushed the 251223-boost-layout branch from 2921491 to 65134c7 Compare February 5, 2026 13:46
@hebasto
Copy link
Member Author

hebasto commented Feb 5, 2026

Rebased.

@hebasto
Copy link
Member Author

hebasto commented Feb 5, 2026

My Guix build:

$ uname -m && find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
aarch64
d763a6657762eb0c77192c722c48bdd57473f5aa9cd12c3ac4e88fe509fbf130  guix-build-65134c7e5f99/output/aarch64-linux-gnu/SHA256SUMS.part
cebab577dd7a29ed13e20c6f3996062fd51caa9af33b15170094b1708318e770  guix-build-65134c7e5f99/output/aarch64-linux-gnu/bitcoin-65134c7e5f99-aarch64-linux-gnu-debug.tar.gz
ac0bbeeba7cfcc3618fc8e0f745747cace8505d1d7d23568d5707bdd5911897e  guix-build-65134c7e5f99/output/aarch64-linux-gnu/bitcoin-65134c7e5f99-aarch64-linux-gnu.tar.gz
553a97634cae34da03f4c2d4173b38cad8a40fc2562b777faffbfbb624dbe245  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/SHA256SUMS.part
ea8826e63a9d8ecaf71249019a33932ab58497dd1b3c11a936cf94ee55727d51  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/bitcoin-65134c7e5f99-arm-linux-gnueabihf-debug.tar.gz
689235f63a2d80642225963d70cb5b902664a80066e2d61131d9345d5cd83ab2  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/bitcoin-65134c7e5f99-arm-linux-gnueabihf.tar.gz
037fb650bf5f5c727e9577e0ff5072e32bd2b448fac2fdc23dba34fbc539e6f0  guix-build-65134c7e5f99/output/arm64-apple-darwin/SHA256SUMS.part
eb29f6eb0f738a9a53d76811e2fb66b90c4fa8df4cb661c30c25527157106d7e  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-codesigning.tar.gz
b8ea38b5ebd7a115eb7b08ea1343dc936e45ff29db0b14aacdc8a9d38a5d0eb8  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-unsigned.tar.gz
4bee904bebcc0cf5a02081497563661b6c3927219e60e010694a9f4b2abf9e38  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-unsigned.zip
e051ec06ccde1de606888e5a4d13764ccdd2aa1e7d9441d68e114ea3592195fe  guix-build-65134c7e5f99/output/dist-archive/bitcoin-65134c7e5f99.tar.gz
5b09df6197915666a387b68bf3a7755d0ec6e9472fc4cdd03405e44395d32d94  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/SHA256SUMS.part
3a0febf69d84c2bbe3309f0fb5de5d03edbad06d02432e36efc9bda8a9b6b1ce  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/bitcoin-65134c7e5f99-powerpc64-linux-gnu-debug.tar.gz
8ebe707831982e17fa27a06af9347c0673c3e8d1e6e677a770cf899533270123  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/bitcoin-65134c7e5f99-powerpc64-linux-gnu.tar.gz
53127892268ff5d9f477de376d8b571bab2cdb7bb36c5f164c243775fb79c349  guix-build-65134c7e5f99/output/riscv64-linux-gnu/SHA256SUMS.part
bbbb8912ebcdf3c1212757d1e45920e25f589cfc9063483cf304c6ee5c32782e  guix-build-65134c7e5f99/output/riscv64-linux-gnu/bitcoin-65134c7e5f99-riscv64-linux-gnu-debug.tar.gz
2b243d05774a7ea5f25fe3b836062c0554756cbd35ce451dede48b547782f5a1  guix-build-65134c7e5f99/output/riscv64-linux-gnu/bitcoin-65134c7e5f99-riscv64-linux-gnu.tar.gz
66afccee5ff0632c287af0e1db159d444a46e46d4d95166c68c5926afb468179  guix-build-65134c7e5f99/output/x86_64-apple-darwin/SHA256SUMS.part
6e1e4adff095097df241a493bbdc4a590fd83a6157791ae39fb57d99f7479f15  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-codesigning.tar.gz
c87beeb30256230c02569aa65c4623b6931b481e9b8a51adca89be6f2ea9e964  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-unsigned.tar.gz
150b416cf9112afee5c8d8b8c399b3074f2c126a0f4d55d12df032ecf05db23e  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-unsigned.zip
2795f17576ffac773fa094e3a610663583080629cc2043e8a40a2c4cf7c83bec  guix-build-65134c7e5f99/output/x86_64-linux-gnu/SHA256SUMS.part
2a9ef15547c143b4be2781e398f469a0a1c04822312e3d252bf5ced4a15e5a3d  guix-build-65134c7e5f99/output/x86_64-linux-gnu/bitcoin-65134c7e5f99-x86_64-linux-gnu-debug.tar.gz
9e95a377d89ac10733678dd9482e230aba88fcff162f160f3f1da46dcb177f54  guix-build-65134c7e5f99/output/x86_64-linux-gnu/bitcoin-65134c7e5f99-x86_64-linux-gnu.tar.gz
e5b9f32aa1589cb56672d2e0ae20d8e396ab2bc54dcfe3fea3bb2ab2faf3b768  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/SHA256SUMS.part
1eed3bf1fb9053b1a5fee4447fcbb5e999992d6f29ea7c518581cddc15c06e1f  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-codesigning.tar.gz
658b17a936192ac454bc0bba5c3de25b3d8aea335a8b810a19d661c7545e0ef4  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-debug.zip
f0aa03aa664b3198092a7ff908dd326233daebc13ec1f74741e386aa8fba9c6a  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-setup-unsigned.exe
21e9d4a1e5528d0d0cdc34b0aabb54d887f4b3d3d2f092d5b0c516de0f4c5f9a  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-unsigned.zip

@fanquake
Copy link
Member

fanquake commented Feb 9, 2026

Guix Build (x86_64):

d763a6657762eb0c77192c722c48bdd57473f5aa9cd12c3ac4e88fe509fbf130  guix-build-65134c7e5f99/output/aarch64-linux-gnu/SHA256SUMS.part
cebab577dd7a29ed13e20c6f3996062fd51caa9af33b15170094b1708318e770  guix-build-65134c7e5f99/output/aarch64-linux-gnu/bitcoin-65134c7e5f99-aarch64-linux-gnu-debug.tar.gz
ac0bbeeba7cfcc3618fc8e0f745747cace8505d1d7d23568d5707bdd5911897e  guix-build-65134c7e5f99/output/aarch64-linux-gnu/bitcoin-65134c7e5f99-aarch64-linux-gnu.tar.gz
553a97634cae34da03f4c2d4173b38cad8a40fc2562b777faffbfbb624dbe245  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/SHA256SUMS.part
ea8826e63a9d8ecaf71249019a33932ab58497dd1b3c11a936cf94ee55727d51  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/bitcoin-65134c7e5f99-arm-linux-gnueabihf-debug.tar.gz
689235f63a2d80642225963d70cb5b902664a80066e2d61131d9345d5cd83ab2  guix-build-65134c7e5f99/output/arm-linux-gnueabihf/bitcoin-65134c7e5f99-arm-linux-gnueabihf.tar.gz
037fb650bf5f5c727e9577e0ff5072e32bd2b448fac2fdc23dba34fbc539e6f0  guix-build-65134c7e5f99/output/arm64-apple-darwin/SHA256SUMS.part
eb29f6eb0f738a9a53d76811e2fb66b90c4fa8df4cb661c30c25527157106d7e  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-codesigning.tar.gz
b8ea38b5ebd7a115eb7b08ea1343dc936e45ff29db0b14aacdc8a9d38a5d0eb8  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-unsigned.tar.gz
4bee904bebcc0cf5a02081497563661b6c3927219e60e010694a9f4b2abf9e38  guix-build-65134c7e5f99/output/arm64-apple-darwin/bitcoin-65134c7e5f99-arm64-apple-darwin-unsigned.zip
e051ec06ccde1de606888e5a4d13764ccdd2aa1e7d9441d68e114ea3592195fe  guix-build-65134c7e5f99/output/dist-archive/bitcoin-65134c7e5f99.tar.gz
5b09df6197915666a387b68bf3a7755d0ec6e9472fc4cdd03405e44395d32d94  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/SHA256SUMS.part
3a0febf69d84c2bbe3309f0fb5de5d03edbad06d02432e36efc9bda8a9b6b1ce  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/bitcoin-65134c7e5f99-powerpc64-linux-gnu-debug.tar.gz
8ebe707831982e17fa27a06af9347c0673c3e8d1e6e677a770cf899533270123  guix-build-65134c7e5f99/output/powerpc64-linux-gnu/bitcoin-65134c7e5f99-powerpc64-linux-gnu.tar.gz
53127892268ff5d9f477de376d8b571bab2cdb7bb36c5f164c243775fb79c349  guix-build-65134c7e5f99/output/riscv64-linux-gnu/SHA256SUMS.part
bbbb8912ebcdf3c1212757d1e45920e25f589cfc9063483cf304c6ee5c32782e  guix-build-65134c7e5f99/output/riscv64-linux-gnu/bitcoin-65134c7e5f99-riscv64-linux-gnu-debug.tar.gz
2b243d05774a7ea5f25fe3b836062c0554756cbd35ce451dede48b547782f5a1  guix-build-65134c7e5f99/output/riscv64-linux-gnu/bitcoin-65134c7e5f99-riscv64-linux-gnu.tar.gz
66afccee5ff0632c287af0e1db159d444a46e46d4d95166c68c5926afb468179  guix-build-65134c7e5f99/output/x86_64-apple-darwin/SHA256SUMS.part
6e1e4adff095097df241a493bbdc4a590fd83a6157791ae39fb57d99f7479f15  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-codesigning.tar.gz
c87beeb30256230c02569aa65c4623b6931b481e9b8a51adca89be6f2ea9e964  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-unsigned.tar.gz
150b416cf9112afee5c8d8b8c399b3074f2c126a0f4d55d12df032ecf05db23e  guix-build-65134c7e5f99/output/x86_64-apple-darwin/bitcoin-65134c7e5f99-x86_64-apple-darwin-unsigned.zip
2795f17576ffac773fa094e3a610663583080629cc2043e8a40a2c4cf7c83bec  guix-build-65134c7e5f99/output/x86_64-linux-gnu/SHA256SUMS.part
2a9ef15547c143b4be2781e398f469a0a1c04822312e3d252bf5ced4a15e5a3d  guix-build-65134c7e5f99/output/x86_64-linux-gnu/bitcoin-65134c7e5f99-x86_64-linux-gnu-debug.tar.gz
9e95a377d89ac10733678dd9482e230aba88fcff162f160f3f1da46dcb177f54  guix-build-65134c7e5f99/output/x86_64-linux-gnu/bitcoin-65134c7e5f99-x86_64-linux-gnu.tar.gz
e5b9f32aa1589cb56672d2e0ae20d8e396ab2bc54dcfe3fea3bb2ab2faf3b768  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/SHA256SUMS.part
1eed3bf1fb9053b1a5fee4447fcbb5e999992d6f29ea7c518581cddc15c06e1f  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-codesigning.tar.gz
658b17a936192ac454bc0bba5c3de25b3d8aea335a8b810a19d661c7545e0ef4  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-debug.zip
f0aa03aa664b3198092a7ff908dd326233daebc13ec1f74741e386aa8fba9c6a  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-setup-unsigned.exe
21e9d4a1e5528d0d0cdc34b0aabb54d887f4b3d3d2f092d5b0c516de0f4c5f9a  guix-build-65134c7e5f99/output/x86_64-w64-mingw32/bitcoin-65134c7e5f99-win64-unsigned.zip

@theuni
Copy link
Member

theuni commented Feb 10, 2026

re-ACK 65134c7

This was necessary to properly test #34495 and #34496.

@fanquake fanquake added this to the 31.0 milestone Feb 10, 2026
@willcl-ark
Copy link
Member

Concept ACK.

Just bumped into Boost::headers missing for bitcoin_ipc yesterday when testing switching out brew installs in the macos CI jobs in this branch. Seems like as brew include dir is in the default compiler search path this slipped by unnoticed.

@janb84
Copy link
Contributor

janb84 commented Feb 11, 2026

my guix build on nixos 25.11 aarch64 crashes for: riscv64-linux-gnu

Details
g++  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2     -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -fno-PIE -I. -I. -I../../gcc-14.3.0/gcc -I../../gcc-14.3.0/gcc/. -I../../gcc-14.3.0/gcc/../include  -I../../gcc-14.3.0/gcc/../libcpp/include -I../../gcc-14.3.0/gcc/../libcody  -I../../gcc-14.3.0/gcc/../libdecnumber -I../../gcc-14.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-14.3.0/gcc/../libbacktrace   -o cc1plus-checksum.o -MT cc1plus-checksum.o -MMD -MP -MF ./.deps/cc1plus-checksum.TPo cc1plus-checksum.cc
g++ -no-pie -Wl,-z,now   -g -O2     -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -no-pie -Wl,-z,now -static-libstdc++ -static-libgcc  -o cc1plus \
      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/coroutines.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/contracts.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/mapper-client.o cp/mapper-resolver.o cp/method.o cp/module.o cp/name-lookup.o cp/optimize.o cp/parser.o cp/pt.o cp/ptree.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o glibc-c.o cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcody/libcody.a  \
	libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr -lgmp -rdynamic  -lz 
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
make[2]: *** [../../gcc-14.3.0/gcc/cp/Make-lang.in:145: cc1plus] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/guix-build-gcc-cross-riscv64-linux-gnu-14.3.0.drv-0/build/gcc'
make[1]: *** [Makefile:4695: all-gcc] Error 2
make[1]: Leaving directory '/tmp/guix-build-gcc-cross-riscv64-linux-gnu-14.3.0.drv-0/build'
make: *** [Makefile:1059: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "9" "FLAGS_FOR_TARGET=-B/gnu/store/rhqlqkgrvfkmhgp593yqyq3q8sdkp6id-glibc-cross-riscv64-linux-gnu-2.31/lib" "CFLAGS=-g0 -O2") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 364.4 seconds
command "make" "-j" "9" "FLAGS_FOR_TARGET=-B/gnu/store/rhqlqkgrvfkmhgp593yqyq3q8sdkp6id-glibc-cross-riscv64-linux-gnu-2.31/lib" "CFLAGS=-g0 -O2" failed with status 2
build process 11 exited with status 256

tried this 3 times, 2 clean starts (restore vm) and 1 restart of the build. On this PR 3 other hosts builded before crash. This nixos instance builds other PR's fine.

@fanquake
Copy link
Member

fanquake commented Feb 11, 2026

my guix build on nixos 25.11 aarch64 crashes for:

This very much looks like resource exhaustion/OOM. Note that it's dying while compiling gcc-cross-riscv64-linux-gnu-14.3.0, so any changes in this PR, shouldn't be related.

@janb84
Copy link
Contributor

janb84 commented Feb 11, 2026

my guix build on nixos 25.11 aarch64 crashes for:

This very much looks like resource exhaustion/OOM. Note that it's dying while compiling gcc-cross-riscv64-linux-gnu-14.3.0, so any changes in this PR, shouldn't be related.

Retested with increased available memory to ~16GB (+5GB) and it builds successful. Thanks

@fanquake
Copy link
Member

ACK 65134c7

@DrahtBot DrahtBot requested a review from willcl-ark February 11, 2026 17:41
@fanquake fanquake merged commit 55c49ff into bitcoin:master Feb 11, 2026
27 checks passed
@hebasto hebasto deleted the 251223-boost-layout branch February 11, 2026 17:44
$(package)_config_opts += -DBUILD_TESTING=OFF
$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON
# Install to a unique path to prevent accidental inclusion via other dependencies' -I flags.
$(package)_config_opts += -DCMAKE_INSTALL_INCLUDEDIR=$(package)/include
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently, this breaks builds on NetBSD due to a hack introduced in 5a5ddbd.

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