This is an automated email from the ASF dual-hosted git repository.
zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-go.git
The following commit(s) were added to refs/heads/main by this push:
new 0f4bb4bf ci: fix MinGW CGO job under Git Bash's UCRT64 MSYSTEM (#1369)
0f4bb4bf is described below
commit 0f4bb4bfbbc7e42a3bb3f4040e7294b77da12ed2
Author: Matt Topol <[email protected]>
AuthorDate: Tue Oct 13 13:02:57 2026 +0100
ci: fix MinGW CGO job under Git Bash's UCRT64 MSYSTEM (#1369)
### Rationale for this change
The `AMD64 Windows MinGW 64 CGO` job is failing on `main` (run
38259984920 at 7c13a602). 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.
---
ci/scripts/build.sh | 7 +++++--
ci/scripts/test.sh | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ci/scripts/build.sh b/ci/scripts/build.sh
index 404d3e38..ffa0859e 100755
--- a/ci/scripts/build.sh
+++ b/ci/scripts/build.sh
@@ -30,8 +30,11 @@ pushd "${source_dir}/arrow"
go_install_arrow_options=(-v)
if [[ -n "${ARROW_GO_TESTCGO}" ]]; then
- if [[ "${MSYSTEM:-}" = "MINGW64" ]]; then
- export PATH=${MINGW_PREFIX}/bin:${PATH}
+ # Git Bash on the runner sets its own MSYSTEM (e.g. UCRT64), so key off the
+ # MINGW_PREFIX exported by the MinGW CI job instead.
+ if [[ -n "${MINGW_PREFIX:-}" ]]; then
+ mingw_prefix="$(cygpath -u "${MINGW_PREFIX}")"
+ export PATH="${mingw_prefix}/bin:${PATH}"
go clean -cache
go clean -testcache
fi
diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh
index 45719d45..3f18097b 100755
--- a/ci/scripts/test.sh
+++ b/ci/scripts/test.sh
@@ -94,8 +94,11 @@ pushd "${source_dir}/arrow"
tags="assert,test"
if [[ -n "${ARROW_GO_TESTCGO}" ]]; then
- if [[ "${MSYSTEM:-}" = "MINGW64" ]]; then
- export PATH=${MINGW_PREFIX}\\bin:${MINGW_PREFIX}\\lib:$PATH
+ # Git Bash on the runner sets its own MSYSTEM (e.g. UCRT64), so key off the
+ # MINGW_PREFIX exported by the MinGW CI job instead.
+ if [[ -n "${MINGW_PREFIX:-}" ]]; then
+ mingw_prefix="$(cygpath -u "${MINGW_PREFIX}")"
+ export PATH="${mingw_prefix}/bin:${mingw_prefix}/lib:${PATH}"
fi
if [[ "$(go env GOOS)" = "darwin" ]]; then