ubuntu-latest runners have an incompatible combination of clang and libstdc++ #9446
Replies: 42 comments 2 replies
-
Also being hit by this: https://github.com/google-deepmind/mujoco_mpc/actions/runs/6644237828/job/18052982016 I think this is only affecting C++20 builds. |
Beta Was this translation helpful? Give feedback.
-
Oh yeah, it does only affect C++20 builds, the STL headers shouldn't touch consteval and friends if building for an earlier standard version. |
Beta Was this translation helpful? Give feedback.
-
Same issue for us :/ https://github.com/PedestrianDynamics/jupedsim/actions/runs/6645042045/job/18055479382 I noticed that after the image upgrade clang-15 is available but not the default clang, is this related? Also gradual rollout fine and dandy but how am I supposed to select a newly added clang version if it is random if I get an old or new image? Should I just |
Beta Was this translation helpful? Give feedback.
-
You can use the LLVM Ubuntu repository as a workaround until this is fixed. You can make it install clang-17 like here: https://github.com/wheremyfoodat/Panda3DS/blob/master/.github/workflows/Linux_Build.yml Note that the |
Beta Was this translation helpful? Give feedback.
-
thank you for the report. we'll have a look |
Beta Was this translation helpful? Give feedback.
-
Maybe an anecdote, but one solution I tried (that didn't work, but seems like it should) was: Having Setting It seems that Anyway, since GCC 12 + 13 and clang 15 can currently be installed, pairing GCC 12 with clang 15 seems like an escape hatch but I wasn't personally able to get it working. edit: this comment's suggestion to use clang 17 seems promising as an alternative |
Beta Was this translation helpful? Give feedback.
-
Same issue here on C++20: https://github.com/sourcemeta/jsontoolkit/actions/runs/6646548576/job/18060229938. Interestingly enough, the problem is not always reproducible. Retrying the same job a couple times makes it go away. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure clang 15 can do much to fix this, Clang 17 is the one rated as having full consteval support |
Beta Was this translation helpful? Give feedback.
-
questions from our side
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
we definitely need someone with deep understanding of clang/llvm ecosystem to make a proper decision. I've a question whether clang/llvm offers docker images (or maybe docker images from recognizable maintainer) ? for pet project I use Fedora Rawhide image (to pick the latest clang) https://github.com/haproxy/haproxy/blob/master/.github/workflows/fedora-rawhide.yml#L14-L18 it would be really nice if clang would have been shipped like gcc: https://hub.docker.com/_/gcc do you know are there similar images for clang/llvm ? |
Beta Was this translation helpful? Give feedback.
-
To my knowledge there's no official docker images, there's apt.llvm.org intended for providing various llvm versions via apt and then there's unofficial docker images like https://hub.docker.com/r/silkeh/clang I have not used the latter so I can't vouch for it. |
Beta Was this translation helpful? Give feedback.
-
looks pretty popular |
Beta Was this translation helpful? Give feedback.
-
For my usage that isn't helpful since one of the reasons we CI with Clang 14 is because that is the minimum Clang version that we support - largely because it is the default version of Clang included in 22.04. If we aren't actively testing with our minimum version we're very likely to introduce regressions, where something works with whatever Clang is in CI but not older versions. |
Beta Was this translation helpful? Give feedback.
-
As far as I could tell, GCC 13/libstdc++ 13 getting pulled in was the result of the https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test PPA getting added to the runner image. I don't know the sequence that the images are built in, but I'd guess that after the PPA was added, a general upgrade was performed, or installing something else resulted in an upgrade to gcc/libstdc++ and friends. We've worked around this by removing the PPA, and reinstalling libstdc++, since we build AppImages from the workflows, and those were no longer compatible with Ubuntu 22.04. I'm not sure on the implications of doing so, though - perhaps the newer version was added for good reason, so if you want to do this, do so at your own risk. But it works well enough for us - see the linked PR above. |
Beta Was this translation helpful? Give feedback.
-
Hey GitHub Folks how come you don't rollback this change? Its ok for mistakes to happen but at this point you should probably roll back and test this internally first... |
Beta Was this translation helpful? Give feedback.
-
I'm using https://github.com/mjp41/workaround8649 to temporary workaround the issue. You need to add the following step: # workaround for broken clang on ubuntu runner until https://github.com/actions/runner-images/issues/8659 get fixed
- uses: mjp41/workaround8649@7929373c0fe5caf844d8115adccef39e3b5362e7
with:
os: ${{ matrix.os }} |
Beta Was this translation helpful? Give feedback.
-
@SergiusTheBest This is great thank you. |
Beta Was this translation helpful? Give feedback.
-
@ilia-shipitsin it's soon to be 2 months without a working Clang pipeline, and GitHub apparently just pushed a change breaking the workarounds without fixing the issue - as far as I just checked, at least. Should I move to another CI provider that has more attention for C++? |
Beta Was this translation helpful? Give feedback.
-
Running scripts from a web location without any form of signature verification or hash pinning is an… interesting choice from a security perspective. I recommend adding the LLVM PubKey to your repository / CI and consuming their package feed directly: sudo cp tools/llvm-snapshot.gpg.key.asc /etc/apt/trusted.gpg.d/llvm-snapshot.asc
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get -qq update
sudo apt-get -qq install clang-16 |
Beta Was this translation helpful? Give feedback.
-
If you're using the workaround from #8659 (comment), or a variant thereof, the version suffix of the libc6{-dev} package got bumped from 3.4 to 3.5 - changing that should allow it to go through again. Shame this still isn't resolved - IMO the simplest solution is to not include gcc 13 from the testing repo/PPA, as far as I can tell, it's not a supported configuration for 22.04 anyway. |
Beta Was this translation helpful? Give feedback.
-
FYI, I have packaged up the action from above which can be called like: - uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.os }} where |
Beta Was this translation helpful? Give feedback.
-
Microsoft / Github seems to not care. Bad optics. |
Beta Was this translation helpful? Give feedback.
-
The real treasure is the friends we made along the way while waiting 3 months for a fix |
Beta Was this translation helpful? Give feedback.
-
Haha happy C++ coding everybody! We'll stand together even in the face of broken CI 😅 GitHub is us after all. |
Beta Was this translation helpful? Give feedback.
-
Why has this been turned into a discussion? Is there any debate about if this really is an issue? |
Beta Was this translation helpful? Give feedback.
-
Still waiting... |
Beta Was this translation helpful? Give feedback.
-
Let's have a minute of silence for all the CI green check marks. |
Beta Was this translation helpful? Give feedback.
-
I still believe this IS an issue that needs to be addressed: #9641 |
Beta Was this translation helpful? Give feedback.
-
👋 Hey all, I am a PM on the Actions team. We are addressing this issue with this change: #9679 In accordance with our security policies, we are working to minimize the amount of third party repositories we install from. In response to this issue we will be removing the third party repo we are installing gcc 13 from, which will change the default gcc version installed on the Ubuntu 22 image to gcc 12. |
Beta Was this translation helpful? Give feedback.
-
Description
Some ubuntu-latest runners come with a newer version of libstdc++ and still have clang 14 which only has partial consteval support. As a result, trying to compile a file that does
#include <chrono>
fails like this:Should be fixable by using clang 17.
Platforms affected
Runner images affected
Image version and build link
2.310.2
Link to a failing build: https://github.com/wheremyfoodat/Panda3DS/actions/runs/6640518979/job/18041094730
Ignore the "Setting up newer Clang" step in this run, the compilation step was still using the stock ubuntu-latest clang
Is it regression?
Yes (worked fine until yesterday: https://github.com/wheremyfoodat/Panda3DS/actions/runs/6614729350/job/17965319784)
Expected behavior
Runner clang should probably be able to compile this
Actual behavior
Some (not all) ubuntu-latest runners fail to compile C++ files that do
#include <chrono>
Repro steps
#include <chrono>
, such as the Panda3DS repo above (without updating the compiler like it does now)ubuntu-latest
actions for it.Beta Was this translation helpful? Give feedback.
All reactions