Skip to content

ci: fix MinGW CGO job under Git Bash's UCRT64 MSYSTEM - #1369

Merged
zeroshade merged 1 commit into
apache:mainfrom
zeroshade:ci-fix-mingw-toolchain
Oct 13, 2026
Merged

zeroshade merged 1 commit into
apache:mainfrom
zeroshade:ci-fix-mingw-toolchain

Conversation

@zeroshade

@zeroshade zeroshade commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

The AMD64 Windows MinGW 64 CGO job is failing on main (run 38259984920 at 7c13a60). Git Bash on the runner now sets MSYSTEM=UCRT64, so the MSYSTEM = MINGW64 checks in ci/scripts/build.sh and ci/scripts/test.sh are skipped and the MSYS2 bin dir is never put on PATH. cgo then uses the runner's C:\mingw64 GCC 14.2 against the MSYS2 headers in CGO_CPPFLAGS, so cgoalloc fails with redefinition of 'double wcstod(...)'.

What changes are included in this PR?

Check MINGW_PREFIX (exported only by the MinGW job) instead of MSYSTEM, and convert it with cygpath -u before adding it to PATH.

Are these changes tested?

By this PR's CI run of the MinGW job.

Are there any user-facing changes?

No.

@zeroshade
zeroshade force-pushed the ci-fix-mingw-toolchain branch from 6ed9786 to 46b7170 Compare October 13, 2026 11:25
@zeroshade zeroshade changed the title ci: build MinGW CGO job with the MSYS2 toolchain ci: fix MinGW CGO job under Git Bash's UCRT64 MSYSTEM Oct 13, 2026
Git Bash on the windows runner now sets MSYSTEM=UCRT64, so the MSYSTEM=MINGW64 checks in build.sh/test.sh were skipped and the MSYS2 bin dir was never put on PATH. cgo then used the runner's C:\mingw64 GCC against MSYS2 headers (wcstod redefinition errors). Key off MINGW_PREFIX, which the MinGW job exports, and normalise it with cygpath.
@zeroshade
zeroshade force-pushed the ci-fix-mingw-toolchain branch from 46b7170 to 6670816 Compare October 13, 2026 11:35
@zeroshade
zeroshade merged commit 0f4bb4b into apache:main Oct 13, 2026
23 checks passed
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.

1 participant