Closed liudonghua123 closed 2 weeks ago
I found it comes from here.
Can you confirm that the code is unmodified? Normally issues in _freeze_module.exe
only occur when the sources have been changed but the various regeneration steps haven't been run.
It's vaguely possible that one of the default Tools/msi/build.bat
options are causing a problem. They don't get used often, as they're mainly for testing. Tools/msi/buildrelease.bat
is the script that would usually be used.
Can you confirm that the code is unmodified? Normally issues in
_freeze_module.exe
only occur when the sources have been changed but the various regeneration steps haven't been run.It's vaguely possible that one of the default
Tools/msi/build.bat
options are causing a problem. They don't get used often, as they're mainly for testing.Tools/msi/buildrelease.bat
is the script that would usually be used.
@zooba Hi, I modified few lines of code indead, and If I changed Tools/msi/build.bat
to Tools/msi/buildrelease.bat
, it's the same problems.
And I found some files were changed by .\PCbuild\build.bat
maybe, so I reverted them and tried again. Now it's working.
However, it still failed with C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32\python.exe" "C:\Users\Administrator\code\windows-python-installer\cpython\PC\layout" -b "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32" -s "C:\Users\Administrator\code\windows-python-installer\cpython" -t "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32" --zip "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-embed-win32.zip" --precompile --zip-lib --include-underpth --include-stable --flat-dlls" exited with code -1073741819.
, it's the same issue on https://github.com/python/cpython/issues/123414. Even I stashed the changes and try to build without modification, it's the same problems.
Project "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj" on node 1 (Build target(
s)).
_Build:
setlocal
set PYTHONPATH=C:\Users\Administrator\code\windows-python-installer\cpython\Lib
rmdir /q/s "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip
_win32"
"C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32\python.exe" "C:\Users\Ad
ministrator\code\windows-python-installer\cpython\PC\layout" -b "C:\Users\Administrator\code\windows-python-installer
\cpython\Tools\msi\..\..\PCbuild\\win32" -s "C:\Users\Administrator\code\windows-python-installer\cpython" -t "C:\Use
rs\Administrator\code\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32" --zip "C:\
Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-embed-
win32.zip" --precompile --zip-lib --include-underpth --include-stable --flat-dlls
The system cannot find the file specified.
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: The command
"setlocal
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073:
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: set PYTHONPA
TH=C:\Users\Administrator\code\windows-python-installer\cpython\Lib
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: rmdir /q/s "
C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32"
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: "C:\Users\Ad
ministrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32\python.exe" "C:\Users\Administrator\co
de\windows-python-installer\cpython\PC\layout" -b "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\m
si\..\..\PCbuild\\win32" -s "C:\Users\Administrator\code\windows-python-installer\cpython" -t "C:\Users\Administrator\c
ode\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32" --zip "C:\Users\Administrator\
code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-embed-win32.zip" --precompil
e --zip-lib --include-underpth --include-stable --flat-dlls" exited with code -1073741819.
Done Building Project "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj" (Build tar
get(s)) -- FAILED.
Build FAILED.
"C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj" (Build target) (1) ->
(_Build target) ->
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: The comman
d "setlocal
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073:
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: set PYTHONPA
TH=C:\Users\Administrator\code\windows-python-installer\cpython\Lib
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: rmdir /q/s "
C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32"
C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: "C:\Users\Ad
ministrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32\python.exe" "C:\Users\Administrator\co
de\windows-python-installer\cpython\PC\layout" -b "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\m
si\..\..\PCbuild\\win32" -s "C:\Users\Administrator\code\windows-python-installer\cpython" -t "C:\Users\Administrator\c
ode\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32" --zip "C:\Users\Administrator\
code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-embed-win32.zip" --precompil
e --zip-lib --include-underpth --include-stable --flat-dlls" exited with code -1073741819.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:03.08
C:\Users\Administrator>"C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\win32\python.exe" -V
Python 3.13.0rc1
C:\Users\Administrator>"C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\win32\python.exe"
C:\Users\Administrator>echo %errorlevel%
-1073741819
C:\Users\Administrator>
Bug report
Bug description:
Hi, I tried to build msi via
.\tools\msi\build.bat
on a windows vnext server, but it failed. If I use.\PCbuild\build.bat
, it's ok.Details
``` C:\Users\Administrator>ver Microsoft Windows [Version 10.0.26080.1] C:\Users\Administrator> PS C:\Users\Administrator\code\windows-python-installer\cpython> .\tools\msi\build.bat -x86 -b Using "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\externals\windows-installer\pythonx86\tools\python.exe" (found in externals directory) Fetching external libraries... Fetching external tools... binutils already exists, skipping. gpg already exists, skipping. htmlhelp already exists, skipping. nuget already exists, skipping. redist-1 already exists, skipping. wix-314 already exists, skipping. Finished. Using "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe" (found in the Visual Studio installation) Using "C:\Users\Administrator\code\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\..\externals\pythonx86\tools\python.exe" (found in externals directory) Fetching external libraries... bzip2-1.0.8 already exists, skipping. mpdecimal-4.0.0 already exists, skipping. sqlite-3.45.3.0 already exists, skipping. xz-5.2.5 already exists, skipping. zlib-1.3.1 already exists, skipping. Fetching external binaries... libffi-3.4.4 already exists, skipping. openssl-bin-3.0.13 already exists, skipping. tcltk-8.6.14.0 already exists, skipping. Finished. Using "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe" (found in the environment) Using "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\\..\externals\pythonx86\tools\python.exe" (found in externals directory) C:\Users\Administrator\code\windows-python-installer\cpython>"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe" "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Debug /p:Platform=Win32 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:DisableGil= /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" /p:UseJIT= /p:UseTIER2= _freeze_module.c config_minimal.c atexitmodule.c faulthandler.c gcmodule.c getbuildinfo.c getpath_noop.c posixmodule.c signalmodule.c timemodule.c _tracemalloc.c _iomodule.c bufferedio.c bytesio.c fileio.c iobase.c stringio.c textio.c winconsoleio.c abstract.c boolobject.c bytearrayobject.c bytes_methods.c bytesobject.c call.c capsule.c cellobject.c classobject.c codeobject.c complexobject.c descrobject.c dictobject.c enumobject.c exceptions.c fileobject.c floatobject.c frameobject.c funcobject.c genericaliasobject.c genobject.c iterobject.c listobject.c longobject.c memoryobject.c methodobject.c moduleobject.c namespaceobject.c object.c obmalloc.c odictobject.c picklebufobject.c rangeobject.c setobject.c sliceobject.c structseq.c tupleobject.c typeobject.c typevarobject.c unicodectype.c unicodeobject.c unionobject.c weakrefobject.c myreadline.c parser.c peg_api.c pegen.c pegen_errors.c action_helpers.c string_parser.c token.c buffer.c state.c lexer.c string_tokenizer.c file_tokenizer.c utf8_tokenizer.c readline_tokenizer.c helpers.c invalid_parameter_handler.c msvcrtmodule.c winreg.c _warnings.c asdl.c assemble.c ast.c ast_opt.c ast_unparse.c bltinmodule.c brc.c bootstrap_hash.c ceval.c codecs.c compile.c context.c critical_section.c crossinterp.c dtoa.c dynamic_annotations.c dynload_win.c errors.c fileutils.c flowgraph.c formatter_unicode.c frame.c future.c gc.c gc_gil.c gc_free_threading.c getargs.c getcompiler.c getcopyright.c getopt.c getplatform.c getversion.c ceval_gil.c hamt.c hashtable.c import.c importdl.c initconfig.c instruction_sequence.c interpconfig.c intrinsics.c instrumentation.c jit.c legacy_tracing.c lock.c marshal.c modsupport.c mysnprintf.c mystrtoul.c object_stack.c optimizer.c optimizer_analysis.c optimizer_symbols.c parking_lot.c pathconfig.c perf_trampoline.c perf_jit_trampoline.c preconfig.c pyarena.c pyctype.c pyfpe.c pyhash.c pylifecycle.c pymath.c pystate.c pystrcmp.c pystrhex.c pystrtod.c Python-ast.c pythonrun.c Python-tokenize.c pytime.c qsbr.c specialize.c structmember.c suggestions.c symtable.c thread.c traceback.c tracemalloc.c sysmodule.c _freeze_module.vcxproj -> C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\win32\_freeze_module_d.exe Assertion failed: PyUnicode_GET_LENGTH(string) != 1, file C:\Users\Administrator\code\windows-python-installer\cpython\Include\internal\pycore_unicodeobj ect_generated.h, line 54 C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\_freeze_module.vcxproj(470,5): error MSB3073: The command ""C:\Users\Administrator\cod e\windows-python-installer\cpython\PCbuild\win32\_freeze_module_d.exe" "importlib._bootstrap" "C:\Users\Administrator\code\windows-python-installer\cpython \Lib\importlib\_bootstrap.py" "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\313win32_Debug\_freeze_module\importlib._bootstrap. g.h"" exited with code 3. Build FAILED. C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\_freeze_module.vcxproj(470,5): error MSB3073: The command ""C:\Users\Administrator\cod e\windows-python-installer\cpython\PCbuild\win32\_freeze_module_d.exe" "importlib._bootstrap" "C:\Users\Administrator\code\windows-python-installer\cpython \Lib\importlib\_bootstrap.py" "C:\Users\Administrator\code\windows-python-installer\cpython\PCbuild\obj\313win32_Debug\_freeze_module\importlib._bootstrap. g.h"" exited with code 3. 0 Warning(s) 1 Error(s) Time Elapsed 00:01:48.48 PS C:\Users\Administrator\code\windows-python-installer\cpython> ```CPython versions tested on:
3.13
Operating systems tested on:
Windows