#36060 build: require KJ exception support for IPC
https://github.com/bitcoin/bitcoin/pull/36060 · · +179/-0 in 12 files, 3 commits · labels: Build system · draft
Goal
- Prevent obscure build and link failures when building with IPC enabled
- Catch missing library exception handling early during build configuration
This PR adds CMake checks during configuration to verify that both the compiler and the installed libkj provide C++ exception support when ENABLE_IPC is active. It also explicitly sets KJ_NO_EXCEPTIONS=0 in the depends capnproto recipes and on internal IPC targets, updating build documentation across BSD and Unix platforms.
Problem: IPC relies on libkj exception support in runCatchingExceptions, but libkj can be compiled with exceptions disabled or misdetect compiler capabilities, causing obscure build failures when IPC is enabled.
Category: Build and CI (#35 of 55)
P3 · platform fix
- P3 because it diagnoses missing library exception support at configure time
- Avoids obscure link-time failures for developers compiling with IPC support
Improves build configuration robustness for users compiling with optional IPC support by diagnosing missing exception symbols early instead of encountering cryptic link-time errors.
Membership: Adds CMake configure checks in cmake/module/CheckKjExceptions.cmake and modifies depends package recipes for capnproto.
Factors: security/stability 0, bug 1, performance 0, user value 0, leverage 1
Category: IPC / multiprocess (#10 of 20)
P3 · platform fix
- P3 because it ensures the multiprocess build environment meets required exception handling needs
- Prevents dependency configuration errors when building multiprocess components
Addresses an IPC dependency requirement where runCatchingExceptions relies on getCaughtExceptionAsKj, ensuring the multiprocess build environment is correctly configured.
Membership: Directly adjusts compile definitions for IPC targets and handles libmultiprocess capnproto dependency requirements.
Factors: security/stability 0, bug 1, performance 0, user value 0, leverage 1
Reviewability: Ready
- Ready for review now with clean CI and complete commits
The PR has complete commits, passes CI, and has no unresolved reviewer requests.
Author status: silent since opening draft
Agreement: Crickets
- No reviews or comments yet
- Awaiting initial community feedback after being opened as draft
No reviews or comments yet
The PR is in draft and has received no feedback since being opened.
Review verdicts (DrahtBot): 0
Files
0 lines under test/bench/ci.
- cmake/module/CheckKjExceptions.cmake +133/-0
- CMakeLists.txt +13/-0
- cmake/libmultiprocess.cmake +11/-0
- src/ipc/CMakeLists.txt +10/-0
- doc/build-netbsd.md +3/-0
- src/ipc/test/fuzz/CMakeLists.txt +3/-0
- depends/packages/capnp.mk +1/-0
- depends/packages/native_capnp.mk +1/-0
- doc/build-freebsd.md +1/-0
- doc/build-openbsd.md +1/-0
- doc/build-osx.md +1/-0
- doc/build-unix.md +1/-0
Card
This PR ensures that C++ exception support is verified at configure time when building with IPC enabled, failing early with clear instructions if libkj or the compiler lacks it. It also explicitly builds capnproto in depends with exception support enabled and adds the appropriate preprocessor macro to internal IPC targets. The problem primarily affects developers building the experimental multiprocess targets against varying system capnproto packages. The PR is currently a draft with passing CI and no review activity.