mpgen: Work around c++20 / capnproto 0.8 incompatibility #194

pull ryanofsky wants to merge 3 commits into bitcoin-core:master from ryanofsky:pr/string changing 8 files +92 −9
  1. ryanofsky commented at 8:20 PM on August 12, 2025: collaborator

    Fix ubuntu 22.04 compatibility issue reported by fanquake in https://github.com/bitcoin/bitcoin/issues/33176 and add CI job to make sure libmultiprocess stays compatible with old versions of Cap'n Proto.

    Changes are described in more detail in commit messages.

  2. DrahtBot commented at 8:20 PM on August 12, 2025: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK Sjors, TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. ryanofsky force-pushed on Aug 12, 2025
  4. ryanofsky commented at 9:50 PM on August 12, 2025: collaborator

    Updated 151ef65a7c91147aa14bfc1b044e997d973b44e8 -> c659685fba818b52e11f272ec8584a9fb72dbade (pr/string.1 -> pr/string.2, compare) testing some more intermediate versions Updated c659685fba818b52e11f272ec8584a9fb72dbade -> 88d95044a6cbf180f6c4cf6ed2e38e39c5bf4869 (pr/string.2 -> pr/string.3, compare) adding missing file

  5. ryanofsky force-pushed on Aug 12, 2025
  6. in shell.nix:33 in 88d95044a6 outdated
      29 | +      owner = "capnproto";
      30 | +      repo  = "capnproto";
      31 | +      rev   = "v${capnprotoVersion}";
      32 | +      hash  = lib.attrByPath [capnprotoVersion] "" capnprotoHashes;
      33 | +    };
      34 | +    patches = lib.optionals (lib.versionAtLeast capnprotoVersion "0.9.0" && lib.versionOlder capnprotoVersion "0.10.4") [ ./ci/patches/spaceship.patch ];
    


    Sjors commented at 9:36 AM on August 13, 2025:

    88d95044a6cbf180f6c4cf6ed2e38e39c5bf4869: do I read this correctly as: apply patch to versions 0.9.0 <= ... < 0.10.4?


    ryanofsky commented at 10:19 AM on August 13, 2025:

    re: #194 (review)

    88d9504: do I read this correctly as: apply patch to versions 0.9.0 <= ... < 0.10.4?

    Yes that's right. These versions of capnproto added some c++20 support which didn't actually work with later compiler versions.

  7. Sjors commented at 9:38 AM on August 13, 2025: member

    utACK 88d95044a6cbf180f6c4cf6ed2e38e39c5bf4869

  8. mpgen: Work around c++20 / capnproto 0.8 incompatibility
    The kj/string.h header installed by capnproto 0.8 doesn't work well when
    compiling with -std=c++20 or later because the reverse StringPtr/char*
    comparison function it provides is broken in c++20:
    
    inline bool operator==(const char* a, const StringPtr& b) { return b == a; }
    
    Before C++20 this would implicitly convert `a` to a StringPtr and call the
    StringPtr::operator== method. But starting with C++20 it actually calls itself
    recursively and either loops forever or crashes.
    
    This problem was fixed upstream by
    https://github.com/capnproto/capnproto/pull/1170 in Cap'n Proto 0.9.0. Avoid
    the problem here for older versions by just not using the operator. A CI job
    testing older versions is added in the next commit to avoid similar breakage in
    the future.
    c4cb758ecc
  9. ci: Add olddeps job to test old dependencies versions
    The CI job currently just tests old Cap'n Proto versions, but it might be nice
    to extend in the future to test old compilers & build tools too.
    
    Support for versions of Cap'n Proto before 0.7.0 was dropped in
    https://github.com/bitcoin-core/libmultiprocess/pull/88 in order to avoid
    compiler warnings and simplify code. Before that, versions back to 0.5 were
    supported and are basically still compatible since the Cap'n Proto API hasn't
    changed and libmultiprocess does not rely on newer features.
    8ceeaa6ae4
  10. ryanofsky referenced this in commit cb170d4913 on Aug 13, 2025
  11. cmake, doc: Add check for CVE-2022-46149
    Also document minimum Cap'n Proto version in doc/install.md
    dc3ba22046
  12. ryanofsky force-pushed on Aug 13, 2025
  13. ryanofsky commented at 10:21 AM on August 13, 2025: collaborator

    Rebased 88d95044a6cbf180f6c4cf6ed2e38e39c5bf4869 -> dc3ba2204606d8b5b681a6798407e68b3567e7a9 (pr/string.3 -> pr/string.4, compare) on top of #193 and added explicit check for CVE-2022-46149

  14. Sjors commented at 1:34 PM on August 13, 2025: member

    utACK dc3ba2204606d8b5b681a6798407e68b3567e7a9

    Thanks for adding the CVE version check.

  15. TheCharlatan approved
  16. TheCharlatan commented at 11:51 AM on August 19, 2025: collaborator

    ACK dc3ba2204606d8b5b681a6798407e68b3567e7a9

  17. in CMakeLists.txt:32 in dc3ba22046
      28 | +   OR CapnProto_VERSION STREQUAL "0.9.0"
      29 | +   OR CapnProto_VERSION STREQUAL "0.9.1"
      30 | +   OR CapnProto_VERSION STREQUAL "0.10.0"
      31 | +   OR CapnProto_VERSION STREQUAL "0.10.1"
      32 | +   OR CapnProto_VERSION STREQUAL "0.10.2")
      33 | +  message(FATAL_ERROR
    


    maflcko commented at 2:21 PM on August 19, 2025:

    isn't ipc a trusted interface, where anyone having access can already fully control the process (like calling createTransaction), so leaking memory should not make anything worse? A warning seems fine here? Also, a cve check seems a bit unrelated from a C++20 code workaround (from the title).

    Just a nit and not a blocker, but I wanted to mention it, since this will lead to a compile error on Ubuntu 22.04 (https://github.com/bitcoin/bitcoin/issues/33176#issuecomment-3183673187), for an option that will be enabled by default?


    ryanofsky commented at 2:52 PM on August 19, 2025:

    For ubuntu 22.04 if this will create confusion, I feel like a good solution might be to improve error message and documentation to specifically suggest disabling ENABLE_IPC, or installing a newer version of capnproto. Ideally it seems like ubuntu could update from 0.8.0 to 0.8.1 given 0.8.1 was released to fix the CVE and doesn't have any other changes.

    On IPC being a trusted interface, it's definitely true with the current interface, a malicious client could do a lot of things to crash the node and maybe even take control of it. But this doesn't have to be the case. We could provide capnproto interfaces that do rigorously check all their inputs and enforce resource constraints. It would even be possible to adapt the Mining interface to do this, but it hasn't been a reason to make the extra effort. I also feel like showing an error after discovering a package with a CVE is kind of a public service, since we don't know if there may be other software using the package.

  18. willcl-ark referenced this in commit af8053ae38 on Aug 21, 2025
  19. ryanofsky merged this on Aug 22, 2025
  20. ryanofsky closed this on Aug 22, 2025

  21. in src/mp/gen.cpp:1 in c4cb758ecc outdated


    ryanofsky commented at 9:20 PM on August 22, 2025:

    In commit "mpgen: Work around c++20 / capnproto 0.8 incompatibility" (c4cb758eccb56f0d0c8bf26197156dfb5f6cb21c)

    I think commit message is wrong in suggesting that with c++20 the operator== function is buggy and will call itself recursively. It seems the reason this happens is not really because of c++20 but because of a gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499. See also https://github.com/bitcoin/bitcoin/issues/33176#issuecomment-3194776823

  22. ryanofsky referenced this in commit dd68d0f40b on Aug 22, 2025
  23. Sjors referenced this in commit 38d7eeaddb on Aug 25, 2025
  24. Sjors referenced this in commit 18a717abb7 on Aug 25, 2025
  25. Sjors referenced this in commit 8ce3ac4bb8 on Aug 25, 2025
  26. achow101 referenced this in commit 6ca6f3b37b on Aug 25, 2025
  27. willcl-ark commented at 10:34 AM on September 1, 2025: member

    I'm not sure, as you say this was fixed upstream in v0.9 , but I think I might still be hitting this on debian bookworm with 0.9.2?:

    <snip>
    
    -- Checking for module 'capnp'
    --   Found capnp, version 0.9.2
    -- Checking for module 'capnpc'
    --   Found capnpc, version 0.9.2
    -- Checking for module 'capnp-rpc'
    --   Found capnp-rpc, version 0.9.2
    -- Checking for module 'capnp-json'
    --   Found capnp-json, version 0.9.2
    -- Checking for module 'capnp-websocket'
    --   Found capnp-websocket, version 0.9.2
    -- Checking for module 'kj'
    --   Found kj, version 0.9.2
    -- Checking for module 'kj-async'
    --   Found kj-async, version 0.9.2
    -- Checking for module 'kj-http'
    --   Found kj-http, version 0.9.2
    -- Checking for module 'kj-gzip'
    --   Found kj-gzip, version 0.9.2
    -- Checking for module 'kj-tls'
    --   Found kj-tls, version 0.9.2
    -- Checking for module 'kj-test'
    --   Found kj-test, version 0.9.2
    
    <snip>
    
    C++ compiler .......................... Clang 19.1.4, /usr/bin/clang++-19
    CMAKE_BUILD_TYPE ...................... RelWithDebInfo
    Preprocessor defined macros ...........
    C++ compiler flags .................... -O2 -g -std=c++20 -fPIC -fdebug-prefix-map=/src/bitcoin/src=. -fmacro-prefix-map=/src/bitcoin/src=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter
    Linker flags .......................... -O2 -g -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
    
    <snip>
    
    In file included from /src/bitcoin/src/ipc/libmultiprocess/src/mp/util.cpp:6:
    In file included from /src/bitcoin/src/ipc/libmultiprocess/include/mp/util.h:8:
    In file included from /usr/include/capnp/schema.h:39:
    In file included from /usr/include/capnp/schema.capnp.h:6:
    In file included from /usr/include/capnp/generated-header-support.h:27:
    In file included from /usr/include/capnp/layout.h:34:
    /usr/include/capnp/blob.h:176:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
      176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
          |                                                                        ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
      744 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
          |             ^               ~~~~~~~~~
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
      746 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
          |             ^               ~~~~~~~~~
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
      176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
          |             ^                         ~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
      744 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
          |             ^          ~~~
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
      746 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
          |             ^          ~~~
    /usr/include/capnp/blob.h:176:13: note: candidate function (with reversed parameter order) not viable: no known conversion from 'const char *' to 'const Text::Builder' for 1st argument
      176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
          |             ^          ~~~~~~~~~~~~~
    /usr/include/capnp/blob.h:177:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
      177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
          |                                                                        ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
      744 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
          |             ^               ~~~~~~~~~
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
      746 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
          |             ^               ~~~~~~~~~
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
      176 | inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
          |             ^                         ~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/capnp/blob.h:177:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
      177 | inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
          |             ^                         ~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
      744 | inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
          |             ^          ~~~
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
      746 | inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
          |             ^          ~~~
    2 errors generated.
    gmake[2]: *** [src/ipc/libmultiprocess/CMakeFiles/mputil.dir/build.make:76: src/ipc/libmultiprocess/CMakeFiles/mputil.dir/src/mp/util.cpp.o] Error 1
    gmake[1]: *** [CMakeFiles/Makefile2:900: src/ipc/libmultiprocess/CMakeFiles/mputil.dir/all] Error 2
    gmake[1]: *** Waiting for unfinished jobs....
    

    log.txt

    May also be a different issue (in which case I can open a new issue here or in bitcoin/bitcoin if that would be more appropriate).

  28. maflcko commented at 11:12 AM on September 1, 2025: contributor

    I'm not sure, as you say this was fixed upstream in v0.9 , but I think I might still be hitting this on debian bookworm with 0.9.2?:

    Yeah, to reproduce:

    diff --git a/ci/configs/openbsd.bash b/ci/configs/openbsd.bash
    index a404e2b..70ae010 100644
    --- a/ci/configs/openbsd.bash
    +++ b/ci/configs/openbsd.bash
    @@ -1,5 +1,6 @@
     CI_DESC="CI config for OpenBSD"
     CI_DIR=build-openbsd
    +export CXX=clang++-16
     export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
     CMAKE_ARGS=(-G Ninja)
     BUILD_ARGS=(-k 0)
    

    And (on debian:bookworm !):

    # CI_CLEAN=1 CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh 
    + '[' x ']'
    + source ci/configs/openbsd.bash
    ++ CI_DESC='CI config for OpenBSD'
    ++ CI_DIR=build-openbsd
    ++ export CXX=clang++-16
    ++ CXX=clang++-16
    ++ export 'CXXFLAGS=-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter'
    ++ CXXFLAGS='-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter'
    ++ CMAKE_ARGS=(-G Ninja)
    ++ BUILD_ARGS=(-k 0)
    + : build-openbsd
    + '[' -v BUILD_TARGETS ']'
    + BUILD_TARGETS=(all tests mpexamples)
    + '[' -n 1 ']'
    + rm -rf build-openbsd
    + cmake -B build-openbsd -G Ninja
    -- The CXX compiler identification is Clang 16.0.6
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/clang++-16 - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE  
    -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.17") found components: Crypto SSL 
    -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") 
    -- Checking for module 'capnp'
    --   Found capnp, version 0.9.2
    -- Checking for module 'capnpc'
    --   Found capnpc, version 0.9.2
    -- Checking for module 'capnp-rpc'
    --   Found capnp-rpc, version 0.9.2
    -- Checking for module 'capnp-json'
    --   Found capnp-json, version 0.9.2
    -- Checking for module 'capnp-websocket'
    --   Found capnp-websocket, version 0.9.2
    -- Checking for module 'kj'
    --   Found kj, version 0.9.2
    -- Checking for module 'kj-async'
    --   Found kj-async, version 0.9.2
    -- Checking for module 'kj-http'
    --   Found kj-http, version 0.9.2
    -- Checking for module 'kj-gzip'
    --   Found kj-gzip, version 0.9.2
    -- Checking for module 'kj-tls'
    --   Found kj-tls, version 0.9.2
    -- Checking for module 'kj-test'
    --   Found kj-test, version 0.9.2
    -- Performing Test HAVE_PTHREAD_GETNAME_NP
    -- Performing Test HAVE_PTHREAD_GETNAME_NP - Success
    -- Performing Test HAVE_PTHREAD_THREADID_NP
    -- Performing Test HAVE_PTHREAD_THREADID_NP - Failed
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /libmultiprocess/build-openbsd
    + cmake --build build-openbsd -t all tests mpexamples -- -k 0
    [1/59] Building CXX object CMakeFiles/mputil.dir/src/mp/util.cpp.o
    FAILED: CMakeFiles/mputil.dir/src/mp/util.cpp.o 
    /usr/bin/clang++-16  -I/libmultiprocess/include -I/libmultiprocess/build-openbsd/include -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -std=gnu++20 -MD -MT CMakeFiles/mputil.dir/src/mp/util.cpp.o -MF CMakeFiles/mputil.dir/src/mp/util.cpp.o.d -o CMakeFiles/mputil.dir/src/mp/util.cpp.o -c /libmultiprocess/src/mp/util.cpp
    In file included from /libmultiprocess/src/mp/util.cpp:6:
    In file included from /libmultiprocess/include/mp/util.h:8:
    In file included from /usr/include/capnp/schema.h:39:
    In file included from /usr/include/capnp/schema.capnp.h:6:
    In file included from /usr/include/capnp/generated-header-support.h:27:
    In file included from /usr/include/capnp/layout.h:34:
    /usr/include/capnp/blob.h:176:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                                                                           ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
    inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
                ^
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
    inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
                ^
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^                                                               ~~~~~~~~~~~~
    /usr/include/capnp/blob.h:176:13: note: candidate function (with reversed parameter order) not viable: no known conversion from 'const char *' to 'const Text::Builder' for 1st argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^                                                          ~
    /usr/include/capnp/blob.h:177:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
    inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
                                                                           ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
    inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
                ^
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
    inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
                ^
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^
    /usr/include/capnp/blob.h:177:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
                ^                                                               ~~~~~~~~~~~~
    2 errors generated.
    [2/59] Building CXX object CMakeFiles/mpgen.dir/src/mp/gen.cpp.o
    FAILED: CMakeFiles/mpgen.dir/src/mp/gen.cpp.o 
    /usr/bin/clang++-16  -I/libmultiprocess/build-openbsd/include -I/libmultiprocess/include -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -std=gnu++20 -MD -MT CMakeFiles/mpgen.dir/src/mp/gen.cpp.o -MF CMakeFiles/mpgen.dir/src/mp/gen.cpp.o.d -o CMakeFiles/mpgen.dir/src/mp/gen.cpp.o -c /libmultiprocess/src/mp/gen.cpp
    In file included from /libmultiprocess/src/mp/gen.cpp:6:
    In file included from /libmultiprocess/include/mp/util.h:8:
    In file included from /usr/include/capnp/schema.h:39:
    In file included from /usr/include/capnp/schema.capnp.h:6:
    In file included from /usr/include/capnp/generated-header-support.h:27:
    In file included from /usr/include/capnp/layout.h:34:
    /usr/include/capnp/blob.h:176:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                                                                           ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
    inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
                ^
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
    inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
                ^
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^                                                               ~~~~~~~~~~~~
    /usr/include/capnp/blob.h:176:13: note: candidate function (with reversed parameter order) not viable: no known conversion from 'const char *' to 'const Text::Builder' for 1st argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^                                                          ~
    /usr/include/capnp/blob.h:177:74: error: invalid operands to binary expression ('const char *' and 'kj::StringPtr')
    inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
                                                                           ~ ^  ~~~~~~~~~~~~
    /usr/include/kj/common.h:744:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MaxValue_' for 2nd argument
    inline bool operator==(T t, MaxValue_) { return t == Decay<T>(maxValue); }
                ^
    /usr/include/kj/common.h:744:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MaxValue_' for 1st argument
    /usr/include/kj/common.h:746:13: note: candidate function template not viable: no known conversion from 'kj::StringPtr' to 'MinValue_' for 2nd argument
    inline bool operator==(T t, MinValue_) { return t == Decay<T>(minValue); }
                ^
    /usr/include/kj/common.h:746:13: note: candidate function (with reversed parameter order) template not viable: no known conversion from 'const char *' to 'MinValue_' for 1st argument
    /usr/include/capnp/blob.h:176:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator==(const char* a, const Text::Builder& b) { return a == b.asString(); }
                ^
    /usr/include/capnp/blob.h:177:13: note: candidate function not viable: no known conversion from 'kj::StringPtr' to 'const Text::Builder' for 2nd argument
    inline bool operator!=(const char* a, const Text::Builder& b) { return a != b.asString(); }
                ^                                                               ~~~~~~~~~~~~
    2 errors generated.
    ninja: build stopped: cannot make progress due to previous errors.
    
  29. ryanofsky commented at 2:16 PM on September 1, 2025: collaborator

    re: @willcl-ark #194 (comment)

    I'm not sure, as you say this was fixed upstream in v0.9 , but I think I might still be hitting this on debian bookworm with 0.9.2?:

    If I'm interpreting correctly, debian bookworm uses clang 14 according to https://packages.debian.org/bookworm/clang so maybe doesn't have this issue by default, but I think you will run into this problem with clang-16 and newer. I made a new issue for this #199 so maybe we can figure out a solution there

  30. janus referenced this in commit ab3a29600f on Sep 15, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 17:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me