Open tps800 opened 1 year ago
In 3.11, the include in "PC/_testconsole.c" should target "..\Modules\_io\_iomodule.h" instead of "..\modules\_io\_iomodule.h".
https://github.com/python/cpython/blob/v3.11.4/PC/_testconsole.c#L13
This isn't a problem in 3.12+ since "PC/_testconsole.c" no longer includes "Modules/_io/_iomodule.h".
Contributions welcome. This is outside of our normal supported dev environment.
If it doesn't apply to 3.13, then start with a 3.12 PR and we can backport from there.
TL;DR: In Python 3.12+, Python can be built with a case-sensitive filesystem, but the incremental build appears to be broken.
I created a new folder, set it to be case-sensitive, and updated the Git config as described at https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity.
Python main branch (978fba58aef347de4a1376e525df2dacc7b2fff3) can be build on this folder, except these warnings:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8064: 项“C:\Users\xxxxx\case-sensitive\cpython\externals\\mpdecimal-4.0.0\\libmpdec\vcdiv64.asm”的自定义生成成功,但指定的依赖项“c:\users\xxxxx\case-sensitive\cpython\externals\mpdecimal-4.0.0\libmpdec\vcdiv64.asm”不存在。这可能会导致增量生成无法正常工作。 [C:\Users\xxxxx\case-sensitive\cpython\PCbuild\_decimal.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8065: 项“C:\Users\xxxxx\case-sensitive\cpython\externals\\mpdecimal-4.0.0\\libmpdec\vcdiv64.asm”的自定义生成成功,但尚未创建指定的输出“c:\users\xxxxx\case-sensitive\cpython\pcbuild\obj\313amd64_debug\_decimal\vcdiv64.obj”。这可能会导致增量生成无法正常工作。 [C:\Users\xxxxx\case-sensitive\cpython\PCbuild\_decimal.vcxproj]
The localized Windows messages state that some targets were built successfully, but the output file does not exist, and the incremental generation may woult work. I suspect this issue is due to the path name discrepancy (pcbuild
instead of PCbuild
, users
instead of Users
). This also results in PCbuild\build.bat
recompiling almost the entire project.
Therefore, in Python 3.12+, Python can be built with a case-sensitive filesystem, but it seems that the incremental build process is malfunctioning.
It looks like something is calculating an output filename, normalising it (multiple backslashes are also combined) and lowercasing it (the case differences noted).
I'm not sure that we're doing that in any of our headers? It might be a VS issue.
I'm not familiar with MSBuild, but I found that the target is caculated from CustomBuild
's include, which always returns lowercased target name: https://github.com/python/cpython/blob/c4f9823be277b2e3de2315526612276626217743/PCbuild/_decimal.vcxproj#L144-L150
Current MSBuilld version is 17.9.8+b34f75857
on my machine. Maybe we can wait to see Microsoft fix this.
I wouldn't bet on a fix anytime soon, at least not until something much more important than us needs to work on a case-sensitive file system.
More likely we need to create a different Target
to run the ml64
command and assign the output metadata ourselves, to bypass whatever extra step is happening in the C++ targets files.
Bug report
Trying to compile python 3.10.12 (as trying to compile 3.11.4, 3.12.0b2) on windows leads to following error:
Renaming
Modules
tomodules
makes the error vanish, but leads to directory..\Modules\...
not found at other places.Your environment
Visual Studio 2022, 17.6.2
Cygwin 3.5.x
MSYS64
Git 2.41.0_windows_1
Python 3.10.11 or Python 3.11.4 (Python 3.12.0b1 is not usable -- to many errors).
Windows 10 with file system partly case sensitive (not only case aware -- git configured to checkout to case sensitive file system and set case sensitivity -> git cloned parts of a file system are case sensitive this way. Directories with case only distinguished entries are possible).
CPython versions tested on: 3.10.12
Operating system and architecture: Windows 10, amd64, FS: NTFS