-
Notifications
You must be signed in to change notification settings - Fork 31
setup-build-env: enable GCC 15 installation #199
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
Conversation
whoa... that's a risky move, let me google a bit. |
|
Will the following PPA work? It is official from Ubuntu itself, has gcc-15 package, claims to:
|
This was one of the things I tried. Unfortunately, it doesn't work. Try this: $ podman run --rm -it ubuntu:noble /bin/bash
$ apt update && apt install -y sudo software-properties-common
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
$ sudo apt-get update -y
$ sudo apt-get install gcc-15
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package gcc-15
I understand the concern, but in the context of bpf/libbpf CI, I don't think it's more risky than what we had so far. If the Sure, changes in upstream ubuntu packages may break this setup, but that has always been the case, and we already had issues when ubuntu archives were down, or with cross-compilation toolchain due to dependencies on cross-arch libs. A viable alternative is to build gcc from source, but that's a bit more work to set up (build takes time, so the artifacts need to be cached similar to gcc-bpf). The apt repo hack appears to be working, and is easy to implement, so I want to try it first. |
Wellp, that's unfortunate.
There is no guarantee for that, really. Dependencies of some binaries or libraries can be broken. I don't think ubuntu is tested in this half-dist-upgraded configuration.
I see, 🤞 . |
@eddyz87 looks like gcc-15 in this ppa is not available on ubuntu 24 (but why???) |
2feee79 to
45e313e
Compare
GCC 15 is not available in Ubuntu 24.04 repositories, which is the distro used by both github and self-hosted BPF CI runners. To enable GCC 15 installation, make setup-build-env scripts set up Ubuntu 25.04 (plucky) repositories and then install the packages. Update cross-compilation setup with a apt config restrictions instead of manipulating the source lists. Refactor the action.yml into a single action.sh script for simpler local testing. Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
|
To sum up:
This approach seems to be working fine:
We can remove this hack when one of the following happens:
If the hack doesn't bite me for at least a month, I'll call it a win. |
See: libbpf/ci#199 Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>

GCC 15 is not available in Ubuntu 24.04 repositories, which is the distro used by both github and self-hosted BPF CI runners.
To enable GCC 15 installation, make setup-build-env scripts set up Ubuntu 25.10 (questing) repositories and then install the packages.
Also update cross-compilation setup with a apt config restrictions instead of manipulating the source lists.