-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Latest update to Ubuntu 20.04 image breaks gcc compiler #6280
Comments
@bobbrow Hello! Do I understand correctly that you are using gcc-12? If so, you should either:
gcc dependency is now mandatory brew dependency on Ubuntu 18 and 20 so this can not be changed anyhow other than the ways I described above. |
We use whatever version of gcc we find on the image. It used to be gcc 9.4, I believe. This new brew version seems to be found ahead of the version that ships with the LTS. We don't really care if a new version (e.g. 12) appears as long as it can compile. It seems that brew's version of the compiler is incorrectly configured and cannot be used, so it needs to be patched or removed. |
I am not sure that brew's gcc is fully compatible with what cmake make do, but I guess @MikeMcQuaid can fix me, or at least he might know a person who can. I am mainly concerned how you came with the
Invocation. Is this auto-generated or whatever else, because if I explicitly call your command with gcc/g++ from /usr/bin - it works |
Yes, I also noticed that when we don't specify a compiler explicitly that CMake will select the usual default My point is that |
@bobbrow I've glanced through your logs one more time and it does not look like a gcc's problem. In your logs it is clearly stated that it searches for The entire workflow of mine is looking that way:
and it works with the snippets of code you provided. The other question is, do you want to continue relying on the compiler and toolchain outside the standard repository, only you know the answer :). |
What I don't understand is why should I need to modify the image to get a basic compilation to work? Can you add this line to your image so that everyone can benefit from it? Or remove gcc-12 from your brew install because it doesn't work out of the box. |
Does #6240 solve my problem by removing brew stuff from the $PATH? |
@bobbrow yes, it will, and that is exactly what we are going to do |
Thank you @mikhailkoliada! |
Yes, this was broken by making |
@carlocab thank you so much for posting this! I've been plagued by this for a few days and just landed upon your solution, which works for me! |
@rouson glad that helped you. We're working on a fix for that, so you shouldn't need the |
brew is generally not in $PATH now. |
I currently have the same Issue... |
Description
My VS Code extension's CI cannot run with the latest 20.04 image because CMake cannot configure our projects with the new way of acquiring the gcc compiler.
Platforms affected
Runner images affected
Image version and build link
Image: ubuntu-20.04
Version: 20220920.2
Failed build example: https://github.com/microsoft/vscode-cmake-tools/actions/runs/3100498232
Is it regression?
yes. version 20220905.1 works in this build: https://github.com/microsoft/vscode-cmake-tools/actions/runs/3100420383/jobs/5020681191
Expected behavior
CMake should be able to compile a test program without any additional configuration from my side
Actual behavior
The compilation test fails. Logs are in the description
Repro steps
Probably just have to try to configure a simple cmake project.
Write out the following files into a folder:
CMakeLists.txt
main.cpp
Open a terminal, navigate to the folder with those files in it and run:
The text was updated successfully, but these errors were encountered: