Skip to content

Accommodate for the migration from MINGW64 to UCRT64 - #6408

Merged
dscho merged 1 commit into
git-for-windows:mainfrom
dscho:switch-over-to-ucrt64
Sep 11, 2026
Merged

Accommodate for the migration from MINGW64 to UCRT64#6408
dscho merged 1 commit into
git-for-windows:mainfrom
dscho:switch-over-to-ucrt64

Conversation

@dscho

@dscho dscho commented Sep 11, 2026

Copy link
Copy Markdown
Member

There was one thing that still needed changing: the CMake definition has no chance but to hard-code the MSYSTEM variable, and now it needs to be UCRT64 instead of MINGW64, otherwise t0060.221 fails:

failure: t0060.221 MSYSTEM/PATH is adjusted if necessary 
  	if test -z "$MINGW_PREFIX"
  	then
  		MINGW_PREFIX="/$(echo "${MSYSTEM:-MINGW64}" | tr A-Z a-z)"
  	fi &&
  	mkdir -p "$HOME"/bin pretend"$MINGW_PREFIX"/bin \
  		pretend"$MINGW_PREFIX"/libexec/git-core pretend/usr/bin &&
  	cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/bin/ &&
  	cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/libexec/git-core/ &&
  	# copy the .dll files, if any (happens when building via CMake)
  	if test -n "$(ls "$GIT_EXEC_PATH"/*.dll 2>/dev/null)"
  	then
  		cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/bin/ &&
  		cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/libexec/git-core/
  	fi &&
  	echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
  	echo "echo ${MINGW_PREFIX#/}" | write_script pretend"$MINGW_PREFIX"/bin/git-test-bin &&
  	echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&
  
  	(
  		MSYSTEM= &&
  		GIT_EXEC_PATH= &&
  		pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-home >actual &&
  		pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-bin >>actual &&
  		pretend"$MINGW_PREFIX"/bin/git.exe test-bin2 >>actual
  	) &&
  	test_write_lines MSYSTEM=$MSYSTEM "${MINGW_PREFIX#/}" usr >expect &&
  	test_cmp expect actual
  
  ++ test -z ''
  +++ echo UCRT64
  +++ tr A-Z a-z
  ++ MINGW_PREFIX=/ucrt64
  ++ mkdir -p '/d/a/git/git/t/trash directory.t0060-path-utils/bin' pretend/ucrt64/bin pretend/ucrt64/libexec/git-core pretend/usr/bin
  ++ cp /d/a/git/git/git.exe pretend/ucrt64/bin/
  ++ cp /d/a/git/git/git.exe pretend/ucrt64/libexec/git-core/
  +++ ls /d/a/git/git/charset-1.dll /d/a/git/git/iconv-2.dll /d/a/git/git/legacy.dll /d/a/git/git/libcrypto-3-x64.dll /d/a/git/git/libcurl.dll /d/a/git/git/libexpat.dll /d/a/git/git/libssh2.dll /d/a/git/git/libssl-3-x64.dll /d/a/git/git/z.dll
  ++ test -n $'/d/a/git/git/charset-1.dll\n/d/a/git/git/iconv-2.dll\n/d/a/git/git/legacy.dll\n/d/a/git/git/libcrypto-3-x64.dll\n/d/a/git/git/libcurl.dll\n/d/a/git/git/libexpat.dll\n/d/a/git/git/libssh2.dll\n/d/a/git/git/libssl-3-x64.dll\n/d/a/git/git/z.dll'
  ++ cp /d/a/git/git/charset-1.dll /d/a/git/git/iconv-2.dll /d/a/git/git/legacy.dll /d/a/git/git/libcrypto-3-x64.dll /d/a/git/git/libcurl.dll /d/a/git/git/libexpat.dll /d/a/git/git/libssh2.dll /d/a/git/git/libssl-3-x64.dll /d/a/git/git/z.dll pretend/ucrt64/bin/
  ++ cp /d/a/git/git/charset-1.dll /d/a/git/git/iconv-2.dll /d/a/git/git/legacy.dll /d/a/git/git/libcrypto-3-x64.dll /d/a/git/git/libcurl.dll /d/a/git/git/libexpat.dll /d/a/git/git/libssh2.dll /d/a/git/git/libssl-3-x64.dll /d/a/git/git/z.dll pretend/ucrt64/libexec/git-core/
  ++ echo 'env | grep MSYSTEM='
  ++ write_script '/d/a/git/git/t/trash directory.t0060-path-utils/bin/git-test-home'
  ++ echo '#!/bin/sh'
  ++ cat
  ++ chmod +x '/d/a/git/git/t/trash directory.t0060-path-utils/bin/git-test-home'
  ++ echo 'echo ucrt64'
  ++ write_script pretend/ucrt64/bin/git-test-bin
  ++ echo '#!/bin/sh'
  ++ cat
  ++ chmod +x pretend/ucrt64/bin/git-test-bin
  ++ echo 'echo usr'
  ++ write_script pretend/usr/bin/git-test-bin2
  ++ echo '#!/bin/sh'
  ++ cat
  ++ chmod +x pretend/usr/bin/git-test-bin2
  ++ MSYSTEM=
  ++ GIT_EXEC_PATH=
  ++ pretend/ucrt64/libexec/git-core/git.exe test-home
  ++ pretend/ucrt64/libexec/git-core/git.exe test-bin
  git: 'test-bin' is not a git command. See 'git --help'.
  error: last command exited with $?=1
  not ok 221 - MSYSTEM/PATH is adjusted if necessary
  #	
  #		if test -z "$MINGW_PREFIX"
  #		then
  #			MINGW_PREFIX="/$(echo "${MSYSTEM:-MINGW64}" | tr A-Z a-z)"
  #		fi &&
  #		mkdir -p "$HOME"/bin pretend"$MINGW_PREFIX"/bin \
  #			pretend"$MINGW_PREFIX"/libexec/git-core pretend/usr/bin &&
  #		cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/bin/ &&
  #		cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/libexec/git-core/ &&
  #		# copy the .dll files, if any (happens when building via CMake)
  #		if test -n "$(ls "$GIT_EXEC_PATH"/*.dll 2>/dev/null)"
  #		then
  #			cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/bin/ &&
  #			cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/libexec/git-core/
  #		fi &&
  #		echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
  #		echo "echo ${MINGW_PREFIX#/}" | write_script pretend"$MINGW_PREFIX"/bin/git-test-bin &&
  #		echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&
  #	
  #		(
  #			MSYSTEM= &&
  #			GIT_EXEC_PATH= &&
  #			pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-home >actual &&
  #			pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-bin >>actual &&
  #			pretend"$MINGW_PREFIX"/bin/git.exe test-bin2 >>actual
  #		) &&
  #		test_write_lines MSYSTEM=$MSYSTEM "${MINGW_PREFIX#/}" usr >expect &&
  #		test_cmp expect actual
  #	

The reason is that MSYSTEM/MINGW_PREFIX are left unset, specifically to verify that git.exe hard-codes the correct values. Let's make that adjustment so that vs-test has a chance of passing again.

This is yet another follow-up for Git for Windows' migration from
MINGW64 to UCRT. The tl;dr is that /mingw64 no longer exists, and
/ucrt64 needs to be used instead (and that Windows 8.1 is no longer
supported). For full details, see
git-for-windows/git-sdk-64#117.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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