IPC needs libkj built with exception support; runCatchingExceptions depends on getCaughtExceptionAsKj, which is omitted when KJ_NO_EXCEPTIONS is set.
Build depends capnproto with -DKJ_NO_EXCEPTIONS=0. Fail configure if the compiler or the installed libkj lacks exception support. Define the same macro privately on in-tree IPC targets so our headers match the library.
Addresses #36058
Tested with:
make -C depends NO_QT=1 NO_QR=1 -j$(nproc) — passed
cmake -B /tmp/btc-36058-deptc --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake -DBUILD_GUI=OFF -DBUILD_BENCH=OFF -DBUILD_TESTS=ON -DBUILD_FUZZ_BINARY=ON — passed
cmake --build /tmp/btc-36058-deptc --target bitcoin_ipc multiprocess mputil mpgen bitcoin_ipc_test bitcoin_ipc_fuzz mptest bitcoind bitcoin-node bitcoin-cli bitcoin test_bitcoin fuzz — passed
mptest — 16 passed
test_bitcoin --run_test=ipc_tests — passed
interface_ipc.py — passed
interface_ipc_cli.py — passed
interface_ipc_mining.py — passed
cmake -DENABLE_IPC=OFF — passed
cmake -DENABLE_IPC=ON -DCMAKE_CXX_FLAGS=-fno-exceptions — configure fails (compiler probe)
cmake -DENABLE_IPC=ON -DWITH_EXTERNAL_LIBMULTIPROCESS=ON -DCMAKE_PREFIX_PATH=/tmp/mp-ext-prefix — passed
test/lint/git-subtree-check.sh src/ipc/libmultiprocess — GOOD