Skip to content

Microsoft toolset 14.40 does not work with SCons 4.7 and earlier #4543

@mwichmann

Description

@mwichmann

This was an anticipated issue (see Discussion #4484) but now it has landed (late May 2024) and indeed things break.

Visual Studio 17.10 has released now, and with it a toolset numbered 14.40. As noted in the linked discussion, previously a version like 14.40 would have indicated the v144 build tools, but this is not the case, we're still on v143. Microsoft knows this could cause some breakage and there's a blog post about it in the discussion, but here we are: things are broken.

These tests failed in a full run:

Failed the following 7 tests:
        SCons\Tool\MSCommon\MSVC\ScriptArgumentsTests.py
        SCons\Tool\MSCommon\vcTests.py
        test\MSVC\msvc_cache_force_defaults.py
        test\MSVC\MSVC_SDK_VERSION.py
        test\MSVC\MSVC_SPECTRE_LIBS.py
        test\MSVC\MSVC_TOOLSET_VERSION.py
        test\MSVC\MSVC_UWP_APP.py

Errors seen include the very expected:

Traceback (most recent call last):
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArgumentsTests.py", line 573, in test_msvc_script_args_none
    self.run_msvc_script_args_none()
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArgumentsTests.py", line 292, in run_msvc_script_args_none
    _ = func(env, version_def.msvc_version, vc_dir, '')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArguments.py", line 929, in msvc_script_arguments
    toolset = _toolset_version(toolset_version)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArguments.py", line 190, in _toolset_version
    vs_def = Config.MSVC_VERSION_INTERNAL[verstr]
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: '14.4'

as well as

Traceback (most recent call last):
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArgumentsTests.py", line 578, in test_msvc_script_args
    self.run_msvc_script_args()
  File "C:\Users\mats\Documents\github\scons\SCons\Tool\MSCommon\MSVC\ScriptArgumentsTests.py", line 310, in run_msvc_script_args
    earlier_toolset_versions = [toolset_def for toolset_def in toolset_versions if toolset_def.msvc_vernum != version_def.msvc_vernum]
                                                                                                              ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'msvc_vernum'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions