[MSVC][Build][Permissive-][std:c++latest] Terminal failed to build on MSVC #14573

Closed
opened 2026-01-31 04:13:54 +00:00 by claunia · 8 comments
Owner

Originally created by @QuellaZhang on GitHub (Jul 19, 2021).

Windows Terminal version (or Windows build number)

Microsoft Windows [Version 10.0.14393]

Other Software

No response

Steps to reproduce

  1. open VS2019 x64 tools command
  2. git clone --recursive https://github.com/microsoft/terminal F:\terminal
  3. cd F:\terminal
  4. set path=F:\terminal\dep\nuget;%PATH%
  5. nuget restore OpenConsole.sln > nuget.log
  6. set CL=/wd4189
  7. set CL=/std:c++latest %CL% / set CL=/permissive- %CL%
  8. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.19041.0 OpenConsole.sln /t:Restore /t:Rebuild > build.log

Expected Behavior

The build was successful.

Actual Behavior

set CL=/std:c++latest: Terminal_stdc++latest.log

F:\gitP\microsoft\terminal\src\inc\til\string.h(37,1): fatal error C1189: #error:  This code can be replaced in C++20, which natively supports .starts_with().

set CL=/permissive-: Terminal_permissive-.log

F:\gitP\microsoft\terminal\src\inc\til\static_map.h(100,13): error C2614: 'til::presorted_static_map<std::basic_string_view<char,std::char_traits<char>>,_Ty2,std::less<_Ty1>,78>': illegal member initialization: 'static_map' is not a base or member [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj]
F:\gitP\microsoft\terminal\src\inc\til\static_map.h(46,43): error C2607: static assertion failed (compiling source file ..\colorTable.cpp) [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj]
F:\gitP\microsoft\terminal\src\inc\til\static_map.h(100,13): error C2614: 'til::presorted_static_map<std::basic_string_view<char,std::char_traits<char>>,_Ty2,std::less<_Ty1>,84>': illegal member initialization: 'static_map' is not a base or member [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj]

"F:\gitP\microsoft\terminal\OpenConsole.sln" (Restore;Rebuild target) (1) ->
"F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj.metaproj" (Rebuild target) (89) ->
"F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj" (Rebuild target) (20:11) ->
F:\gitP\microsoft\terminal\src\server\ApiSorter.cpp(192,1): error C2362: initialization of 'ReplyPending' is skipped by 'goto Complete' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]
F:\gitP\microsoft\terminal\src\server\ApiSorter.cpp(192,1): error C2362: initialization of 'Descriptor' is skipped by 'goto Complete' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]
F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(114,1): error C2362: initialization of 'deviceComm' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]
F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'deviceComm' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]
F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'screenInfo' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]
F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'pNotifier' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj]

"F:\gitP\microsoft\terminal\OpenConsole.sln" (Restore;Rebuild target) (1) ->
"F:\gitP\microsoft\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (Rebuild target) (80) ->
"F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj" (Rebuild target) (16:6) ->
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,6): error C2337: 'uuid': attribute not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,7): error C2065: 'D2942F8E': undeclared identifier [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,16): error C3688: invalid literal suffix 'D3'; literal operator or literal operator template 'operator ""D3' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,26): error C3688: invalid literal suffix 'A'; literal operator or literal operator template 'operator ""A' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,31): error C3688: invalid literal suffix 'A16238F4EE'; literal operator or literal operator template 'operator ""A16238F4EE' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(39,1): error C2787: 'ConsolePropertySheetHandler': no GUID has been associated with this object [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(259,1): error C2787: 'ConsolePropertySheetHandler': no GUID has been associated with this object [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(259,1): error C2440: 'initializing': cannot convert from 'Microsoft::WRL::Details::FactoryCache *' to 'TrustLevel (__cdecl *)(void)' [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj]
Originally created by @QuellaZhang on GitHub (Jul 19, 2021). ### Windows Terminal version (or Windows build number) Microsoft Windows [Version 10.0.14393] ### Other Software _No response_ ### Steps to reproduce 1. open VS2019 x64 tools command 2. git clone --recursive https://github.com/microsoft/terminal F:\terminal 3. cd F:\terminal 4. set path=F:\terminal\dep\nuget;%PATH% 5. nuget restore OpenConsole.sln > nuget.log 6. set _CL_=/wd4189 7. set _CL_=/std:c++latest %_CL_% / set _CL_=/permissive- %_CL_% 8. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.19041.0 OpenConsole.sln /t:Restore /t:Rebuild > build.log ### Expected Behavior The build was successful. ### Actual Behavior **set _CL_=/std:c++latest:** [Terminal_stdc++latest.log](https://github.com/microsoft/terminal/files/6838882/Terminal_stdc%2B%2Blatest.log) ``` F:\gitP\microsoft\terminal\src\inc\til\string.h(37,1): fatal error C1189: #error: This code can be replaced in C++20, which natively supports .starts_with(). ``` **set _CL_=/permissive-:** [Terminal_permissive-.log](https://github.com/microsoft/terminal/files/6838884/Terminal_permissive-.log) ``` F:\gitP\microsoft\terminal\src\inc\til\static_map.h(100,13): error C2614: 'til::presorted_static_map<std::basic_string_view<char,std::char_traits<char>>,_Ty2,std::less<_Ty1>,78>': illegal member initialization: 'static_map' is not a base or member [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj] F:\gitP\microsoft\terminal\src\inc\til\static_map.h(46,43): error C2607: static assertion failed (compiling source file ..\colorTable.cpp) [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj] F:\gitP\microsoft\terminal\src\inc\til\static_map.h(100,13): error C2614: 'til::presorted_static_map<std::basic_string_view<char,std::char_traits<char>>,_Ty2,std::less<_Ty1>,84>': illegal member initialization: 'static_map' is not a base or member [F:\gitP\microsoft\terminal\src\types\lib\types.vcxproj] "F:\gitP\microsoft\terminal\OpenConsole.sln" (Restore;Rebuild target) (1) -> "F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj.metaproj" (Rebuild target) (89) -> "F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj" (Rebuild target) (20:11) -> F:\gitP\microsoft\terminal\src\server\ApiSorter.cpp(192,1): error C2362: initialization of 'ReplyPending' is skipped by 'goto Complete' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] F:\gitP\microsoft\terminal\src\server\ApiSorter.cpp(192,1): error C2362: initialization of 'Descriptor' is skipped by 'goto Complete' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(114,1): error C2362: initialization of 'deviceComm' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'deviceComm' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'screenInfo' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] F:\gitP\microsoft\terminal\src\server\IoDispatchers.cpp(439,1): error C2362: initialization of 'pNotifier' is skipped by 'goto Error' [F:\gitP\microsoft\terminal\src\server\lib\server.vcxproj] "F:\gitP\microsoft\terminal\OpenConsole.sln" (Restore;Rebuild target) (1) -> "F:\gitP\microsoft\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (Rebuild target) (80) -> "F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj" (Rebuild target) (16:6) -> F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,6): error C2337: 'uuid': attribute not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,7): error C2065: 'D2942F8E': undeclared identifier [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,16): error C3688: invalid literal suffix 'D3'; literal operator or literal operator template 'operator ""D3' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,26): error C3688: invalid literal suffix 'A'; literal operator or literal operator template 'operator ""A' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(22,31): error C3688: invalid literal suffix 'A16238F4EE'; literal operator or literal operator template 'operator ""A16238F4EE' not found [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(39,1): error C2787: 'ConsolePropertySheetHandler': no GUID has been associated with this object [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(259,1): error C2787: 'ConsolePropertySheetHandler': no GUID has been associated with this object [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] F:\gitP\microsoft\terminal\src\propsheet\PropSheetHandler.cpp(259,1): error C2440: 'initializing': cannot convert from 'Microsoft::WRL::Details::FactoryCache *' to 'TrustLevel (__cdecl *)(void)' [F:\gitP\microsoft\terminal\src\propsheet\propsheet.vcxproj] ```
claunia added the Resolution-Fix-CommittedIssue-TaskProduct-MetaArea-Build labels 2026-01-31 04:13:54 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 19, 2021):

Out of curiosity, why?

@zadjii-msft commented on GitHub (Jul 19, 2021): Out of curiosity, _why_?
Author
Owner

@DHowett commented on GitHub (Jul 19, 2021):

Right. We're not targeting C++20 or permissive- right now. We should clean ourselves up for permissive-, but we cannot target C++20 until the Windows build system supports it.

@DHowett commented on GitHub (Jul 19, 2021): Right. We're not targeting C++20 or `permissive-` right now. We _should_ clean ourselves up for `permissive-`, but we cannot target C++20 until the Windows build system supports it.
Author
Owner

@CaseyCarter commented on GitHub (Jul 23, 2021):

Out of curiosity, why?

We (MSVC) have a suite of open-source projects that we use as representative Real World Code to test the compiler (and libraries!) against. This not only helps us find problems in our implementation of the toolset, but it gives us the opportunity to report future breakage upstream to said projects so you have the opportunity to fix problems before our mutual customers encounter them. Obviously you're not required to do anything with these reports (although I am wagging my finger at my screen very judgmentally as I type this) and we simply won't build/test your project in C++20 mode.

@CaseyCarter commented on GitHub (Jul 23, 2021): > Out of curiosity, _why_? We (MSVC) have a suite of open-source projects that we use as representative Real World Code to test the compiler (and libraries!) against. This not only helps us find problems in our implementation of the toolset, but it gives us the opportunity to report future breakage upstream to said projects so you have the opportunity to fix problems before our mutual customers encounter them. Obviously you're not required to do anything with these reports (although I am wagging my finger at my screen _very_ judgmentally as I type this) and we simply won't build/test your project in C++20 mode.
Author
Owner

@DHowett commented on GitHub (Jul 23, 2021):

That's actually excellent news. Part of the reason that we're not permissive--clean is that the inbox in-Windows Razzle build uses some internal Windows headers that just aren't easily compatible with it (boo!).

Both of these things--C++20 and permissive---I'd like to address in the fullness of time. There's probably some mitigations we can do to improve the state of the world incrementally so that RWC can build us at the latest and greatest. 😄

@DHowett commented on GitHub (Jul 23, 2021): That's actually excellent news. Part of the reason that we're not `permissive-`-clean is that the inbox in-Windows Razzle build uses some internal Windows headers that just aren't easily compatible with it (boo!). Both of these things--C++20 and `permissive-`--I'd like to address in the fullness of time. There's probably some mitigations we can do to improve the state of the world incrementally so that RWC can build us at the latest and greatest. :smile:
Author
Owner

@zadjii-msft commented on GitHub (Jul 26, 2021):

Ah, now that makes more sense. I was under the impression that a random person on the internet was just trying to compile the Terminal with C++20 just from their own curiosity. The added context is definitely helpful, thanks!

@zadjii-msft commented on GitHub (Jul 26, 2021): Ah, now that makes more sense. I was under the impression that a random person on the internet was just trying to compile the Terminal with C++20 just from their own curiosity. The added context is definitely helpful, thanks!
Author
Owner

@ghost commented on GitHub (Jul 30, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jul 30, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@DHowett commented on GitHub (Jul 31, 2021):

Sorry, overzealous bot.

@DHowett commented on GitHub (Jul 31, 2021): Sorry, overzealous bot.
Author
Owner

@ghost commented on GitHub (Feb 3, 2022):

:tada:This issue was addressed in #11816, which has now been successfully released as Windows Terminal Preview v1.13.10336.0.🎉

Handy links:

@ghost commented on GitHub (Feb 3, 2022): :tada:This issue was addressed in #11816, which has now been successfully released as `Windows Terminal Preview v1.13.10336.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.13.10336.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14573