Skip to content

Bump to 4.2.2: Windows CRT WOW64/Sysnative fix (flet #6436)#227

Open
FeodorFitsner wants to merge 2 commits into
mainfrom
fix/windows-crt-wow64-sysnative-6436
Open

Bump to 4.2.2: Windows CRT WOW64/Sysnative fix (flet #6436)#227
FeodorFitsner wants to merge 2 commits into
mainfrom
fix/windows-crt-wow64-sysnative-6436

Conversation

@FeodorFitsner

@FeodorFitsner FeodorFitsner commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Prepares the 4.2.2 release. All serious_python_* packages bumped 4.2.1 → 4.2.2. The one substantive change is the Windows CRT fix below; every other platform is an alignment-only bump. No python-build snapshot re-pin.

The Windows fix

flet build windows fails during the CMake install step with:

CMake Error at cmake_install.cmake:266 (file):
  file INSTALL cannot find "C:/WINDOWS/System32/vcruntime140_1.dll"

…for users who have VS Build Tools (not full Visual Studio) installed.

Root cause

This plugin bundles the CRT runtime DLLs (msvcp140.dll, vcruntime140.dll, vcruntime140_1.dll) by harvesting them from %WINDIR%\System32. Flutter drives the install step with the 32-bit cmake.exe bundled in VS Build Tools. Under WOW64 file-system redirection a 32-bit process transparently sees C:\Windows\System32 rewritten to C:\Windows\SysWOW64, which:

  • holds the x86 copies of msvcp140.dll / vcruntime140.dll (wrong arch for the x64 build — they get copied but are broken), and
  • does not contain vcruntime140_1.dll at all → hard "file not found" failure.

With full Visual Studio the bundled cmake is 64-bit, no redirection happens, and the build works — which is exactly the "install full VS" workaround reported in the issue.

Fix

Prefer the Sysnative pseudo-folder, which is visible only to 32-bit processes and maps back to the real 64-bit System32. Native 64-bit cmake has no Sysnative, so it falls back to System32 unchanged. Configure- and install-time cmake are the same binary under Flutter, so the path resolved at configure time stays valid when cmake_install.cmake runs.

Testing

⚠️ Needs validation on Windows with VS Build Tools only (no full VS) — the environment that reproduces the failure. Full-VS and 64-bit-cmake paths are unaffected (they skip the Sysnative branch).

Fixes flet-dev/flet#6436 (also relates to flet-dev/flet#5205, flet-dev/flet#3107).

…tion

Flutter may drive the CMake install step with the 32-bit cmake.exe bundled
in VS Build Tools. Under WOW64 file-system redirection that process sees
C:\Windows\System32 rewritten to SysWOW64, which holds x86 CRT DLLs and has
no vcruntime140_1.dll, so the x64 build copies wrong-arch DLLs and then fails
with "file INSTALL cannot find vcruntime140_1.dll".

Prefer the Sysnative pseudo-folder (visible only to 32-bit processes, maps to
the real 64-bit System32) when present, falling back to System32 for native
64-bit cmake.

Fixes flet-dev/flet#6436
Bump all serious_python_* packages to 4.2.2. The substantive change is the
Windows CRT DLL harvesting fix (Sysnative fallback) for flet-dev/flet#6436;
other platforms are alignment-only bumps.
@FeodorFitsner FeodorFitsner changed the title fix(windows): resolve CRT DLLs via Sysnative to survive WOW64 redirection Bump to 4.2.2: Windows CRT WOW64/Sysnative fix (flet #6436) Jul 6, 2026
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.

bug: file INSTALL cannot find "C:/WINDOWS/System32/vcruntime140_1.dll" when using VS Build Tools

1 participant