From b8a9f76975b1ac93ab6f479364880ce8b1644f79 Mon Sep 17 00:00:00 2001 From: 5cript Date: Thu, 15 Oct 2026 23:15:32 +0200 Subject: [PATCH 1/3] macOS CI names the SDK's zlib for boost iostreams explicitly The runner image of 2026-10-12 made b2's zlib probe fail, so boost iostreams was built without zlib and Nui's bin2hpp failed to link. b2 now gets ZLIB_INCLUDE, ZLIB_LIBRARY_PATH and ZLIB_NAME from the SDK, and the dependency build stops with b2's configuration log when iostreams still lacks zlib, before anything is cached. --- scripts/macos/build_dependencies.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/macos/build_dependencies.sh b/scripts/macos/build_dependencies.sh index 5d1b4c7f..c8821ecb 100755 --- a/scripts/macos/build_dependencies.sh +++ b/scripts/macos/build_dependencies.sh @@ -276,17 +276,24 @@ build_boost() { using clang : nui : "${CLANGXX}" : "${LIBCXX_COMPILE_FLAGS}" "${LIBCXX_LINK_FLAGS}" ; JAM # Only the compiled libraries are listed, the headers of all of boost are installed regardless. - # Nui gzips its assets through iostreams, with the zlib of the SDK. The standard matches nui-sftp, - # boost's configuration macros change signatures between standards. + # Nui gzips its assets through iostreams, with the zlib of the SDK, named explicitly since b2's probe + # does not always find it. The standard matches nui-sftp, boost's configuration macros change + # signatures between standards. ./b2 --user-config=user-config.jam toolset=clang-nui \ variant=release link=static threading=multi cxxstd=23 cxxstd-dialect=gnu \ --prefix="${PREFIX}" --layout=system -j "${JOBS}" -d1 \ -sNO_BZIP2=1 -sNO_ZSTD=1 -sNO_LZMA=1 \ + -sZLIB_INCLUDE="${SDKROOT}/usr/include" -sZLIB_LIBRARY_PATH="${SDKROOT}/usr/lib" -sZLIB_NAME=z \ --with-atomic --with-chrono --with-container --with-context --with-date_time --with-exception \ --with-filesystem --with-iostreams --with-process --with-program_options --with-random \ --with-serialization --with-system --with-thread \ install - ) + if ! nm "${PREFIX}/lib/libboost_iostreams.a" 2>/dev/null | grep -q zlib_error; then + echo "boost iostreams was built without zlib, b2's configuration log:" >&2 + cat bin.v2/config.log >&2 || true + exit 1 + fi + ) || exit 1 mark_built boost "${BOOST_VERSION}" } From 59304406b7b4aab834fde20f53f745b64c95d6eb Mon Sep 17 00:00:00 2001 From: 5cript Date: Thu, 15 Oct 2026 23:33:04 +0200 Subject: [PATCH 2/3] macOS dependency builds outside CMake name the SDK when linking The runner image of 2026-10-12 ships Command Line Tools with the macOS 27.0 SDK. Links that name no SDK picked it, and the linker cannot read its .tbd files (unknown architecture arm64e.x1), so every b2 configuration check that links failed: boost iostreams came out without zlib and Nui's bin2hpp failed to link. Boost and Crypto++ get -isysroot through SYSROOT_FLAGS now, which replaces the explicit zlib paths of the previous commit; the zlib check after the boost build stays. --- scripts/macos/build_dependencies.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/macos/build_dependencies.sh b/scripts/macos/build_dependencies.sh index c8821ecb..22783bcc 100755 --- a/scripts/macos/build_dependencies.sh +++ b/scripts/macos/build_dependencies.sh @@ -61,8 +61,11 @@ CLANGXX="${LLVM_ROOT}/bin/clang++" exit 1 } -# Upstream clang honours both for the builds that do not go through CMake. +# Upstream clang honours both for the builds that do not go through CMake, but links without naming the SDK pick +# the newest one of the Command Line Tools, which the linker may not be able to read (an SDK of the next macOS), so +# those builds name it in SYSROOT_FLAGS as well. export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" +SYSROOT_FLAGS="-isysroot ${SDKROOT}" export MACOSX_DEPLOYMENT_TARGET="${MINIMUM_MACOS}" WORK="${PREFIX}.work" @@ -257,8 +260,8 @@ build_cryptopp() { # The makefile probes the ARM crypto extensions with small test programs, those have to link too. make -C "${source}" -j "${JOBS}" static \ CXX="${CLANGXX}" \ - CXXFLAGS="-DNDEBUG -O3 -fPIC ${LIBCXX_COMPILE_FLAGS}" \ - LDFLAGS="${LIBCXX_LINK_FLAGS}" + CXXFLAGS="-DNDEBUG -O3 -fPIC ${SYSROOT_FLAGS} ${LIBCXX_COMPILE_FLAGS}" \ + LDFLAGS="${SYSROOT_FLAGS} ${LIBCXX_LINK_FLAGS}" mkdir -p "${PREFIX}/include/cryptopp" "${PREFIX}/lib" cp "${source}"/*.h "${PREFIX}/include/cryptopp/" cp "${source}/libcryptopp.a" "${PREFIX}/lib/" @@ -273,17 +276,16 @@ build_boost() { cd "${source}" ./bootstrap.sh cat > user-config.jam <"${LIBCXX_COMPILE_FLAGS}" "${LIBCXX_LINK_FLAGS}" ; +using clang : nui : "${CLANGXX}" : "${SYSROOT_FLAGS} ${LIBCXX_COMPILE_FLAGS}" "${SYSROOT_FLAGS} ${LIBCXX_LINK_FLAGS}" ; JAM # Only the compiled libraries are listed, the headers of all of boost are installed regardless. - # Nui gzips its assets through iostreams, with the zlib of the SDK, named explicitly since b2's probe - # does not always find it. The standard matches nui-sftp, boost's configuration macros change - # signatures between standards. + # Nui gzips its assets through iostreams, with the zlib of the SDK; without SYSROOT_FLAGS b2's link checks + # fail and iostreams is built without it. The standard matches nui-sftp, boost's configuration macros + # change signatures between standards. ./b2 --user-config=user-config.jam toolset=clang-nui \ variant=release link=static threading=multi cxxstd=23 cxxstd-dialect=gnu \ --prefix="${PREFIX}" --layout=system -j "${JOBS}" -d1 \ -sNO_BZIP2=1 -sNO_ZSTD=1 -sNO_LZMA=1 \ - -sZLIB_INCLUDE="${SDKROOT}/usr/include" -sZLIB_LIBRARY_PATH="${SDKROOT}/usr/lib" -sZLIB_NAME=z \ --with-atomic --with-chrono --with-container --with-context --with-date_time --with-exception \ --with-filesystem --with-iostreams --with-process --with-program_options --with-random \ --with-serialization --with-system --with-thread \ From 69ff447cc41237ee78b63f0a8578486e87ba08bf Mon Sep 17 00:00:00 2001 From: 5cript Date: Fri, 16 Oct 2026 00:13:54 +0200 Subject: [PATCH 3/3] The macOS zlib check of boost iostreams no longer fails on a match grep -q stopped reading at the first match, nm died of SIGPIPE and pipefail counted that as a failure, so the check rejected a library that has zlib. The symbols are captured first and read with the llvm-nm of the toolchain that built them. --- scripts/macos/build_dependencies.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/macos/build_dependencies.sh b/scripts/macos/build_dependencies.sh index 22783bcc..d52ab84b 100755 --- a/scripts/macos/build_dependencies.sh +++ b/scripts/macos/build_dependencies.sh @@ -290,7 +290,10 @@ JAM --with-filesystem --with-iostreams --with-process --with-program_options --with-random \ --with-serialization --with-system --with-thread \ install - if ! nm "${PREFIX}/lib/libboost_iostreams.a" 2>/dev/null | grep -q zlib_error; then + # Captured first: grep -q ends the pipe early and pipefail would count nm's SIGPIPE as a failure. + local symbols + symbols="$("${LLVM_ROOT}/bin/llvm-nm" "${PREFIX}/lib/libboost_iostreams.a" 2>/dev/null || true)" + if ! grep -q zlib_error <<<"${symbols}"; then echo "boost iostreams was built without zlib, b2's configuration log:" >&2 cat bin.v2/config.log >&2 || true exit 1