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

Windows, Visual Studio 2022 is not recognized by Tundra #344

Closed
jurgen-kluft opened this issue Jun 18, 2024 · 2 comments
Closed

Windows, Visual Studio 2022 is not recognized by Tundra #344

jurgen-kluft opened this issue Jun 18, 2024 · 2 comments

Comments

@jurgen-kluft
Copy link

Steps to reproduce:

On Windows only install Visual Studio 2022
Run tundra2

tundra2 debug
4 valid build tuples
Generating DAG for win64-msvc-debug-default

Lua error
...2\2.17.1\scripts\tundra\tools\msvc-vscommon-next.lua:140: cannot find the Visual C++ compiler toolset in any of the following locations:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
Check that either Desktop development with C++ or Visual C++ build tools is installed. You can customize the InstallationPath or Product options to load a specific instance of Visual Studio 2019 from a specific location. If Product is not specified it will look for the first instance of the Visual C++ compiler toolset in the default installation path 'C:\Program Files (x86)\Microsoft Visual Studio' in the following order BuildTools, Community, Professional, Enterprise using the tripplet (InstallationPath, '2019', Product)
stack traceback:
[C]: in function 'error'
...2\2.17.1\scripts\tundra\tools\msvc-vscommon-next.lua:140: in function 'apply_msvc_visual_studio'
...\tundra2\2.17.1\scripts\tundra\tools\msvc-vs2019.lua:7: in function 'apply'
...Scoop\apps\tundra2\2.17.1\scripts\tundra\unitgen.lua:40: in function 'load_toolset'
...Scoop\apps\tundra2\2.17.1\scripts\tundra\unitgen.lua:76: in function 'setup_env'
...Scoop\apps\tundra2\2.17.1\scripts\tundra\unitgen.lua:112: in function 'setup_envs'
...Scoop\apps\tundra2\2.17.1\scripts\tundra\unitgen.lua:173: in function 'generate_dag'
D:\Scoop\apps\tundra2\2.17.1\scripts\tundra\boot.lua:95: in function 'generate_dag_data'
D:\Scoop\apps\tundra2\2.17.1\scripts\tundra.lua:9: in function 'action'
D:\Scoop\apps\tundra2\2.17.1\scripts\tundra.lua:41: in function <D:\Scoop\apps\tundra2\2.17.1\scripts\tundra.lua:25>
(tail call): ?
[E] DAG generator driver failed: D:\Scoop\apps\tundra2\2.17.1\bin\t2-lua.exe generate-dag tundra.lua .tundra2.dag.json
*** Build failed to setup error (0.64 seconds)

@jurgen-kluft
Copy link
Author

Hmmmm, after (re)installing Visual Studio it works, it is not fully clear what caused this issue, maybe registry, not sure.

@leidegre
Copy link
Contributor

leidegre commented Jun 20, 2024

Hmmmm, after (re)installing Visual Studio it works, it is not fully clear what caused this issue, maybe registry, not sure.

I reworked all the MSVC tools in this PR, it only looks into the registry for the Windows SDK.

Looks like it's searching for VS 2019 in these locations:

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\

Which points to an issue with the tundra.lua file (specifically the toolset config). Ping me if you run into this problem again and I'll take a look. It would be helpful if you included the relevant parts of the tundra.lua file and some directory information dir /b /s * if there's an issue with trying to locate the Visual Studio installation.

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

2 participants