ci: Add CAPNP_BUILD=autotools-static and enable in newdeps #373

pull mutatrum wants to merge 1 commits into bitcoin-core:master from mutatrum:ci-autotools-static changing 3 files +29 −8
  1. mutatrum commented at 12:55 PM on October 2, 2026: contributor

    This PR adds support for CAPNP_BUILD=autotools-static in ci/scripts/ci.sh so Cap'n Proto can be built from source using autotools instead of cmake. This provides CI coverage for static linking against autotools-built Cap'n Proto libraries and ensures link order regressions are caught.

    Enable CAPNP_BUILD=autotools-static in newdeps, and adds autoconf, automake, libtool, and pkg-config to nativeBuildInputs in shell.nix for the nix environment.

    As mentioned in #367#pullrequestreview-5380384729.

  2. DrahtBot commented at 12:55 PM on October 2, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK ryanofsky

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #393 (ci: Add OpenIndiana job by hebasto)
    • #333 (nix: Make clang tooling and IWYU find the right standard library headers by ryanofsky)
    • #175 (Set cmake_minimum_required(VERSION 3.22) by maflcko)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. in ci/configs/newdeps.bash:5 in 3c13c7de9d
       1 | @@ -2,5 +2,6 @@ CI_DESC="CI job using newest Cap'n Proto and cmake versions"
       2 |  CI_DIR=build-newdeps
       3 |  export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-error=array-bounds"
       4 |  CAPNP_CHECKOUT=master  # This is the v1.x release branch
       5 | +CAPNP_BUILD=autotools-static
    


    ryanofsky commented at 3:25 PM on November 13, 2026:

    In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7de9ddaf4e5f0e699e16ed50faa2223909a)

    Could add a comment saying why this is here, so a later cleanup doesn't drop it, since nothing else in this file explains it:

    CAPNP_BUILD=autotools-static  # Check mpgen link order with capnpc.pc missing Requires: capnp (#367)
    

    ryanofsky commented at 3:25 PM on November 13, 2026:

    In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7de9ddaf4e5f0e699e16ed50faa2223909a)

    One trade-off with turning this on in newdeps: newdeps was the only job building Cap'n Proto master with CMake, and after this nothing tests the CMake package files from capnp master before a release. Bitcoin Core's depends builds capnp with CMake (capnp.mk), so that is the packaging Bitcoin Core relies on. I think this is fine (I suggested "newdeps or a new config" in #367#pullrequestreview-5380384729) but if we add more jobs later it could make sense to move this to a different job.


    mutatrum commented at 11:58 AM on November 16, 2026:

    Done in b514e5e, thank you.

  4. in ci/scripts/ci.sh:41 in 3c13c7de9d outdated
      44 | +                  --enable-static \
      45 | +                  --without-openssl \
      46 | +                  --without-zlib \
      47 | +                  CXXFLAGS="-std=c++20"
      48 | +      make -j"$(nproc)" install
      49 | +    )
    


    ryanofsky commented at 3:25 PM on November 13, 2026:

    In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7de9ddaf4e5f0e699e16ed50faa2223909a)

    Note: I checked that this setup catches the problem fixed in #367. With Cap'n Proto master built this way and the mpgen link order from before #367 (56cfdaa884e710a2ddf6d9636141c36269a034c1 reverted), mpgen fails to link with the same undefined reference to capnp::SchemaLoader::get(...) errors as the #367 reproduction. Cap'n Proto master's capnpc.pc still doesn't list capnp in Requires, so the job keeps testing this until that changes upstream.

  5. in shell.nix:81 in 3c13c7de9d outdated
      76 | +    automake
      77 |      cmakeBuild
      78 |      git
      79 |      include-what-you-use
      80 | +    libtool
      81 |      ninja
    


    ryanofsky commented at 4:09 PM on November 13, 2026:

    In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7de9ddaf4e5f0e699e16ed50faa2223909a)

    I think pkg-config needs to be added here too. An autotools install of Cap'n Proto only has the pkg-config based CapnProtoTargets.cmake, which sets CapnProto_FOUND to false if pkg-config is missing. The newdeps job only passes because CMake falls back to the runner's system copy (Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") in the log), even though the nix shell runs with --ignore-environment. I checked this on NixOS, which has no /usr/bin/pkg-config: with Cap'n Proto master built as in this PR, the cmake step fails with pkg-config cannot be found, and with the change below it builds and the tests pass.

        ninja
        pkg-config
    

    mutatrum commented at 11:58 AM on November 16, 2026:

    Also done in b514e5e.

  6. ryanofsky changes_requested
  7. ryanofsky commented at 4:11 PM on November 13, 2026: collaborator

    Concept ACK 3c13c7de9ddaf4e5f0e699e16ed50faa2223909a. This adds CI coverage for the static Cap'n Proto link order fixed in #367, which nothing tested before. Thanks for following up and adding it!

    The change looks good. The only issue I see is that shell.nix needs pkg-config, which CI only finds outside the nix shell and can break running CI scripts locally (see the inline comment).

  8. ci: Add CAPNP_BUILD=autotools-static and enable in newdeps
    Add support for CAPNP_BUILD=autotools-static in ci/scripts/ci.sh so Cap'n
    Proto can be built from source using autotools instead of cmake. This provides
    CI coverage for static linking against autotools-built Cap'n Proto libraries
    and ensures link order regressions are caught.
    
    Enable CAPNP_BUILD=autotools-static in newdeps, and add autoconf, automake,
    libtool, and pkg-config to nativeBuildInputs in shell.nix for the nix
    environment.
    b514e5e7fb
  9. mutatrum force-pushed on Nov 16, 2026

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

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