Skip to content

ci: use extension-ci-tools v1.4.5 so windows_amd64 builds with MSVC - #18

Open
asubbarao wants to merge 3 commits into
hotdata-dev:mainfrom
asubbarao:ci/windows-vs2026
Open

asubbarao wants to merge 3 commits into
hotdata-dev:mainfrom
asubbarao:ci/windows-vs2026

Conversation

@asubbarao

Copy link
Copy Markdown

Why

windows_amd64 has been red on main since 2026-07-20 (run 29782822867), and on every PR since. No tests run: make test_release exits Error 127 on ./build/release/"/test/unittest" ""test/"*".

The cause is the runner image, not the tests. windows-latest is now windows-2025-vs2026 (line 16 of the job log). extension-ci-tools v1.4.4 only calls the VS 2022 vcvars64.bat, which doesn't exist on that image (The system cannot find the path specified.), and it leaves CC/CXX empty. So CMake picks MinGW from PATH:

-- The C compiler identification is GNU 15.2.0
-- Check for working CXX compiler: C:/mingw64/bin/c++.exe

The GCC-built unittest.exe then fails to start under Git Bash, which reports that as a silent 127. It also means windows_amd64 artifacts built this way are GCC-built rather than MSVC-built.

extension-ci-tools v1.4.5 (duckdb/extension-ci-tools#369) tries the VS 18 vcvars first and sets CC/CXX to cl. git diff v1.4.4 v1.4.5 touches only _extension_distribution.yml; the Makefiles are identical.

Change

Pin _extension_distribution.yml and ci_tools_version to v1.4.5. duckdb_version stays v1.4.4.

Evidence

  • Failing: PR parse_functions: find functions inside FROM-clause subqueries, joins and table-function arguments #17 run 36061095091, job 107913882144 (above), and main run 29782822867, job 88491492661 (same failure).
  • Control: teaguesterling/duckdb_read_lines job 107820187154 ran on the same image the same week, with a byte-identical test command, built with MSVC 19.51 from Microsoft Visual Studio\18, and reports All tests passed.
  • This PR's own CI run is the confirmation: the windows_amd64 job should report an MSVC compiler and run the tests.

🤖 Generated with Claude Code

windows-latest is now windows-2025-vs2026. The v1.4.4 reusable workflow
calls only the VS 2022 vcvars64.bat, which is absent there, so the
windows_amd64 job built with MinGW gcc from C:\mingw64\bin and the
resulting unittest.exe failed to start under Git Bash (Error 127).
v1.4.5 (extension-ci-tools #369) falls back to VS 18 and forces CC/CXX=cl.
DuckDB stays at v1.4.4; the ci-tools Makefile is identical between the two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
duckdb/CMakeLists.txt sets CMAKE_CXX_STANDARD 11 as an unforced cache
default. MSVC has no /std:c++11, so under real MSVC (now that the
extension-ci-tools bump finds it instead of falling back to MinGW)
that resolves to its implicit default dialect, which does not enable
C++17 inline variables. Vendored fmt (third_party/fmt/include/fmt/format.h)
needs them, so the windows_amd64 build fails: 'inline variables require
at least /std:c++17'.

-DCMAKE_CXX_STANDARD=17 on the cmake command line wins over duckdb's
unforced set(... CACHE ...), and fmt has no per-target override to
defeat it (verified: neither third_party/fmt/CMakeLists.txt nor
duckdb/CMakeLists.txt sets CXX_STANDARD anywhere else). Scoped to
windows_amd64 only via DUCKDB_PLATFORM — windows_amd64_mingw/_rtools
build with g++, which already compiles fmt fine under its own default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@asubbarao

Copy link
Copy Markdown
Author

Pushed a second commit. The v1.4.5 bump worked exactly as intended — CI now finds MSVC 19.51 instead of silently falling back to MinGW — but that uncovered a real, separate bug: DuckDB's vendored fmt needs C++17 (`inline variables require at least '/std:c++17'`, format.h:326), and `duckdb/CMakeLists.txt` pins `CMAKE_CXX_STANDARD 11` as an unforced cache default. MSVC has no `/std:c++11`, so under real MSVC that resolves to its implicit default dialect, which doesn't enable inline variables.

Fix: this repo's own Makefile now passes `-DCMAKE_CXX_STANDARD=17` on the cmake command line, scoped to `windows_amd64` only (verified with `make -n`: the flag appears in the real cmake invocation for windows_amd64 and is absent for windows_amd64_mingw/macOS). `-D` on the command line wins over duckdb's unforced `set(... CACHE ...)`, and neither `fmt`'s own CMakeLists.txt nor duckdb's sets a per-target override that would defeat it — checked both.

I can't compile under MSVC on this machine, so I verified everything that's checkable without a Windows toolchain (the generated cmake command, the CMake cache-precedence rule, the absence of a target-level override) but the actual compile is only provable by this PR's own CI run.

🤖 Generated with Claude Code

Patch DuckDB v1.4.4's bundled fmt during configuration so real MSVC builds use its portable pointer fallback after VS 2026 removed stdext::checked_array_iterator.

Co-Authored-By: Codex Luna 5.6 <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants