{
 "number": 36060,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36060",
 "title": "build: require KJ exception support for IPC",
 "author": "151henry151",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-08-24T03:25:17Z",
 "updated_at": "2026-08-25T10:22:39Z",
 "age_days": 24,
 "draft": true,
 "labels": [
  "Build system"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "68bee5832cd8bc21c928ac7e3c27dc7673424362",
 "head_ref": "36058-kj-exceptions",
 "head_repo": "151henry151/bitcoin",
 "head_history": [],
 "additions": 179,
 "deletions": 0,
 "changed_files": 12,
 "commit_count": 3,
 "size_bucket": "M",
 "mergeable_state": "blocked",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": [
    {
     "number": 32387,
     "title": "ipc: add windows support",
     "author": "ryanofsky"
    }
   ]
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": []
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "blocked",
  "last_author_activity": "2026-08-24T03:14:52Z",
  "last_reviewer_activity": null,
  "last_reviewer": null,
  "author_silent_days": 24,
  "waiting_on_author_days": 0,
  "days_since_update": 23
 },
 "refs": {
  "mentioned": [
   36058
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 36058,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "[RFC] ipc: Check / enforce exception support"
   }
  ],
  "conflicts": [
   32387
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "IPC needs libkj built with exception support; runCatchingExceptions depends on getCaughtExceptionAsKj, which is omitted when KJ_NO_EXCEPTIONS is set.\n\nBuild 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.\n\nAddresses #36058\n\nTested with:\n`make -C depends NO_QT=1 NO_QR=1 -j$(nproc)` \u2014 passed\n`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` \u2014 passed\n`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` \u2014 passed\n`mptest` \u2014 16 passed\n`test_bitcoin --run_test=ipc_tests` \u2014 passed\n`interface_ipc.py` \u2014 passed\n`interface_ipc_cli.py` \u2014 passed\n`interface_ipc_mining.py` \u2014 passed\n`cmake -DENABLE_IPC=OFF` \u2014 passed\n`cmake -DENABLE_IPC=ON -DCMAKE_CXX_FLAGS=-fno-exceptions` \u2014 configure fails (compiler probe)\n`cmake -DENABLE_IPC=ON -DWITH_EXTERNAL_LIBMULTIPROCESS=ON -DCMAKE_PREFIX_PATH=/tmp/mp-ext-prefix` \u2014 passed\n`test/lint/git-subtree-check.sh src/ipc/libmultiprocess` \u2014 GOOD",
 "commits": [
  {
   "sha": "4f71358ccbbe789bd26b87153e946e2390fe4eeb",
   "date": "2026-08-24T01:51:14Z",
   "message": "depends: pin KJ_NO_EXCEPTIONS=0 when building capnproto\n\nAlso pin native_capnp, which host mpgen links."
  },
  {
   "sha": "34201d5fb0274cbe89a2d6ea67d8221930dd7e8c",
   "date": "2026-08-24T03:14:52Z",
   "message": "cmake: check KJ exception support when ENABLE_IPC is on\n\nThe check is in Core cmake because src/ipc/libmultiprocess is a\nsubtree. Fail if the compiler cannot throw or libkj lacks\ngetCaughtExceptionAsKj. Header autodetection is not a configure\nfailure. Look up libkj next to the scraped headers so depends\nand system copies cannot be mixed. The compiler probe uses\nCMAKE_CXX_FLAGS; target-level -fno-exceptions would not trip it."
  },
  {
   "sha": "68bee5832cd8bc21c928ac7e3c27dc7673424362",
   "date": "2026-08-24T03:14:52Z",
   "message": "cmake: define KJ_NO_EXCEPTIONS=0 on in-tree IPC targets\n\nPRIVATE so the define is not exported. Skip\nWITH_EXTERNAL_LIBMULTIPROCESS; those TUs are already compiled.\nApply to bitcoin_ipc, bitcoin_ipc_test, bitcoin_ipc_fuzz, the\nin-tree mp targets, and fuzz (which compiles ipc.cpp with kj\nheaders)."
  }
 ],
 "timeline": [],
 "labels_log": [
  {
   "t": "2026-08-24T03:25:21Z",
   "action": "labeled",
   "label": "Build system",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 2152,
 "text_tokens_estimate": 538,
 "changed_paths": [
  "CMakeLists.txt",
  "cmake/libmultiprocess.cmake",
  "cmake/module/CheckKjExceptions.cmake",
  "depends/packages/capnp.mk",
  "depends/packages/native_capnp.mk",
  "doc/build-freebsd.md",
  "doc/build-netbsd.md",
  "doc/build-openbsd.md",
  "doc/build-osx.md",
  "doc/build-unix.md",
  "src/ipc/CMakeLists.txt",
  "src/ipc/test/fuzz/CMakeLists.txt"
 ],
 "files": [
  {
   "path": "CMakeLists.txt",
   "add": 13,
   "del": 0
  },
  {
   "path": "cmake/libmultiprocess.cmake",
   "add": 11,
   "del": 0
  },
  {
   "path": "cmake/module/CheckKjExceptions.cmake",
   "add": 133,
   "del": 0
  },
  {
   "path": "depends/packages/capnp.mk",
   "add": 1,
   "del": 0
  },
  {
   "path": "depends/packages/native_capnp.mk",
   "add": 1,
   "del": 0
  },
  {
   "path": "doc/build-freebsd.md",
   "add": 1,
   "del": 0
  },
  {
   "path": "doc/build-netbsd.md",
   "add": 3,
   "del": 0
  },
  {
   "path": "doc/build-openbsd.md",
   "add": 1,
   "del": 0
  },
  {
   "path": "doc/build-osx.md",
   "add": 1,
   "del": 0
  },
  {
   "path": "doc/build-unix.md",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/ipc/CMakeLists.txt",
   "add": 10,
   "del": 0
  },
  {
   "path": "src/ipc/test/fuzz/CMakeLists.txt",
   "add": 3,
   "del": 0
  }
 ],
 "test_lines": 0,
 "git": {
  "head": "68bee5832cd8bc21c928ac7e3c27dc7673424362",
  "head_matches_backup": true,
  "base": "58a7869f860f022e6163dc3fae3106a0599830c5",
  "commits": [
   {
    "sha": "4f71358ccb",
    "subject": "depends: pin KJ_NO_EXCEPTIONS=0 when building capnproto",
    "files": 2,
    "add": 2,
    "del": 0
   },
   {
    "sha": "34201d5fb0",
    "subject": "cmake: check KJ exception support when ENABLE_IPC is on",
    "files": 8,
    "add": 160,
    "del": 0
   },
   {
    "sha": "68bee5832c",
    "subject": "cmake: define KJ_NO_EXCEPTIONS=0 on in-tree IPC targets",
    "files": 3,
    "add": 17,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "fb22904c7377f928",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}