New submission from Lin Gao <gaoli...@beyondsoft.com>:

We (the MSVC ++ team) is trying to use VS2019 to replace VS2017 to 
automatically build Python3(branch 3.6)on Windows. First build failed with 
error MSB8036: The Windows SDK version 10.0.10586.0 was not found. So we 
modified the build command line to 'build -e -r -v "/p:PlatformToolset=v142" 
"/p:WindowsTargetPlatformVersion=10.0.18362.0"' , error MSB8036 has 
disappeared, but triggers another error 'C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(173,1): fatal error C1189: #error:  "No 
Target Architecture"'. After investigation, this error is reported whenever the 
F:\gitP\python\cpython\Modules\_io\_iomodule.c file is compiled. And this error 
will disappear when we add #include <windows.h> to the _iomodule.c file.But 
when I rebuilt again, I encountered many errors.

Does Python3 currently support VS2019 automated builds? If support Could you 
please help to take a look? Thank you so much!

Here is repro steps:
1. git clone -b "3.6" -c core.autocrlf=true 
https://github.com/python/cpython.git F:\gitP\python\cpython
2. Open a VS 2019 16.4.5 x86 command prompt and browse to F:\gitP\python\cpython
3. checkout the revision to f1f9c0c.
4. Add #include <windows.h> to the _iomodule.c.
5. cd F:\gitP\python\cpython\PCBuild
6. devenv /upgrade pcbuild.sln
7. build -e -r -v "/p:PlatformToolset=v142" 
"/p:WindowsTargetPlatformVersion=10.0.18362.0"

Error:
19>LINK : fatal error LNK1181: cannot open input file 
'Microsoft.VisualStudio.Setup.Configuration.Native.lib' 
40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20779): error C2059: syntax error: 
'constant' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20791): error C2059: syntax error: '}' 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20792): error C2059: syntax error: '}' 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20793): error C2143: syntax error: 
missing '{' before '*' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20801): error C2061: syntax error: 
identifier 'IMAGE_POLICY_ENTRY' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20802): error C2059: syntax error: '}' 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\winnt.h(20803): error C2143: syntax error: 
missing '{' before '*' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1032): error C2059: syntax 
error: 'constant' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1034): error C2059: syntax 
error: '}' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1151): error C2059: syntax 
error: 'constant' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1153): error C2059: syntax 
error: '}' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1032): error C2059: syntax 
error: 'constant' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1034): error C2059: syntax 
error: '}' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1151): error C2059: syntax 
error: 'constant' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
    40>C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(1153): error C2059: syntax 
error: '}' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
40>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.EXE"' : 
return code '0x2' [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
40>NMAKE : fatal error U1077: 'xcopy' : return code '0x4' 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
         Stop.
    40>C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: The command "setlocal 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: if not exist 
"F:\gitP\python\cpython\externals\tcltk\bin\tk86t.dll" goto build 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: if not exist 
"F:\gitP\python\cpython\externals\tcltk\include\tk.h" goto build 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: if not exist 
"F:\gitP\python\cpython\externals\tcltk\lib\tk86t.lib" goto build 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: if not exist "F:\gitP\python\cpython\externals\tcltk\lib\tk8.6" 
goto build [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: goto :eof [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: :build [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\VC\ [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: cd /D "F:\gitP\python\cpython\externals\tk-8.6.6.0\win" 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: nmake /nologo -f makefile.vc RC=rc MACHINE=IX86 OPTS=msvcrt 
BUILDDIRTOP="Release" 
TCLDIR="F:\gitP\python\cpython\externals\tcl-core-8.6.6.0" 
INSTALLDIR="F:\gitP\python\cpython\externals\tcltk"  all 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: nmake /nologo -f makefile.vc RC=rc MACHINE=IX86 OPTS=msvcrt 
BUILDDIRTOP="Release" 
TCLDIR="F:\gitP\python\cpython\externals\tcl-core-8.6.6.0" 
INSTALLDIR="F:\gitP\python\cpython\externals\tcltk"  install-binaries 
install-libraries [F:\gitP\python\cpython\PCbuild\tk.vcxproj]
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5):
 error MSB3073: " exited with code 2. 
[F:\gitP\python\cpython\PCbuild\tk.vcxproj]

----------
components: Build
files: build.log
messages: 364072
nosy: Lin
priority: normal
severity: normal
status: open
title: Using VS2019 to automatically build Python3 and it failed to build
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file48973/build.log

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39952>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to