Repository navigation
[FIX,BUILD] vcpkg: backport Boost.Locale fix for configuring with CMake 4.5 (nightly Windows failure) - #10917
timosachsenberg wants to merge 1 commit into
Conversation
…ke 4.5
The nightly Release workflow fails on Windows since 2026-11-15:
tools/ci/deps-windows.sh installs the latest CMake from Chocolatey, which
is now 4.5.0. The new CMake changes the vcpkg ABI hashes, so the binary
cache misses and all ports are built from source, and boost-locale 1.91.0
fails to configure:
CMake Error at libs/locale/CMakeLists.txt:236 (source_group):
".../include/boost/locale" is not a prefix of file
".../include/boost/locale.hpp"
CMake 4.5 checks the TREE root of source_group() per path component, and
Boost.Locale passes locale.hpp (which lives next to, not inside,
include/boost/locale/) in that list. Boost 1.92.0 still has the bug; it
is fixed upstream in boostorg/locale 1d07074 and f51b58c
(boostorg/boost#1162).
Add an overlay of the vcpkg boost-locale port (identical to the one at
our vcpkg baseline) that applies the upstream change as a patch. This
also fixes local vcpkg builds with CMake >= 4.5 on any platform. The
overlay can be dropped once the vcpkg baseline ships a fixed release.
Tested on Linux with CMake 4.5.0 against a Boost 1.91.0 checkout:
unpatched configure fails with the same error at line 236, patched
configure succeeds and boost_locale builds; CMake 4.2.0 is unaffected.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Atu9S2mWRtHFrHzhER78Sy
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
timosachsenberg
left a comment
There was a problem hiding this comment.
Independent review of the Boost.Locale overlay at 59467545 (focused on the overlay's interaction with future vcpkg baseline updates). One substantive issue is noted inline. Validation was a local, isolated CMake mock; I did not run a complete vcpkg/OpenMS build.
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO boostorg/locale | ||
| REF boost-${VERSION} |
There was a problem hiding this comment.
P2 — Guard against Boost version skew when updating the vcpkg baseline. This overlay permanently selects Boost.Locale 1.91.0 (vcpkg.json + REF boost-${VERSION}), and vcpkg resolves overlay ports before registry versioning. If the pinned baseline is upgraded to Boost 1.92 while this overlay is left in place, the other Boost ports can move to 1.92 but Locale still builds as 1.91. That can produce an inconsistent Boost installation instead of a clear diagnostic. This PR overlaps #10904, which already implements a fail-fast check against the installed boost/version.hpp; please retain that check here (or prefer #10904 rather than merging this version).
Independent validation: I executed the two portfile variants under cmake -P with stubbed vcpkg functions and an installed-header fixture defining BOOST_VERSION 109200 while VERSION is 1.91.0. This PR's portfile proceeded to vcpkg_from_github/installation (exit 0); the guarded #10904 variant stopped with Overlay=1.91.0, baseline=1.92.0 (exit 1). The fixture tests only the version-guard control flow, not actual vcpkg dependency resolution or a full build. See vcpkg overlay precedence.
timosachsenberg
left a comment
There was a problem hiding this comment.
AI-generated initial review
This is an automated, AI-generated first review. It looks only for high- and medium-priority issues (no nits) and checks whether the PR has tests and measurements. Please double-check anything before acting on it; a maintainer will follow up. I reviewed 59467545 (one commit) against develop (65851d76).
What I checked:
- Comparison with #10904: I fetched both branches and diffed
vcpkg-overlays/ports/boost-locale/.- The patch hunk is byte-identical (same
index c0b4e69..efae306). features.cmakeand the dependency list invcpkg.jsonare identical.- Differences: this PR adds a header to the patch and a
$commenttovcpkg.json, and it does not have #10904's Boost version check inportfile.cmake.
- The patch hunk is byte-identical (same
- CI on
5946754(at the time of this review):- Passing: Linux g++, clang++ and ARM, macOS, cppcheck, and the Linux, Linux-ARM and macOS wheel builds.
- Still running:
build-and-test (windows-2025, cl.exe)andbuild-wheels-windows, the two jobs that show whether the fix works.
- Linux wheel log: vcpkg resolves
boost-locale:[email protected]#1 -- /project/./vcpkg-overlays/ports/boost-locale, applies the patch and builds the port. It restores 143 of 146 packages from the cache. This shows that vcpkg accepts the patch header and the$commentfield. - No local build. The change affects only vcpkg's build of one dependency, and the evidence that matters is Windows CI with CMake 4.5.
Verdict:
- High priority: none in the change itself.
- Medium priority: 2, below.
1. This PR duplicates #10904, which already passes on Windows
- #10904, opened on 2026-11-15 by the same nightly routine, adds the same overlay with the same patch.
- Its CI on its head
ba45feepassedbuild-and-test (windows-2025, cl.exe)andbuild-wheels-windowswith CMake 4.5.0. It rebuilt all 166 ports from source, then built and tested OpenMS. - That run also answers the caveat in this description ("Other ports built later in that run might also fail under CMake 4.5"): no other port fails.
- Both PRs add
vcpkg-overlays/ports/boost-locale/{portfile.cmake,vcpkg.json,features.cmake}, so whichever merges second gets add/add conflicts. - Mitigation:
- Merge only one. #10904 is the more complete one: it has the version guard, and its Windows run is green.
- If you want this PR's patch header, copy it into #10904's patch before closing this one.
- For the routine that opens these PRs: check for an open PR about the same nightly failure before opening a new one.
2. With no version guard, a later baseline bump silently keeps Boost.Locale at 1.91.0 (portfile.cmake)
- The inline thread on
portfile.cmake:8already raises this, and I agree it is medium priority. - Overlay ports take precedence over the baseline. The
version>=entries in the overlay'svcpkg.jsonare only lower bounds. - So after a baseline bump to Boost 1.92, every other Boost port moves while
boost-localestays at 1.91.0. It is then built against the 1.92 headers ofboost-config,boost-core,boost-threadand the others. The result is a mixed Boost install with no clear error. - Mitigation: add the check from #10904, or merge #10904 instead. That check reads
BOOST_VERSIONfrom${CURRENT_INSTALLED_DIR}/include/boost/version.hpp, which the direct dependencyboost-configinstalls. If that version differs from${VERSION}, it stops with aFATAL_ERROR. It already ran on the realboost-configin #10904's CI on all platforms.
Tests
- No repository test covers a vcpkg port, so CI is the test here. Your local checks fit the change:
- a minimal
source_grouprepro (CMake 4.2 passes, 4.5 fails, 4.5 with the patch passes); - configuring and building the Boost 1.91.0 superproject with and without the patch.
- a minimal
- Not covered: "Build the Windows Debug SDK dependencies" (
release.yml). It failed in the nightly too, and PR CI does not run it, in this PR or in #10904. - Suggestion: before merging, do a dry run of the Release workflow on the branch you merge (
workflow_dispatchwithdeployoff). Alternatively, check the next nightly right after merging.
Measurements
- Not applicable, since no runtime code changes.
- The only cost is a one-off rebuild of
boost-localeand the packages that depend on it in each vcpkg cache.
Description
- The description explains the root cause, the fix and the caveats.
- The AI use is disclosed ("Substantial"), and the commit has a
Co-Authored-By:trailer. - There is no CHANGELOG edit.
- The description does not mention #10904. Please link it, or close one of the two PRs.
Generated by Claude Code
|
Closing this as a duplicate of #10904. That PR adds the same Generated by Claude Code |
Description
The nightly Release workflow has failed on Windows since 2026-11-15 (run 43785437565, run 43662157082). Both Windows jobs ("Build, Test, and Package (windows-2025, cl.exe)" and "Build the Windows Debug SDK dependencies") stop in
vcpkg install:Root cause
tools/ci/deps-windows.shrunschoco install cmakewithout a version, and that now installs CMake 4.5.0. A new CMake changes the vcpkg ABI hashes, so the binary cache restored 0 packages and every port was built from source.include/boost/locale.hpptosource_group(TREE .../include/boost/locale ...). CMake 4.5 now checks the TREE root by path component and rejects it. Boost 1.92.0 (current vcpkg master) still has this bug. It is fixed upstream in boostorg/locale1d07074andf51b58c(CMake error in boost 1.92.0 locale module with CMake 4.5.0 boostorg/boost#1162).Fix
This PR adds an overlay port
vcpkg-overlays/ports/boost-locale. It is a copy of the vcpkg port at our current baseline (features.cmakeis identical, andvcpkg.jsononly gainsport-version: 1). The port applies the upstream change as a patch: the exact diffboost-1.91.0..f51b58cofCMakeLists.txt, which is 3 lines. This fixes the build itself instead of pinning CMake to dodge it, so local vcpkg builds with CMake ≥ 4.5 on any platform work again too. Drop the overlay once the vcpkg baseline ships a fixed Boost.Locale.Testing (local, Linux)
source_grouprepro: CMake 4.2.0 passes, 4.5.0 fails, and 4.5.0 passes with the patched logic.-DBOOST_INCLUDE_LIBRARIES=localeand CMake 4.5.0: unpatched fails with the same error at line 236. Aftergit applyof the overlay patch, configure succeeds andboost_localebuilds.vcpkg install boost-locale --overlay-ports=vcpkg-overlays/portsresolves to[email protected]#1from the overlay. A full vcpkg build was not possible here because the sandbox blocks GitHub archive downloads.Not verified / caveat
The failing Windows run stopped at boost-locale. Other ports built later in that run might also fail under CMake 4.5. Only this PR's Windows CI can show that. The first run will rebuild all Windows vcpkg ports, because the cache misses with the new CMake.
Checklist
AI use (see the OpenMS AI Policy)
Assisted-by:trailerCo-authored-by:trailer, and the description above explains the design intent and rationaleThis PR was opened by a scheduled nightly-CI check. A human maintainer needs to review it before merging.
Generated by Claude Code
Summary by CodeRabbit