Doc issue: Spectre mitigated libraries needed? #1274

Open
opened 2026-01-30 22:20:45 +00:00 by claunia · 7 comments
Owner

Originally created by @metathinker on GitHub (May 23, 2019).

Yesterday, I tried installing Visual Studio 2019 (16.1.0) on a new computer and cloning and building the terminal repo. When installing VS, I made sure to select the "desktop dev with C++" and "universal Windows dev" profiles, and the v141 compiler and universal Windows tools.

However, building from the command line with bz reliably failed. While I don't have the exact text on hand, I remember MSBuild showed the following:

  • Warnings in an MSBuild-built-in settings file (in C:\Program Files or similar, not in the terminal repo) that Spectre-mitigated libraries were chosen but not installed.
  • Errors that the linker could not find the import .lib for the C runtime or C++ library DLLs (msvcrt.lib , msvcprt.lib , ...). After observing with Process Monitor, I saw that link.exe did seem to be looking only in "Spectre" folders for these files.

Is it expected that Spectre-mitigated C runtimes are required? Could it be documented if so? And if not, could it be corrected?

Originally created by @metathinker on GitHub (May 23, 2019). Yesterday, I tried installing Visual Studio 2019 (16.1.0) on a new computer and cloning and building the terminal repo. When installing VS, I made sure to select the "desktop dev with C++" and "universal Windows dev" profiles, and the v141 compiler and universal Windows tools. However, building from the command line with `bz` reliably failed. While I don't have the exact text on hand, I remember MSBuild showed the following: - Warnings in an MSBuild-built-in settings file (in `C:\Program Files` or similar, not in the terminal repo) that Spectre-mitigated libraries were chosen but not installed. - Errors that the linker could not find the import .lib for the C runtime or C++ library DLLs (`msvcrt.lib` , `msvcprt.lib` , ...). After observing with [Process Monitor](https://docs.microsoft.com/sysinternals/downloads/procmon), I saw that link.exe did seem to be looking only in "Spectre" folders for these files. Is it expected that Spectre-mitigated C runtimes are required? Could it be documented if so? And if not, could it be corrected?
claunia added the Issue-DocsProduct-MetaArea-Build labels 2026-01-30 22:20:45 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (May 23, 2019):

Spectre mitigation is enabled by default if you’ve installed the WDK. I believe there’s an ongoing UserVoice or DevCommunity discussion about it. Apologies, I can’t dig up the link at the moment.

@DHowett-MSFT commented on GitHub (May 23, 2019): Spectre mitigation is enabled by default if you’ve installed the WDK. I believe there’s an ongoing UserVoice or DevCommunity discussion about it. Apologies, I can’t dig up the link at the moment.
Author
Owner

@DHowett-MSFT commented on GitHub (May 23, 2019):

Here you go.

Do you have the WDK installed?

@DHowett-MSFT commented on GitHub (May 23, 2019): [Here](https://developercommunity.visualstudio.com/content/problem/348985/installing-wdk-1809-enabled-spectre-mitigation-fla.html) you go. Do you have the WDK installed?
Author
Owner

@metathinker commented on GitHub (May 23, 2019):

Yes, I did have the Windows Driver Kit installed on the box. Good guess!

I do think this problem - that if you have the WDK installed, you must also install the Spectre-mitigated libs or modify the MSBuild defaults, per the discussion thread you linked - does need to be documented, either in the doc markdown files or in the "Guide for build" issue thread (#489). What do you think? If it should go in the .md files I would be happy to submit a PR for that.

@metathinker commented on GitHub (May 23, 2019): Yes, I did have the Windows Driver Kit installed on the box. Good guess! I do think this problem - that if you have the WDK installed, you must also install the Spectre-mitigated libs or modify the MSBuild defaults, per the discussion thread you linked - does need to be documented, either in the doc markdown files or in the "Guide for build" issue thread (#489). What do you think? If it should go in the .md files I would be happy to submit a PR for that.
Author
Owner

@DHowett-MSFT commented on GitHub (May 28, 2019):

Given that this is a widespread issue, I don't see the value in documenting it. Here's my thoughts:
Documenting this for our project specifically is like documenting "if you install the wrong tools, it will behave poorly" -- it's not specific to us, and we might run the risk of accumulating a bunch of documentation callouts that aren't specific to us. They'll age, go stale, and become annoying vestigial limbs.

@DHowett-MSFT commented on GitHub (May 28, 2019): Given that this is a widespread issue, I don't see the value in documenting it. Here's my thoughts: Documenting this for our project specifically is like documenting "if you install the wrong tools, it will behave poorly" -- it's not specific to us, and we might run the risk of accumulating a bunch of documentation callouts that aren't specific to us. They'll age, go stale, and become annoying vestigial limbs.
Author
Owner

@metathinker commented on GitHub (May 28, 2019):

I don't agree with this resolution (and I notice I can't reopen the issue either, but I'm not really interested in fighting hard on this issue so I'll leave that be). Yes, the problem is not specific to this project and is fairly general, but I say making people figure it out themselves places unnecessary roadblocks in the new contributor process. Ultimately there is a balance that has to be struck between excessive and/or misleading hand-holding and leaving people out in the cold and we'll have to agree to disagree on where that balance point is placed.

@metathinker commented on GitHub (May 28, 2019): I don't agree with this resolution (and I notice I can't reopen the issue either, but I'm not really interested in fighting hard on this issue so I'll leave that be). Yes, the problem is not specific to this project and is fairly general, but I say making people figure it out themselves places unnecessary roadblocks in the new contributor process. Ultimately there is a balance that has to be struck between excessive and/or misleading hand-holding and leaving people out in the cold and we'll have to agree to disagree on where that balance point is placed.
Author
Owner

@DHowett-MSFT commented on GitHub (May 29, 2019):

You've made a good point.

@DHowett-MSFT commented on GitHub (May 29, 2019): You've made a good point.
Author
Owner

@TheCrazyLion commented on GitHub (Nov 20, 2020):

i have same problem. tryng to fix it for weeks. sadly there is not any solution online

@TheCrazyLion commented on GitHub (Nov 20, 2020): i have same problem. tryng to fix it for weeks. sadly there is not any solution online
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1274