-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[MSVC] Root is failed with error G694476FC: static_assert failed "Unexpected size" #15321
Comments
So I cannot reproduce the error with the recipe you give. But looking at you log file, I see you set more environment variables. That is:
Without those variables the build works just fine. This is maybe related to #9445 |
So I tried with:
And it worked... |
Neil omitted an important bit of info - this involves a very recent change to MSVC's STL, microsoft/STL#4591 . To reproduce it, you'll either have to build and consume our open-source STL, or wait for VS 2022 17.11 Preview 2 to ship (which will contain this commit). We changed the STL to say |
@StephanTLavavej OK, thanks for the info. But then what does that mean for ROOT? It will not build anymore with the upcoming version 17.11 of Visual Studio (again!!) ? What would be required to fix the issue on our side? |
Correct. To fix this, implement CWG-2518 in Cling (if that's the tool that's emitting this error), allowing |
Do you happen to know which version this appeared in? (Or better yet which Merge Request added it). Cling uses |
It shipped in Clang 17, which is the version that microsoft/STL currently requires. https://clang.llvm.org/cxx_dr_status.html documents this. I believe that llvm/llvm-project@00e2098 implemented it, but there's a slight chance there were followup commits that I'm unaware of. |
OK, thanks a lot for the information! And since it's in Clang/Cling, let's add @vgvassilev in the loop... |
We probably should backport this commit. @hahnjo what do you think? |
Probably, but I'm a bit confused about the error message: Why would Cling output MSVC style error messages? |
I don't actually know what the G694476FC error code is (the only codes I recognize are MSVC Cnnnn, IntelliSense Ennnn, and Clang named warnings/errors), but the "Unexpected size" is coming from the STL. We have |
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as root-project#15321
Seems reasonable and applies cleanly to our LLVM 16 - I opened #15437 with the backport. I will wait for confirmation that this is all we need before syncing to our LLVM monorepo fork and eventually merging. |
@StephanTLavavej Thanks a lot for your help! Unfortunately, I can only try with VS 17.10 preview 6 (the only one available for now), and hence cannot try to reproduce the issue and see if the PR properly fixes it. I will try again as soon as v17.11 preview is available |
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as root-project#15321
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as #15321
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as root-project#15321 (cherry picked from commit c767271)
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as #15321 (cherry picked from commit c767271)
This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C++ modes. Of notes, a couple of tests were relying of the eager nature of static_assert * test/SemaTemplate/instantiation-dependence.cpp * test/SemaTemplate/instantiate-var-template.cpp I don't know if the changes to `static_assert` still allow that sort of tests to be expressed. Reviewed By: #clang-language-wg, erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D144285 --- Fixes the build with newer versions of MSVC's STL, reported as root-project#15321
Check duplicate issues.
Description
We've been using MSVC to build ROOT, and we've recently encountered the following error:
error G694476FC: static_assert failed "Unexpected size"
Our developer has suggested the compiler that was used needs to implement the Defect Report https://cplusplus.github.io/CWG/issues/2518.html (which has been implemented by MSVC and Clang).
Reproducer
Repro step:
Expected result:
Build succesfully.
ROOT version
We are using the latest commit.
Installation method
git
Operating system
Windows server 2022 data center
Additional context
Detailed log:
Build.log
The text was updated successfully, but these errors were encountered: