You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
meson-python link.exe issue since 3.3.0 release #2663
I tried to update my CI scripts to use the latest (3.3.0) cibuildwheel release, but somehow it seems to mess with the way meson finds msvc link.exe. I tried several cibuildwheel versions:
3.3.0 ❌
3.2.1 ✅
3.1.1 ✅
2.23.3 ✅
I tried look quickly in the release diff between 3.3.0 and 3.2.1 I didn't see anything obvious.
I believe I also have the correct Meson setup.
I see #2630; That's now modifying the path, rather than just pointing at cibuildwheel. If there was anything else in that location, that would get exposed too. However, it seems to be pretty carefully exposing only the binaries. I don't think that change is actually needed, since we use uv.find_uv_bin() to find uv if it's installed alongside us, but I don't see how that would have broken anything.
The windows.py file didn't really change in a way that could affect this.
Build dep pinning changes shouldn't affect meson-python.
Other than that, just normal dependency updates, which I wouldn't think would affect a Windows build. I'd be curious to see a build from just before / just after #2630.
I think I'm coming across a similar problem here where 3.3.x somehow changes the env so that setuptools is no longer able to detect the Windows SDK paths and thus won't include them in the -I include dirs for cl.exe.
We can see that the failing cl.exe command is missing the various Windows Kits\10\include dirs which is where io.h will be defined
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Igssapi/raw -Igssapi\raw -IC:\Users\runneradmin\AppData\Local\Temp\build-env-0k6k8v9b\include -IC:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.11.9\tools\include -IC:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.11.9\tools\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" /Tcgssapi/raw/misc.c /Fobuild\temp.win-amd64-cpython-311\Release\gssapi\raw\misc.obj "-IC:\Program Files\MIT\Kerberos\include" -DMS_WIN64 -DHAS_GSSAPI_EXT_H
misc.c
C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.11.9\tools\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Weirdly I didn't see this error in a similar library I updated to v3.3.0 which has a similar build process.
I've verified that #2673fixes the build and #2696also fixes it. I don't know which direction you want to go with and I don't use uv in my builds but hoping at least one of them is chosen :)
I think I understand now why some users are seeing this and others are not. Some users are using ilammy/msvc-dev-cmd to set up their toolchain environment variables. They are hitting this bug due to changes in how we set the PATH variable in 3.3.0. Users that use --vsenv don't see the issue because meson is explicitly finding the VS compiler toolchain.
I think I understand now why some users are seeing this and others are not. Some users are using ilammy/msvc-dev-cmd to set up their toolchain environment variables. They are hitting this bug due to changes in how we set the PATH variable in 3.3.0.
If it helps, or confuses, I am not explicitly setting up the toolchain in my broken example. Seems like setuptools has the logic to lookup the MSVC paths but something broke the logic with the PATH changes. Very much related to your PATH changes in 3.3.0 but it doesn't seem strictly related to ilammy/msvc-dev-cmd, just the general lookup logic and how setuptools interacts with it.
Activity
henryiii commentedon Nov 24, 2025
v3.2.1...v3.3.0
I see #2630; That's now modifying the path, rather than just pointing at cibuildwheel. If there was anything else in that location, that would get exposed too. However, it seems to be pretty carefully exposing only the binaries. I don't think that change is actually needed, since we use
uv.find_uv_bin()to find uv if it's installed alongside us, but I don't see how that would have broken anything.The windows.py file didn't really change in a way that could affect this.
Build dep pinning changes shouldn't affect meson-python.
Other than that, just normal dependency updates, which I wouldn't think would affect a Windows build. I'd be curious to see a build from just before / just after #2630.
henryiii commentedon Nov 24, 2025
Better yet, could you try #2673 on your workflow? Just use
@henryiii/fix/simpleractioninstead of@3.2.1.jeandet commentedon Nov 24, 2025
@henryiii thanks a lot for your help, I started a build here, it seems to work so far.
Test CIBW fix
Starbuck5 commentedon Dec 7, 2025
@henryiii I ran into the same problem as jeandet on my project.
Using your custom branch fixes the problem. Tested here: pygame-community/pygame-ce#3655
jborean93 commentedon Jan 23, 2026
I think I'm coming across a similar problem here where 3.3.x somehow changes the env so that setuptools is no longer able to detect the Windows SDK paths and thus won't include them in the
-Iinclude dirs forcl.exe.v3.2.1- https://github.com/pythongssapi/python-gssapi/actions/runs/21275731526/job/61234998635We can see that the first
cl.execommand being run isv3.3.0- https://github.com/pythongssapi/python-gssapi/actions/runs/21275788952/job/61235156501?pr=371We can see that the failing
cl.execommand is missing the variousWindows Kits\10\includedirs which is whereio.hwill be definedWeirdly I didn't see this error in a similar library I updated to
v3.3.0which has a similar build process.I've verified that #2673 fixes the build and #2696 also fixes it. I don't know which direction you want to go with and I don't use
uvin my builds but hoping at least one of them is chosen :)joerick commentedon Jan 28, 2026
If you're only building 64-bit Windows wheels, I've found that passing
--vsenvto meson fixes the issue, like this:I think I understand now why some users are seeing this and others are not. Some users are using
ilammy/msvc-dev-cmdto set up their toolchain environment variables. They are hitting this bug due to changes in how we set the PATH variable in 3.3.0. Users that use--vsenvdon't see the issue because meson is explicitly finding the VS compiler toolchain.We'll fix the PATH mangling issue soon.
trim21 commentedon Jan 28, 2026
You can just delete it
jborean93 commentedon Jan 28, 2026
If it helps, or confuses, I am not explicitly setting up the toolchain in my broken example. Seems like setuptools has the logic to lookup the MSVC paths but something broke the logic with the PATH changes. Very much related to your PATH changes in 3.3.0 but it doesn't seem strictly related to
ilammy/msvc-dev-cmd, just the general lookup logic and how setuptools interacts with it.Fix the PATH mangling in action.yml
Fix the PATH mangling in action.yml (#2723)
Downgrade cibuildwheel to v3.2.1 to fix Windows link.exe issue