Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/configs/newdeps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ CI_DESC="CI job using newest Cap'n Proto and cmake versions"
CI_DIR=build-newdeps
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-error=array-bounds"
CAPNP_CHECKOUT=master # This is the v1.x release branch
CAPNP_BUILD=autotools-static # Check mpgen link order with capnpc.pc missing Requires: capnp (#367)
NIX_ARGS=(--argstr capnprotoVersion "none" --argstr cmakeVersion "4.3.4")
BUILD_ARGS=(-k)
32 changes: 24 additions & 8 deletions ci/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,31 @@ capnp_prefix=
if [ -n "${CAPNP_CHECKOUT-}" ]; then
capnp_prefix="$PWD/capnp-install"
[ -e "capnp" ] || git clone -b "${CAPNP_CHECKOUT}" "https://github.com/capnproto/capnproto" capnp
mkdir -p capnp/build
(
cd capnp/build
git --no-pager log -1 || true
CXXFLAGS="-std=c++20" cmake .. "-DCMAKE_INSTALL_PREFIX=${capnp_prefix}" -DBUILD_TESTING=OFF -DWITH_OPENSSL=OFF -DWITH_ZLIB=OFF
cmake --build .
cmake --build . --target install # Replacement for modern "cmake --install .".
)
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
)
Comment on lines +29 to +41

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

else
mkdir -p capnp/build
(
cd capnp/build
git --no-pager log -1 || true
CXXFLAGS="-std=c++20" cmake .. "-DCMAKE_INSTALL_PREFIX=${capnp_prefix}" -DBUILD_TESTING=OFF -DWITH_OPENSSL=OFF -DWITH_ZLIB=OFF
cmake --build .
cmake --build . --target install # Replacement for modern "cmake --install .".
)
fi
export CMAKE_PREFIX_PATH="${capnp_prefix}:${CMAKE_PREFIX_PATH-}"
export PKG_CONFIG_PATH="${capnp_prefix}/lib/pkgconfig:${PKG_CONFIG_PATH-}"
fi

src_dir=$PWD
Expand Down
4 changes: 4 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ in crossPkgs.mkShell {
capnproto
];
nativeBuildInputs = with pkgs; [
autoconf
automake
cmakeBuild
git
include-what-you-use
libtool
ninja
Comment thread
mutatrum marked this conversation as resolved.
Resolved
pkg-config
] ++ lib.optional (gcc != null) gcc ++ lib.optionals (!minimal) [
clang
clang-tools
Expand Down
Loading