GCC 15 on ubuntu-latest (Ubuntu 26.04): C and C++ builds that now fail
ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). The default gcc and g++ go from GCC 13 to GCC 15 (13.3.0 on the 24.04 image, 15.2.0 on the 26.04 image). The default skips GCC 14, so the changes of two releases arrive at once. Code that built yesterday can fail in make, in pip install of a package with a C extension, or in a Rust or Go build that compiles C underneath.
Which change it is
Three groups of errors account for most of it. The flag that fixes one group does nothing for the others, so look at the first error first.
1. C is C23 by default (GCC 15)
GCC 15 compiles C as -std=gnu23; GCC 13 and 14 used -std=gnu17 (Porting to GCC 15). In C23 an empty parameter list () means (void), and bool, true, false, nullptr and thread_local are keywords. From HDF-EOS5 on ubuntu-latest (hdf5 #6841) and the guide:
error: too many arguments to function 'pakr2dm'; expected 0, have 1 error: passing argument 8 of 'inv_init' from incompatible pointer type [-Wincompatible-pointer-types] error: 'bool' cannot be defined via 'typedef'
Less obvious ones come from macros that switch on the C version. libmdbx expands to [[maybe_unused]] in C23 and fails with "expected identifier or '(' before 'static'" (lighthouse #10518).
2. Warnings that became errors (GCC 14)
GCC 14 made six old warnings into errors: implicit function declarations, implicit int, int-conversion, incompatible-pointer-types, return-mismatch and declaration-missing-parameter-type (Porting to GCC 14):
error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
pylzma 0.5.0 (2018) fails in pip install with "makes integer from pointer without a cast" (hera #1140). The quiet case is configure: its test programs stop compiling, so it decides a library you installed is missing. In hdf5 #6841 it said "szlib is not functional".
3. C++ headers that are no longer pulled in (GCC 15)
libstdc++ headers include less of each other, and <cstdint> is the usual one (Porting to GCC 15):
error: 'uint64_t' does not name a type note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
It is often in a dependency, not your code: an ITK pinned before the fix (ITKR #79), or RocksDB 8.10.0 under the Rust rocksdb crate 0.22.0, built by cc-rs.
Fix for group 1: build C as C17
The real fix is to give the functions their parameters and rename the keywords. To get the build green first, ask for the old default:
env: CFLAGS: -g -O2 -std=gnu17
Keep -g -O2: a CFLAGS you set replaces the default that configure would use. Autotools, setuptools (so pip install from source) and Rust's cc crate read CFLAGS. Elsewhere:
- CMake:
cmake -DCMAKE_C_STANDARD=17 ...gives-std=gnu17, unless the project sets its own standard. - Meson:
meson setup -Dc_std=gnu17 .... - Go with cgo:
CGO_CFLAGS: -O2 -g -std=gnu17(it replaces the default-O2 -g).
lighthouse #10518 does this for its slasher tests until the libmdbx fix lands.
Fix for group 2: add the declarations
Include the header the note names, or declare the function. If the code is not yours, first look for a newer release: pylzma has had 0.6.0 and 0.6.1 since January 2026. As a stopgap, -fpermissive turns these errors back into warnings in C, or one at a time:
env: CFLAGS: -g -O2 -Wno-error=implicit-function-declaration -Wno-error=int-conversion
hdf5 passed -Wno-error=implicit-function-declaration to configure to get its szlib check working again. Some build systems do not pass CFLAGS to every step; the GCC 14 guide suggests CC="gcc -fpermissive" for those.
Fix for group 3: update the dependency, or add the include
No -std option brings the header back. Update the library that has the missing include: drasi moved the rocksdb crate from 0.22.0 to 0.24.0, which brings RocksDB 10.4.2 (drasi-core #1000), and ITK fixed its header in June 2025. If you cannot update yet, CXXFLAGS: -include cstdint adds the header to every C++ file.
Or use the GCC you had on 24.04
The 26.04 image still has gcc-13 and gcc-14 (with g++-13 13.4.0 and g++-14 14.3.0). Pointing the build at GCC 13 avoids all three groups:
env: CC: gcc-13 CXX: g++-13
Autotools, CMake (on a fresh build directory), setuptools, cc-rs and cgo read CC and CXX. The other way out is runs-on: ubuntu-24.04 for that job, until GitHub retires the 24.04 image. Either one buys time; the code still has to change for the next compiler.
Telling it apart
- Look at "Set up job": the Runner Image group says
ubuntu-26.04orubuntu-24.04. Until November 19 a re-run can land on 24.04 and pass, so a green re-run proves nothing. - A
gcc --versionstep before the build shows 15.2.0 on 26.04 and 13.3.0 on 24.04. - If everything compiles and the program then fails to start with "cannot open shared object file", it is a library version, not the compiler: "cannot open shared object file" on Ubuntu 26.04.
Other 26.04 failures
- setup-beam's "not found in version list" on Ubuntu 26.04: the Erlang/OTP build list for 26.04 starts at OTP 26.0, so OTP 24 and 25 stop at setup, and a setup-beam older than v1.24.1 fails for every OTP.
- setup-ruby's "Unavailable version" on Ubuntu 26.04: only some patch releases of each Ruby series are built for 26.04, so a pinned 3.4.2 in
.ruby-versionstops at the Ruby step. - "cannot open shared object file" on Ubuntu 26.04: libxml2 is
libxml2.so.16and ICU is 78, so a cache saved on 24.04, or a binary built for it, cannot findlibxml2.so.2orlibicudata.so.74. - apt on Ubuntu 26.04: renamed and removed packages.
- "coreutils: unknown program": most core tools are uutils.
- "client version ... is too old" on Ubuntu 26.04: Docker 29 refuses clients below API 1.40, so older Testcontainers fails with "Could not find a valid Docker environment".
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GitHub and GitHub Actions are trademarks of GitHub, Inc.; Ubuntu is a trademark of Canonical Ltd.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Canonical, the GCC project or JetBrains.
More: "The ubuntu-latest label will migrate to Ubuntu 26" · "cannot open shared object file" on Ubuntu 26.04 · setup-ruby's "Unavailable version" on Ubuntu 26.04 · GitHub Actions plugins for IntelliJ IDEA compared · 日本語