Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mwichmann opened this issue May 26, 2024 · 2 comments
Closed

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

mwichmann opened this issue May 26, 2024 · 2 comments

Comments

@mwichmann
Copy link
Collaborator

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'
jcbrill added a commit to jcbrill/scons that referenced this issue May 28, 2024
… msvc buildtools v143.

Changes:
* Add msvc build series data structure.
* Change msvc build tools data structure to contain list of build series.
* Update script argument validation and tests.
@jcbrill jcbrill mentioned this issue May 28, 2024
3 tasks
@jcbrill
Copy link
Contributor

jcbrill commented May 28, 2024

Toolset 14.40 definitely does not work with the SCons 4.7 test suite. However, simple builds might work without error.

A simple build withMSVC_VERSION="14.3" and the master branch appears to use toolset 14.40 without error:

Build: _build001 {'MSVC_VERSION': '14.3', 'MSVC_NOTFOUND_POLICY': 'Error'}
cl.exe: C:\Software\MSVS-2022-143-Com\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe

Construction variable validation is more likely to fail.

@jcbrill
Copy link
Contributor

jcbrill commented Jul 1, 2024

Merged PR #4534 addresses this issue.

I believe this issue can be closed.

@bdbaddog bdbaddog closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants