build: Fix missing Cap'n Proto include directories #82

pull ryanofsky wants to merge 1 commits into bitcoin-core:master from ryanofsky:pr/inc changing 2 files +3 −2
  1. ryanofsky commented at 3:10 PM on September 29, 2022: collaborator

    Two bugs configuring Cap'n Proto include directories were reported by sjors in https://github.com/chaincodelabs/libmultiprocess/issues/75

    They appear to have gone undetected because they were masked in other contexts by CMAKE_INCLUDE_PATH and NIX_CFLAGS_COMPILE environment variable settings (https://github.com/chaincodelabs/libmultiprocess/issues/75#issuecomment-1262334271)

    The first bug is missing ${CAPNP_INCLUDE_DIRECTORY} target_include_directories in the util target. This resulted in a compile error include/mp/util.h:8:10: fatal error: 'capnp/schema.h' file not found

    The second bug was misspelling CAPNP_INCLUDE_DIRS as capnp_INCLUDE_DIRS in the configure check for kj/filesystem.h, which caused HAVE_KJ_FILESYSTEM to be unset and could result in runtime errors like:

    capnp compile: --import-path=/prefix/include: no such directory
    Try 'capnp compile --help' for more information.
    terminate called after throwing an instance of 'std::runtime_error'
      what():  Invoking capnp failed
    
  2. build: Fix missing Cap'n Proto include directories
    Two bugs configuring Cap'n Proto include directories were reported by Sjors
    Provoost <sjors@sprovoost.nl> in
    https://github.com/chaincodelabs/libmultiprocess/issues/75
    
    They appear to have gone undetected because they were masked in other contexts
    by CMAKE_INCLUDE_PATH and NIX_CFLAGS_COMPILE environment variable settings
    (https://github.com/chaincodelabs/libmultiprocess/issues/75#issuecomment-1262334271)
    
    The first bug is missing ${CAPNP_INCLUDE_DIRECTORY} target_include_directories
    in the util target. This resulted in a compile error "include/mp/util.h:8:10:
    fatal error: 'capnp/schema.h' file not found"
    
    The second bug was misspelling CAPNP_INCLUDE_DIRS as capnp_INCLUDE_DIRS in the
    configure check for kj/filesystem.h, which caused HAVE_KJ_FILESYSTEM to be
    unset and could result in runtime errors like:
    
      capnp compile: --import-path=/prefix/include: no such directory
      Try 'capnp compile --help' for more information.
      terminate called after throwing an instance of 'std::runtime_error'
        what():  Invoking capnp failed
    c75362392f
  3. Sjors commented at 10:48 AM on September 30, 2022: member

    tACK c75362392f6b94134cca0089a5ef1c06796b833d

  4. ryanofsky merged this on Oct 4, 2022
  5. ryanofsky closed this on Oct 4, 2022

  6. ryanofsky commented at 5:30 PM on October 4, 2022: collaborator

    Thanks for reporting this and testing the patch

  7. bitcoin-core locked this on Jun 25, 2025
Contributors

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 18:30 UTC

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