cmake, ci: updates for recent nixpkgs #238

pull ryanofsky wants to merge 2 commits into bitcoin-core:master from ryanofsky:pr/iwyufu changing 2 files +10 −7
  1. ryanofsky commented at 7:12 pm on January 9, 2026: collaborator

    This PR fixes two problems that happen with recent nixpkgs. The first commit works around compilation errors that happen when IWYU is enabled with (-DMP_ENABLE_IWYU=ON) that were caused by https://github.com/NixOS/nixpkgs/pull/445095. The second commit fixes problems building old versions of Cap’n Proto with CMake 4.0 in shell.nix.

    Neither problem has showed up so far running in github actions, only running locally with unstable nixpkgs. More details about the problems and fixes are in the commit messages.

  2. cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
    Without this change, building with -DMP_ENABLE_IWYU=ON and newer versions of
    nixpkgs (after 2025-11-12) fails with mysterious errors that look like:
    
    make[2]: *** [CMakeFiles/mputil.dir/build.make:79: CMakeFiles/mputil.dir/src/mp/util.cpp.o] Error 1
    
    with no other error messages. The are no messages because cmake -E
    __run_co_compile hides the output from IWYU and does not display anything itself.
    
    The actual problem is missing include directories on the compiler command line,
    and the fix here is to extend a workaround previously added for clang-tidy to
    be used for IWYU as well.
    
    Breakage seems to have been caused by
    https://github.com/NixOS/nixpkgs/pull/445095/changes/76a8ffa6d8d2f93b81d4e9be327a01cab1c893c0
    from https://github.com/NixOS/nixpkgs/pull/445095, which I found by bisecting
    with --first-parent to a change between the following merge commit:
    
    https://github.com/NixOS/nixpkgs/commits/de21549a840be528ef4763dd7dca2006caf9c11f (bad)
    https://github.com/NixOS/nixpkgs/commits/c4d1151093af5d483d1900d9214a65e68bc21560 (good)
    
    If you check out the bad commit above (or any later commit) and revert
    https://github.com/NixOS/nixpkgs/commit/76a8ffa6d8d2f93b81d4e9be327a01cab1c893c0
    the problem disappears.
    
    I suspect the problem happens because cmake is not handling -cxx-isystem
    properly, but did not debug further. The later change
    https://github.com/NixOS/nixpkgs/pull/462747 which followed up on
    https://github.com/NixOS/nixpkgs/pull/445095 did not seem to have any effect on
    this issue in my testing.
    91a7759a9a
  3. DrahtBot commented at 7:12 pm on January 9, 2026: none

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Stale ACK hebasto

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. ci: Fix shell.nix compatibility with CMake 4.0
    CMake 4.0 dropped support for older policies, so versions of Cap'n Proto <=
    v1.1.0 (before https://github.com/capnproto/capnproto/pull/2272) require an
    additional option to build with CMake 4.0. Without this change, there are
    errors like:
    
    > CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    >   Compatibility with CMake < 3.5 has been removed from CMake.
    >
    >   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    >   to tell CMake that the project requires at least <min> but has been updated
    >   to work with policies introduced by <max> or earlier.
    >
    >   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
    
    This change fixes the problem by specifying -DCMAKE_POLICY_VERSION_MINIMUM=3.5
    when needed.
    db7acb3ce2
  5. ryanofsky renamed this:
    cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
    cmake, ci: updates for recent nixpkgs
    on Jan 9, 2026
  6. hebasto approved
  7. hebasto commented at 7:24 pm on January 12, 2026: member
    ACK b66a6d35526f69a9f3cdb39e2cd85480732555ee, I have reviewed the code and it looks OK.
  8. ryanofsky force-pushed on Jan 13, 2026
  9. ryanofsky commented at 12:07 pm on January 13, 2026: collaborator
    Updated b66a6d35526f69a9f3cdb39e2cd85480732555ee -> db7acb3ce279196607fd628126c58588ba582483 (pr/iwyufu.2 -> pr/iwyufu.3, compare) to remove an incorrect comment in the b66a6d35526f69a9f3cdb39e2cd85480732555ee commit message about the cmake 4.0 problem not affecting the olddeps CI job. The problem does affect the olddeps job when I run it locally. It doesn’t affect github actions CI just because it is currently using CMake 3.31.6.

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-01-27 08:30 UTC

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