This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 3.11 build failure on Win10: new _freeze_module changes?
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, eryksun, neonene, pablogsal, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: release blocker Keywords: patch

Created on 2022-01-01 01:28 by terry.reedy, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30473 merged steve.dower, 2022-01-07 23:22
Messages (9)
msg409445 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-01-01 01:28
Installed 3.11.0a3 was built Dec  8 2021, 22:56:33.  My corresponding repository build is a bit older than that.  Rebuilding now I get
  fileutils.c
..\Python\fileutils.c(2132): error C2065: 'PATHCCH_FORCE_ENABLE_LONG_NAME_PROCE
SS': undeclared identifier [f:\dev\3x\PCbuild\_freeze_module.vcxproj]

I have likely seen this before today but mistook the error message for a warning and did not check the respository build date.  3.9 and 3.10 just update normally, so unique to 3.11 and apparently new freeze changes.
msg409456 - (view) Author: neonene (neonene) * Date: 2022-01-01 12:26
The flag is not for Win8.1 and available starting in Win10 1703 with v10.0.15021 SDK.
msg409595 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-01-03 16:07
Good catch. We still support 8.1 for this release, so that flag will have to be taken out (and hopefully people won't be impacted by long path names here).
msg409597 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2022-01-03 17:19
With just PATHCCH_ALLOW_LONG_PATHS, PathCchCombineEx() returns a long path as a normal path (i.e. not a \\?\ extended path) if long-path support is enabled for the current process. Otherwise, if long-path support isn't enabled or available, as is always the case in Windows 8.1, then PATHCCH_ALLOW_LONG_PATHS makes PathCchCombineEx() return a long path as an extended path. In most cases, extended paths work fine. A common exception is that extended paths aren't supported for the working directory.

In Windows 10+, PATHCCH_FORCE_ENABLE_LONG_NAME_PROCESS forces PathCchCombineEx() to always return a long path as a normal path, even if long-path support is disabled for the current process. For most cases, this option pretty much guarantees that long paths will cause immediate failures if long-path support is disabled for the current process. In some cases one might want an immediate failure, instead of messing around with extended paths that might fail in some obscure, buggy way. Also, for pure path manipulation one may not care whether the current process can access the path without the \\?\ prefix.
msg409993 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-01-07 18:30
Let me be clearer. This bug prevents me from building main (3.11) to test anything with a proper up-to-date 3.11 binary.  So to me this is highest priority.  Is this just my machine or every Windows system?  How are CI and buildbots rebuilding and running?  Is there some workaround I need to add?  Use newer VC (and change devguide)?
msg410016 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-01-07 19:40
Only a newer WinSDK, which is not in any way a significant change to the resulting build and so isn't part of the "spec" as it were.

But we'll remove the use of this flag once someone has the time to make a PR.

(Remember to add the RM when you declare something a release blocker or the release may not be blocked.)
msg410021 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2022-01-07 20:02
Terry, it's just a simple bug that slipped by. The PATHCCH_OPTIONS enum in the SDK header "PathCch.h" unconditionally defines all of the options. So there's no compiler error when building with a newer version of the SDK, even though we define _WIN32_WINNT to 0x602 (Windows 8).
msg410058 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-01-08 00:07
New changeset d81182b8ec3b1593daf241d44757a9fa68fd14cc by Steve Dower in branch 'main':
bpo-46217: Revert use of Windows constant that is newer than what we support (GH-30473)
https://github.com/python/cpython/commit/d81182b8ec3b1593daf241d44757a9fa68fd14cc
msg410063 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-01-08 00:42
Thank you.  Compiles without even any warnings.  Tests also all pass.
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90375
2022-01-08 00:42:37terry.reedysetmessages: + msg410063
2022-01-08 00:07:13steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-01-08 00:07:00steve.dowersetmessages: + msg410058
2022-01-07 23:22:02steve.dowersetkeywords: + patch
stage: backport needed -> patch review
pull_requests: + pull_request28676
2022-01-07 22:20:51terry.reedysetnosy: + pablogsal
2022-01-07 20:02:26eryksunsetnosy: - pablogsal
messages: + msg410021
2022-01-07 19:40:22steve.dowersetnosy: + pablogsal
messages: + msg410016
2022-01-07 18:30:42terry.reedysetpriority: normal -> release blocker
type: compile error
messages: + msg409993

stage: backport needed
2022-01-03 17:19:33eryksunsetnosy: + eryksun
messages: + msg409597
2022-01-03 16:07:05steve.dowersetmessages: + msg409595
2022-01-01 12:35:32corona10setnosy: + corona10
2022-01-01 12:26:30neonenesetnosy: + neonene
messages: + msg409456
2022-01-01 01:28:51terry.reedysetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Windows
2022-01-01 01:28:36terry.reedycreate