Open joshuafc opened 3 days ago
currently i modify the header file in windows sdk: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um\ProcessSnapshot.h it can works now
// #if (NTDDI_VERSION >= NTDDI_WINBLUE)
#if (NTDDI_VERSION >= NTDDI_WIN8)
Looks like it was a bug in the earlier version of the headers, and our build wouldn't have worked on Windows 8 as the API was not added until 8.1.
I guess it's time to move our NTDDI_VERSION to Win 10. That ought to be safe enough to do in 3.13.1 provided we don't have to make other code changes, but it'll be hard to tell until we've got a diff.
Anyone who wants to give it a go, go right ahead. I'll get to it eventually, but someone else might be faster.
You need to redirect the project to the latest WinSDK installed on your local machine. Instead of compiling without making any modifications.
The latest WinSDK is the "problem", because they fixed the definition. You'd need to redirect to an older WinSDK that still has the bug in its headers.
I have solved my problem by modify ProcessSnapshot.h
in windows sdk.
Should I close this issue or keep it open until the Python code is adapted to the new version of Windows SDK?
Leave it open. We have a genuine bug here, and modifying the Windows SDK is not a suitable solution.
Thanks for reporting. If you don't feel the need to contribute any further, don't worry about it.
Looks like 3.12 is also affected, but there we should only move the API version to 8.1. No installer changes will be required for that.
Have asked RM on Discord which way to go for 3.13 - either move the API version to 8.1 and allow installs, or move to 10 and block installs on 8.1.
It seems that these errors do not occur when I compile version 3.13, perhaps you haven't redirected the project's winSDK.
You'll need to install the latest Windows SDK, which released three days ago. And if you're just running a Visual Studio update to get it, then you'll likely need to opt into a preview release and explicitly select the checkbox.
But once the new SDK is installed, these errors do occur.
Bug report
Bug description:
same as Error when building _freeze_module
in C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um\ProcessSnapshot.h#L370
but in pyconfig.h#L165
in Msi.h#L45
May be that is the problem, with NTDDI not large enough, the PssCaptureSnapshot is not defined, then build failed.
below is full log
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs