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

Additional spectre mitigated libraries on Visual Studio 2019 #3027

Closed
heydojo opened this issue Jul 13, 2019 · 9 comments

Comments

@heydojo
Copy link

commented Jul 13, 2019

When building an application using the Appveyor Visual Studio 2019 image, the following message appears and the build fails:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(402,5): warning MSB8038: Spectre mitigation is enabled but Spectre mitigated libraries are not found. Verify that the Visual Studio Workload includes the Spectre mitigated libraries. See https://aka.ms/Ofhn4c for more information.

This indicates that the MSVC++ spectre mitigations are not present within the Appveyor VS2019 image.

Would it be possible to add the spectre mitigations to the 2019 image so that I don't see this error message again please?

@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

@heydojo can you please provide exact name of the component? You can discover and test it on Visual Studio 2019 the same way I described in #3011 (comment). Appreciate the help.

@IlyaFinkelshteyn

This comment has been minimized.

Copy link
Member

commented Jul 16, 2019

@heydojo here is a screenshot of current setup on Visual Studio 2019. Are those marked in yellow would be enough, or maybe too much? Do you believe you and others will be needed ARM and ARM64? It would be nice of you can clarify soon as we are working on images release now.

2019-07-16_10h32_29

@stephenegriffin

This comment has been minimized.

Copy link

commented Jul 17, 2019

I'm also hitting this. I think the strategy here should be to add build tools with Spectre Mitigations for each build tools without that we include. So in your highlights, that would only be this one:
C++ MFC for v142 build tools with Spectre Mitigations (x86 & x64)

The others should only be added when people request the equivalent non spectre build tools

@heydojo

This comment has been minimized.

Copy link
Author

commented Jul 18, 2019

Hi @IlyaFinkelshteyn

2

Are my needs for C++ projects going forward. But it would be rather selfish of me not to also point out the libraries others may need for cross compiling:

1c

In the image above, blue are items I have already installed. Marked in yellow are items I would install if doing cross compiles for ARM and ARM64. I recommend adding them if you don't mind please.

Also, as an aside; it would be really helpful if the current latest stable Windows SDK is present on the image:

3

(Edit: I see #2938 which is the latest Windows SDK version 👍 )

Many thanks!

@heydojo

This comment has been minimized.

Copy link
Author

commented Jul 18, 2019

I'm also hitting this. I think the strategy here should be to add build tools with Spectre Mitigations for each build tools without that we include. So in your highlights, that would only be this one:
C++ MFC for v142 build tools with Spectre Mitigations (x86 & x64)

I honestly don't need MFC or ATL for any of my C++ projects using Appveyor CI. I only need MSVC v142 and spectre mitigations for MSVC v142 (v14.21) as will most others.

The MFC and ATL components I have installed are for a local compile I do which needs them.
MFC is kind of the old way of doing things and pretty much arbitrary IMO.
ATL is used for instance to help with creating applications which make use of accessibility features built into Windows.
https://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Library
https://en.wikipedia.org/wiki/Active_Template_Library

Unless you absolutely need them, you should probably not be trying to link against them to keep your build times down.

@vSzemkel

This comment has been minimized.

Copy link

commented Jul 19, 2019

By the way, this is Microsoft error to ignore /Qspectre compiler switch. They have ignored my report with comment that it's all right.

@heydojo

This comment has been minimized.

Copy link
Author

commented Jul 22, 2019

By the way, this is Microsoft error to ignore /Qspectre compiler switch. They have ignored my report with comment that it's all right.

This isn't the place for that type of discussion IMO.
It's not a bug. It's a feature.
Builds specifying /Qspectre should never complete and then simply offer a warning if /Qspectre libs are not found.
If you don't mind building without /Qspectre - then don't specify it.
Thanks.

@vSzemkel

This comment has been minimized.

Copy link

commented Jul 27, 2019

The bug is corrected in Visual Studio 16.2. Earlier if you don't mind building without /Qspectre you were just forced to and you must have had spectre mitigated libs installed.

@heydojo

This comment has been minimized.

Copy link
Author

commented Jul 30, 2019

The bug is corrected in Visual Studio 16.2. Earlier if you don't mind building without /Qspectre you were just forced to and you must have had spectre mitigated libs installed.

I'm not seeing anything about this in the release notes: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes
and seeing how what you describe is not the expected default behaviour, it would be really helpful if you could provide a source @vSzemkel

I still maintain that the compiler failing to complete a build specifying /Qspectre when spectre mitigated libraries are not present on the host system is the correct course of action and as such the expected result and of course absolutely not a bug.

@IlyaFinkelshteyn IlyaFinkelshteyn changed the title warning MSB8038: Spectre mitigated libraries are not found. Additional spectre mitigated libraries on Visual Studio 2019 Aug 31, 2019

@IlyaFinkelshteyn IlyaFinkelshteyn removed the bug label Aug 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.