Skip to content

[cpython] cpython/3.12.7: build failed in Windows MSVC toolchain194 #28355

Description

@gravitional

Description

with conanfile.py require cpython

def requirements(self):
    self.requires("cpython/3.12.7")

then install

conan install . --build=missing -pr ../pr/msvc_debug -vv

but failed with

pywlauncher: The term 'pywlauncher' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
_tkinter: The term '_tkinter' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
_multiprocessing: The term '_multiprocessing' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
_msi: The term '_msi' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

with -vv option, we see the full command

cpython/3.12.7: Full command: "C:\Users\jerry\.conan2\p\b\cpyth3ec40ffde3d92\b\build-debug\conan\conanbuild.bat" && pwsh -Command "&'C:\Users\jerry\.conan2\p\b\cpyth3ec40ffde3d92\b\build-debug\conan\conanbuild.ps1'" ; cmd /c "msbuild.exe \"C:\Users\jerry\.conan2\p\b\cpyth3ec40ffde3d92\b\src\PCbuild\pcbuild.sln\" -p:Configuration=\"Debug\" -p:Platform=x64 -target:venvwlauncher;pywlauncher;_tkinter;_multiprocessing;_msi;unicodedata;_queue;_bz2;_uuid;select;_asyncio;_zoneinfo;venvlauncher;_decimal;_overlapped;_lzma;_hashlib;_socket;_elementtree;_sqlite3;pyshellext;python3dll;_freeze_module;winsound;pythoncore;_wmi;_ctypes;pylauncher;python;pythonw;pyexpat;_ssl /p:PlatformToolset=v143"

In my opion, it seems that there is missing quoting in -target:xxxx of msbuild.exe,
i.e. It shoule be

msbuild.exe xxxx\b\src\PCbuild\pcbuild.sln `
  -p:Configuration=Debug -p:Platform=x64 `
  -target:"venvwlauncher;...;_ssl" /p:PlatformToolset=v143

note the quoting marks around venvwlauncher;...;_ssl.

You know, cmd quoting sucks.

Package and Environment Details

  • Package Name/Version: cpython/3.12.7
  • Operating System+version: Windows 11 26100.4946
  • Compiler+version: MSVC cl.exe 19.44.35215
  • Conan version: conan 2.19.1
  • Python version: Python 3.12.10

Conan profile

[settings]
arch=x86_64
# build_type=Release
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.version=194
os=Windows

[options]
*:shared=True

[conf]
tools.env.virtualenv:powershell=pwsh
tools.microsoft.msbuild:vs_version = 17
tools.cmake.cmaketoolchain:generator=Visual Studio 17 2022

Steps to reproduce

profile msvc_debug is the profile above

conan install . --build=missing -pr msvc_debug -vv

Logs

Click to expand log
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=194
os=Windows
[options]
*:shared=True
[conf]
tools.cmake.cmaketoolchain:generator=Visual Studio 17 2022
tools.env.virtualenv:powershell=pwsh
tools.microsoft.msbuild:vs_version=17

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.py (demo/0.1): C:\Users\jerry\cocos\teconan\te3_python3\conanfile.py
Requirements
    bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5 - Cache
    cpython/3.12.7#c6f89b3dd5aeee00561f564c88cdc411 - Cache
    eigen/3.4.0#617f63c7fe27cba4b8cf6aa91e698ee9 - Cache
    expat/2.7.1#b0b67ba910c5147271b444139ca06953 - Cache
    fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f - Cache
    libffi/3.4.4#33feb967b22d92ea0becce63bf9d5490 - Cache
    mpdecimal/2.5.1#cad87046d76460b8e2fc159194e50e7e - Cache
    openssl/3.5.2#0c5a5e15ae569f45dff57adcf1770cf7 - Cache
    spdlog/1.15.3#3ca0e9e6b83af4d0151e26541d140c86 - Cache
    sqlite3/3.45.2#60f2d3278e7bc12c8ef02ac75119c137 - Cache
    tcl/8.6.10#bb67af0f98ba1c42f524578e0d12daff - Cache
    tk/8.6.10#1e8cbe0b5d8257de6bc6904da048766f - Cache
    xz_utils/5.4.5#b885d1d79c9d30cff3803f7f551dbe66 - Cache
    zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76 - Cache
Build requirements
    autoconf/2.71#51077f068e61700d65bb05541ea1e4b0 - Cache
    automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f - Cache
    m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
    msys2/cci.latest#5b73b10144f73cc5bfe0572ed9be39e1 - Cache
    nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904 - Cache
    strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e - Cache
Resolved version ranges
    expat/[>=2.6.2 <3]: expat/2.7.1
    openssl/[>=1.1 <4]: openssl/3.5.2
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
Connecting to remote 'conancenter' anonymously
mpdecimal/2.5.1: Compatible package ID 2f68faeac732f73bf528d456035f3c539af55ea4 equal to the default package ID: Skipping it.
mpdecimal/2.5.1: Main binary package '2f68faeac732f73bf528d456035f3c539af55ea4' missing
mpdecimal/2.5.1: Checking 7 compatible configurations
mpdecimal/2.5.1: Found compatible package 'c99b68c87e2f537e31dc13440d05f8b29c33d6e2': compiler.cppstd=20
cpython/3.12.7: Main binary package '80dad6286fe65fa0d25ebe584fc2147c78c9f30b' missing
cpython/3.12.7: Checking 1 compatible configurations
cpython/3.12.7: Compatible configurations not found in cache, checking servers
cpython/3.12.7: '88ac59e7456f33e83505e31c4e2857ac6023d132': compiler.version=193
Requirements
    bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5:ffe29dc89cb0a8c338d42a3a3d48c064ba669f83#42eaa8632c4824fbb6f02b6be50fec50 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: build_executable=True shared=True
    cpython/3.12.7#c6f89b3dd5aeee00561f564c88cdc411:80dad6286fe65fa0d25ebe584fc2147c78c9f30b - Build
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: optimizations=False shared=True with_bz2=True with_lzma=True with_sqlite3=True with_tkinter=True
        requires: openssl/3.5.Z expat/2.7.Z libffi/3.4.Z mpdecimal/2.5.Z bzip2/1.0.Z sqlite3/3.45.Z tk/8.6.Z tcl/8.6.Z zlib/1.3.Z xz_utils/5.4.Z
    eigen/3.4.0#617f63c7fe27cba4b8cf6aa91e698ee9:da39a3ee5e6b4b0d3255bfef95601890afd80709#b2e7c2d86c5d1dbefc534889aa72e12c - Cache
    expat/2.7.1#b0b67ba910c5147271b444139ca06953:2938134b9c71d47ede3874c69d56f9b2dca18084#88b10c32dea7e15b37ab051d2a1a12b9 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: char_type=char large_size=False shared=True
    fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f:d39849b30251e888847d30cb8a4ee699576a9661#aba641ff1f13d8c1d9f14c0e84040bd8 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: header_only=False shared=True with_os_api=True with_unicode=True
    libffi/3.4.4#33feb967b22d92ea0becce63bf9d5490:0f8d842e0987e9944a4b77a4e54552af3770ca28#8ea5d1b388b24450384440040b5d34e6 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: shared=True
    mpdecimal/2.5.1#cad87046d76460b8e2fc159194e50e7e:c99b68c87e2f537e31dc13440d05f8b29c33d6e2#c31fe72d1dc9f024cb9985b4e3875ca8 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: cxx=True shared=True
        compatibility_delta: settings=[('compiler.cppstd', '20')]
    openssl/3.5.2#0c5a5e15ae569f45dff57adcf1770cf7:de7b0da43cc5384f7d7218a5bf2de835d1da664e#dad2b90eaeff23992f5287480dfad34f - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: 386=False capieng_dialog=False enable_capieng=False enable_trace=False enable_weak_ssl_ciphers=False no_apps=False no_aria=False no_asm=False no_async=False no_autoload_config=False no_bf=False no_blake2=False no_camellia=False no_cast=False no_chacha=False no_cms=False no_comp=False no_ct=False no_deprecated=False no_des=False no_dgram=False no_dh=False no_dsa=False no_dso=False no_ec=False no_ecdh=False no_ecdsa=False no_engine=False no_filenames=False no_fips=False no_gost=False no_idea=False no_legacy=False no_md2=True no_md4=False no_mdc2=False no_module=False no_ocsp=False no_pinshared=False no_rc2=False no_rc4=False no_rc5=False no_rfc3779=False no_rmd160=False no_seed=False no_sm2=False no_sm3=False no_sm4=False no_sock=False no_srp=False no_srtp=False no_sse2=False no_ssl=False no_ssl3=False no_stdio=False no_threads=False no_tls1=False no_ts=False no_whirlpool=False no_zlib=False openssldir=None shared=True tls_security_level=None
        requires: zlib/1.3.Z
    spdlog/1.15.3#3ca0e9e6b83af4d0151e26541d140c86:5b54af595debc892c092b8c43d032b4496c1d4f1#a2671fd65cd0d540be9ce3ce1edad38c - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: header_only=False no_exceptions=False shared=True use_std_fmt=False wchar_console=False wchar_filenames=False wchar_support=False
        requires: fmt/11.2.Z
    sqlite3/3.45.2#60f2d3278e7bc12c8ef02ac75119c137:f2551ca144ca4a3dded852d57866d305b847df0a#47f363ca3295dcbd6623938ca5b7411b - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: build_executable=True disable_gethostuuid=False enable_column_metadata=True enable_dbpage_vtab=False enable_dbstat_vtab=False enable_default_secure_delete=False enable_default_vfs=True enable_explain_comments=False enable_fts3=False enable_fts3_parenthesis=False enable_fts4=False enable_fts5=False enable_json1=False enable_math_functions=True enable_preupdate_hook=False enable_rtree=True enable_soundex=False enable_unlock_notify=True max_blob_size=None max_column=None max_variable_number=None omit_deprecated=False omit_load_extension=False shared=True threadsafe=1 use_alloca=False use_uri=False
    tcl/8.6.10#bb67af0f98ba1c42f524578e0d12daff:24286fd7193cf73472318c8d019541263865f9e7#ee99111a237d6a968af65da7edae64ee - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: shared=True
        requires: zlib/1.3.Z
    tk/8.6.10#1e8cbe0b5d8257de6bc6904da048766f:a71aaf931c10e670aa8e5a8182bdad401eaaa43a#cb0d32600a7128f7f42afa3460876a33 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: shared=True
        requires: tcl/8.6.Z
    xz_utils/5.4.5#b885d1d79c9d30cff3803f7f551dbe66:0f8d842e0987e9944a4b77a4e54552af3770ca28#d3d89f95f6c76bfb661f449bb62861c5 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: shared=True
    zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76:0f8d842e0987e9944a4b77a4e54552af3770ca28#44ca8cf7aaec690477aa629c2116a5b8 - Cache
        settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
        options: shared=True
Build requirements
    autoconf/2.71#51077f068e61700d65bb05541ea1e4b0:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715#b3a5091ff4602fbd9feebc093052d712 - Skip
        settings: os=Windows
    automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715#d2341aff75938975508b61e922aa1b92 - Skip
        settings: os=Windows
    m4/1.4.19#b38ced39a01e31fef5435bc634461fd2:723257509aee8a72faf021920c2874abc738e029#f9a0d644c9e90c7024f844416dbe7384 - Skip
        settings: os=Windows arch=x86_64 build_type=Release
    msys2/cci.latest#5b73b10144f73cc5bfe0572ed9be39e1:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#5dd2f2c21933dbc2a76ad9fbe8a701c5 - Skip
        settings: os=Windows arch=x86_64
        options: additional_packages=None exclude_files=*/link.exe packages=base-devel,binutils,gcc
    nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904:723257509aee8a72faf021920c2874abc738e029#cfe619d6bb82b0997c21183fa9b7183d - Skip
        settings: os=Windows arch=x86_64 build_type=Release
    strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e:522dcea5982a3f8a5b624c16477e47195da2f84f#a365b3810f698e2f0a00fbeece022903 - Skip
        settings: os=Windows arch=x86_64

======== Installing packages ========
bzip2/1.0.8: Already installed! (1 of 14)
eigen/3.4.0: Already installed! (2 of 14)
expat/2.7.1: Already installed! (3 of 14)
fmt/11.2.0: Already installed! (4 of 14)
mpdecimal/2.5.1: Already installed! (5 of 14)
sqlite3/3.45.2: Already installed! (6 of 14)
xz_utils/5.4.5: Already installed! (7 of 14)
zlib/1.3.1: Already installed! (8 of 14)
libffi/3.4.4: Already installed! (9 of 14)
spdlog/1.15.3: Already installed! (10 of 14)
tcl/8.6.10: Already installed! (11 of 14)
openssl/3.5.2: Already installed! (12 of 14)
tk/8.6.10: Already installed! (13 of 14)
tk/8.6.10: Setting TK_LIBRARY environment variable: C:/Users/jerry/.conan2/p/b/tk768f821f92ae6/p/lib/tk8.6
tk/8.6.10: Setting TK_ROOT environment variable: C:/Users/jerry/.conan2/p/b/tk768f821f92ae6/p

-------- Installing package cpython/3.12.7 (14 of 14) --------
cpython/3.12.7: Building from source
cpython/3.12.7: Package cpython/3.12.7:80dad6286fe65fa0d25ebe584fc2147c78c9f30b
cpython/3.12.7: settings: os=Windows arch=x86_64 compiler=msvc compiler.runtime=dynamic compiler.runtime_type=Debug compiler.version=194 build_type=Debug
cpython/3.12.7: options: optimizations=False shared=True with_bz2=True with_lzma=True with_sqlite3=True with_tkinter=True
cpython/3.12.7: requires: openssl/3.5.Z expat/2.7.Z libffi/3.4.Z mpdecimal/2.5.Z bzip2/1.0.Z sqlite3/3.45.Z tk/8.6.Z tcl/8.6.Z zlib/1.3.Z xz_utils/5.4.Z
cpython/3.12.7: Copying sources to build folder
cpython/3.12.7: Building your package in C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b
cpython/3.12.7: Calling generate()
cpython/3.12.7: Generators folder: C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\build-debug\conan
cpython/3.12.7: MSBuildToolchain created conantoolchain_debug_x64.props
cpython/3.12.7: MSBuildToolchain writing conantoolchain.props
cpython/3.12.7: Generating aggregated env files
cpython/3.12.7: Generated aggregated env files: ['conanbuild.bat', 'conanbuild.ps1']
cpython/3.12.7: Calling build()
cpython/3.12.7: Apply patch (bugfix): Fix ARM/ARM64 mismatch in project file
cpython/3.12.7: Apply patch (portability): Support shared libffi
cpython/3.12.7: Apply patch (conan): Allow package to be relocatable
cpython/3.12.7: Apply patch (conan): Remove section of solution file forcing projects to be built that might not be used for this recipe
cpython/3.12.7: Patching runtime
cpython/3.12.7: Building 32 Visual Studio projects: ['pylauncher', '_uuid', 'python', '_ctypes', '_elementtree', '_asyncio', 'unicodedata', 'pyexpat', '_multiprocessing', 'winsound', 'pywlauncher', 'pyshellext', '_ssl', '_bz2', '_queue', 'pythonw', '_tkinter', '_hashlib', '_decimal', 'select', '_freeze_module', '_zoneinfo', 'venvwlauncher', '_lzma', 'pythoncore', '_wmi', '_sqlite3', 'venvlauncher', 'python3dll', '_overlapped', '_msi', '_socket']
cpython/3.12.7: RUN: msbuild.exe "C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\src\PCbuild\pcbuild.sln" -p:Configuration="Debug" -p:Platform=x64 -target:pylauncher;_uuid;python;_ctypes;_elementtree;_asyncio;unicodedata;pyexpat;_multiprocessing;winsound;pywlauncher;pyshellext;_ssl;_bz2;_queue;pythonw;_tkinter;_hashlib;_decimal;select;_freeze_module;_zoneinfo;venvwlauncher;_lzma;pythoncore;_wmi;_sqlite3;venvlauncher;python3dll;_overlapped;_msi;_socket /p:PlatformToolset=v143
cpython/3.12.7: Full command: "C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\build-debug\conan\conanbuild.bat" && pwsh -Command "&'C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\build-debug\conan\conanbuild.ps1'" ; cmd /c "msbuild.exe \"C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\src\PCbuild\pcbuild.sln\" -p:Configuration=\"Debug\" -p:Platform=x64 -target:pylauncher;_uuid;python;_ctypes;_elementtree;_asyncio;unicodedata;pyexpat;_multiprocessing;winsound;pywlauncher;pyshellext;_ssl;_bz2;_queue;pythonw;_tkinter;_hashlib;_decimal;select;_freeze_module;_zoneinfo;venvwlauncher;_lzma;pythoncore;_wmi;_sqlite3;venvlauncher;python3dll;_overlapped;_msi;_socket /p:PlatformToolset=v143"
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - winsdk_version=None - vcvars_ver=14.4
[vcvarsall.bat] Environment initialized for: 'x64'
适用于 .NET Framework MSBuild 版本 17.14.19+164abd434
生成启动时间为 2025/9/9 15:24:34。

项目“C:\Users\jerry\.conan2\p\b\cpyth4a65c0f00dbf1\b\src\PCbuild\pcbuild.sln”在节点 1 上(pylauncher 个目标)。
...
已成功生成。
    0 个警告
    0 个错误

已用时间 00:00:02.75
_uuid: The term '_uuid' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Python 3.12.10 (tags/v3.12.10:0cc8128, Apr  8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions