Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
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. |
ryanofsky
left a comment
There was a problem hiding this comment.
Concept ACK 3c13c7d. 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).
| CAPNP_CHECKOUT=master # This is the v1.x release branch | ||
| CAPNP_BUILD=autotools-static |
There was a problem hiding this comment.
In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7d)
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 (review)) but if we add more jobs later it could make sense to move this to a different job.
| if [ "${CAPNP_BUILD-}" = "autotools-static" ]; then | ||
| ( | ||
| cd capnp/c++ | ||
| git --no-pager log -1 || true | ||
| autoreconf -i | ||
| ./configure --prefix="${capnp_prefix}" \ | ||
| --disable-shared \ | ||
| --enable-static \ | ||
| --without-openssl \ | ||
| --without-zlib \ | ||
| CXXFLAGS="-std=c++20" | ||
| make -j"$(nproc)" install | ||
| ) |
There was a problem hiding this comment.
In commit "ci: Add CAPNP_BUILD=autotools-static and enable in newdeps" (3c13c7d)
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 (56cfdaa 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.
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.
3c13c7d to
b514e5e
Compare
This PR adds support for
CAPNP_BUILD=autotools-staticinci/scripts/ci.shso Cap'n Proto can be built from source usingautotoolsinstead ofcmake. 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-staticinnewdeps, and addsautoconf,automake,libtool, andpkg-configtonativeBuildInputsinshell.nixfor the nix environment.As mentioned in #367 (review).