Repository navigation
ci: fix MinGW CGO job under Git Bash's UCRT64 MSYSTEM - #1369
Merged
Merged
Conversation
zeroshade
force-pushed
the
ci-fix-mingw-toolchain
branch
from
October 13, 2026 11:25
6ed9786 to
46b7170
Compare
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
force-pushed
the
ci-fix-mingw-toolchain
branch
from
October 13, 2026 11:35
46b7170 to
6670816
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
The
AMD64 Windows MinGW 64 CGOjob is failing onmain(run 38259984920 at 7c13a60). Git Bash on the runner now setsMSYSTEM=UCRT64, so theMSYSTEM = MINGW64checks inci/scripts/build.shandci/scripts/test.share skipped and the MSYS2bindir is never put onPATH. cgo then uses the runner'sC:\mingw64GCC 14.2 against the MSYS2 headers inCGO_CPPFLAGS, socgoallocfails withredefinition of 'double wcstod(...)'.What changes are included in this PR?
Check
MINGW_PREFIX(exported only by the MinGW job) instead ofMSYSTEM, and convert it withcygpath -ubefore adding it toPATH.Are these changes tested?
By this PR's CI run of the MinGW job.
Are there any user-facing changes?
No.