[GH-ISSUE #3566] [Other] Windows setup: fail fast when MSVC host compiler is older than VS2022 (C++20 sources) #1462

Closed
opened 2026-11-04 01:51:28 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @ogerly on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3566

Context: On Windows, setup.py found no prebuilt engine for the current release (404), so the engine was built from source. The build then failed with a cryptic error:

device.cu / pinned.cu:
error: qualified name is not allowed to denote a constexpr function
(inside `namespace strata::core { ... }`)

Root cause: the installed host compiler was MSVC 19.29 (Visual Studio 2019). nvcc silently ignores -std=c++20 with that host compiler, so C++20 features in our own headers fail mid-compile.

Fix that worked: install Visual Studio 2022 BuildTools, AND delete the stale CMake cache (it pins the old compiler), then reconfigure + rebuild (163 targets, success).

Suggestion: please consider the same fail-fast idea as in #3557 (ARM): before starting a source build on Windows, detect the MSVC/CL version and stop early with a message like

"Strata requires VS2022 (or newer) BuildTools - install it, then clear the CMake cache and run setup again."

The current error ("qualified name is not allowed") cost us hours and is essentially undebuggable without knowing this toolchain rule.

Secondary: when no prebuilt engine exists for the current version, a clear line "engine will be compiled from source - needs VS2022" would make the detour predictable.

Environment: Windows 11, CUDA 13.4, driver 615.78, RTX 5090.

Strata version: 0.1.45.3 (engine built from source)

Originally created by @ogerly on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3566 Context: On Windows, setup.py found no prebuilt engine for the current release (404), so the engine was built from source. The build then failed with a cryptic error: device.cu / pinned.cu: error: qualified name is not allowed to denote a constexpr function (inside `namespace strata::core { ... }`) Root cause: the installed host compiler was MSVC 19.29 (Visual Studio 2019). nvcc silently ignores `-std=c++20` with that host compiler, so C++20 features in our own headers fail mid-compile. Fix that worked: install Visual Studio 2022 BuildTools, AND delete the stale CMake cache (it pins the old compiler), then reconfigure + rebuild (163 targets, success). Suggestion: please consider the same fail-fast idea as in #3557 (ARM): before starting a source build on Windows, detect the MSVC/CL version and stop early with a message like "Strata requires VS2022 (or newer) BuildTools - install it, then clear the CMake cache and run setup again." The current error ("qualified name is not allowed") cost us hours and is essentially undebuggable without knowing this toolchain rule. Secondary: when no prebuilt engine exists for the current version, a clear line "engine will be compiled from source - needs VS2022" would make the detour predictable. Environment: Windows 11, CUDA 13.4, driver 615.78, RTX 5090. Strata version: 0.1.45.3 (engine built from source)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 21, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6311375094 --> @github-actions[bot] commented on GitHub (Oct 21, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 21, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6312144143 --> @github-actions[bot] commented on GitHub (Oct 21, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Thanks. Fixed in 0.2.5: a source build on Windows needs Visual Studio 2022, and setup stops before the build with that message and the ready-made engine as the way out (d6c193602). Closing as done.

<!-- gh-comment-id:6423213451 --> @Niko1221 commented on GitHub (Oct 26, 2026): Thanks. Fixed in 0.2.5: a source build on Windows needs Visual Studio 2022, and setup stops before the build with that message and the ready-made engine as the way out (d6c193602). Closing as done.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1462
No description provided.