-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Missing atlbase.h file in windows-2022 runner #9873
Comments
Hey @kanak-clumio! Take a look here, please: #9701 steps:
- name: Delete components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.ATL"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- name: Install components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.v141.ATL"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden |
@kanak-clumio
I recommend reporting the bug to the Visual Studio Developer Community to understand why it was excluded in the latest version of |
@erik-bershel uninstalling and re-installing the ATL component seems to fix the compilation issue but it add 5-6m to the runs.
So we believe that it was just not installed properly and not added to the import paths of the compiler. If there is a faster way to make the existing atlbase.h discoverable that might be good enough. |
Hey @sodul! Glad to hear that we localised bug. Appreciate your effort! Would be very nice if you report this bag to the Visual Studio so they can fix it for other users. Same time I found a discussion on SO: https://stackoverflow.com/questions/3898287/c-include-atlbase-h-is-not-found There were mentioned two options:
I am sure that the second one will definitely work if you correct a path. |
This action might be also a solution (a workaround to be honest) of the issue: https://github.com/marketplace/actions/setup-msvc-developer-command-prompt |
Thanks @erik-bershel for the help! I've made a change to add the workaround you suggested of deleting and adding components so that our CI goes through. This increases the build time by 7 min but we can manage it till your above change is available in the next windows-2022 runner version. |
Had the same issue today when we merged another PR in our project. https://github.com/Phobos-developers/Phobos/actions/runs/9141719975/job/25136537634 Is it possible to somehow revert to the previous runner version where it was working? |
Nope. Only to wait for the next release or to update ATL library in runtime. |
Do you plan on making a release with the fix in the next few days? I'm considering if I should add the workaround to our pipeline, but if a new release is in the works, I might as well wait. |
Hey @provegard! |
Thanks @erik-bershel, good to know! |
Hello @erik-bershel any update on when a new 2022 runner will be released. I am encountering the same issue with the missing ATL and deciding on whether to add the code or wait for the next runner. Thanks |
Hey @hudsy13! |
Hi @erik-bershel, With latest version of windows-2019 image, VSBuild task is working fine. Will this issue also be fixed as part of the deployment. Please feel to correct me if I am writing down in the wrong window. |
Hey @bhanusridhar! |
@erik-bershel As it was working on windows-2019 image, we have currently mapped our pipeline to run on windows-2019 image without making any additional changes of including any installation steps. Hoping to see it work in windows-2022 image as well. |
Any update here please @erik-bershel |
Hey @bhanusridhar! |
Hi @erik-bershel thanks for the updates. The image rollout that is currently in progress is that to correct the atlbase.h missing issue or one of the others that have been raised in this thread? I just attempted to run our pipeline again (image '20240603.1.0') and it's still throwing an error, so I was looking for clarification. Thanks |
Hey @hudsy13! |
@erik-bershel lol....yeah a bit of thread-jacking going on. I am talking about the original issue of the thread the altbase.h. Thanks for the update, any idea what release number it would be so that I can be on the lookout? |
Lets see. Issue firstly happen to be when we removed v142 and other components. Judging by your previous comment, the update did not solve the problem. In this case, it is a bug of the component itself. As a temporary workaround, you can downgrade it in runtime or contact the Visual Studio developers - unfortunately, we are not yet able to install two versions of components at the same time due to a bug. To check it before reporting I may recommend you to run code from this comment: #9873 (comment). In case it works for you - it's for sure a bug of VS2022. |
@erik-bershel We tried to rollback the ATL re-install logic a few minutes ago and unfortunately we are getting the Here is the output from the setup step:
The workaround to uninstall and re-install ATL might still work but our CI started failing which we need to investigate. |
Seems 20240603 image didn't fixed. May be I should approach Developer community. Thanks for the help in providing workaround. Anyhow, we are using windows-2019. |
… it for Prepare, NFC (#7004) This changes pre-passes for ExportVerilog to run on HWEmittableModuleLike instead of HWModuleOp. #6977 is going to add a support for SV func op and legalization needed for SV func as well. HWEmittableModuleLike is a new interface that inherits Emittable+HWModuleLike. I considered to use a trait but we cannot use a trait for pass scheduling so an interface is used.
Hey @sodul and @bhanusridhar! |
@erik-bershel where should we send a report? I'm happy to send one but I'm not sure which developers to ping. |
@sodul I recommend reporting the bug to the Visual Studio Developer Community |
Workaround for actions/runner-images#9873
Still experiencing issues with our build failing via ADO pipelines using windows-2022 and visual studio 2022 due to the missing atlbase.h file. I have tried the workaround but it doesn't appear to be doing anything (just sits there until pipeline times out). Is that suppose to be a powershell script? |
Hey @hudsy13! If you are using Azure Pipelines might worth trying adding the next steps into build job: steps:
- task: PowerShell@2
displayName: Delete components
inputs:
targetType: 'inline'
script: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.ATL"
"Microsoft.VisualStudio.Component.VC.ATL.Spectre"
"Microsoft.VisualStudio.Component.VC.ATLMFC"
"Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- task: PowerShell@2
displayName: Install components
inputs:
targetType: 'inline'
script: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL.Spectre"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC.Spectre"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden UPD: @sodul worth trying for your builds too I suppose. |
@erik-bershel thanks for the updated workaround, this one worked and allowed the build to be successful on windows-2022 runners albeit it did add 13 minutes onto the build process (9m to delete components and 4m to add). However, it is at least building again. Thanks. Hopefully the permanent fix will be out soon. |
@hudsy13 try removing the deletion step, it was necessary because previously there was sometimes a bug with library compatibility - perhaps no longer relevant due to the latest updates. Since now we are sure that the workround itself is working, we can check it without deleting it. If it continues to work, then consider that you will save yourself minutes on reconfiguration. |
If the developers ignore the report or are unable to provide solutions or a more optimal workround, then we will think about adding older versions of the components. |
@erik-bershel I've submitted feedback to Visual Studio by following steps mentioned here - Visual Studio Developer Community 10 days back but I've not heard back from them yet. |
If you use lukka/run-cmake, this error may be caused by vcpkg using v142 toolset instead of v143. MS started to use 14.4x version range for v143, which broke compiler detection code. You need to update vcpkg baseline to the latest one to fix it. |
Hey @kanak-clumio!
It seems they are waiting for your response. Check here. Unfortunately, we decided to close this issue for a number of reasons:
In order to make a “cheaper” workaround, I recommend trying to re-register existing files. The biggest problem in this case will be building the path to the file dynamically, but in general this is a solvable problem. |
try going back to windows-2019 (as discussed here: actions/runner-images#9873)
Description
We have a CI pipeline that stopped working from 16hrs ago. It is in a private repository and there is no code change in it for weeks.
This is the error we are getting -
It uses windows-2022 runner
worked yesterday: https://github.com/actions/runner-images/blob/win22/20240421.1/images/windows/Windows2022-Readme.md
broken today: https://github.com/actions/runner-images/blob/win22/20240514.3/images/windows/Windows2022-Readme.md
Since there was no recent changes to our repository there must be some changes to the windows-2022 runner that made altbase.h no longer available when compiling
I see the package name in
win22/20240514.3
isMicrosoft.VisualStudio.Component.VC.ATL
which is different from the previous release.We also filed an issue with microsoft for this - microsoft/setup-msbuild#127
Platforms affected
Runner images affected
Image version and build link
Image: windows-2022
Version: 20240514.3.0
Included Software: https://github.com/actions/runner-images/blob/win22/20240514.3/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20240514.3
Is it regression?
Yes, it was working in version 20240421.1.0
Expected behavior
We should not see 'atlbase.h' not found error.
Actual behavior
Seeing error that 'atlbase.h' file is not found.
Repro steps
Run a workflow like this and try to build any C++ Visual Studio project which imports this header file -
The text was updated successfully, but these errors were encountered: