From 1d901b7cbaa43faea251698dba859bdb5cb18486 Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Tue, 10 Nov 2026 16:03:28 -0500 Subject: [PATCH] Remove GCC 10 from the list of packages to install. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should address the error that just popped up, as [seen](https://github.com/jspecify/jdk/actions/runs/42861855071/job/129989794061?pr=179) in https://github.com/jspecify/jdk/pull/179: ``` Reading package lists... Building dependency tree... Reading state information... Package g++-10 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package gcc-10 E: Package 'g++-10' has no installation candidate ``` It turns out that we haven't been using GCC 10 all this time, anyway, so it's safe to remove, Gemini explains: > Yes, this is directly caused by GitHub's `ubuntu-latest` migration from Ubuntu 24.04 to Ubuntu 26.04 ([actions/runner-images#14748](https://github.com/actions/runner-images/issues/14748), rolling out October 19 – November 19, 2026): > > 1. **Why it failed:** [jspecify.yml](https://github.com/jspecify/jdk/blob/main/.github/workflows/jspecify.yml#L11-L30) uses `runs-on: ubuntu-latest` and runs `sudo apt-get install gcc-10 g++-10 ...`. Ubuntu 26.04 dropped `gcc-10` and `g++-10` from its APT repositories. > 2. **Why we don't even need `gcc-10` / `g++-10`:** When [jspecify.yml](https://github.com/jspecify/jdk/blob/main/.github/workflows/jspecify.yml) was originally created (#114), the `apt-get install gcc-10 g++-10` line was copied from upstream OpenJDK's [build-linux.yml](https://github.com/jspecify/jdk/blob/main/.github/workflows/build-linux.yml#L128-L141)—**without** the accompanying `update-alternatives` command (or `CC`/`CXX` configure arguments). As a result, `./configure` in `jspecify.yml` has never actually used `gcc-10`/`g++-10`; it has always just used the runner's pre-installed default `/usr/bin/gcc` and `/usr/bin/g++` (GCC 13 on Ubuntu 24.04, and GCC 15 on Ubuntu 26.04). > 3. **Recommended fix:** Simply drop `gcc-10 g++-10` from the `apt-get install` line in [jspecify.yml](https://github.com/jspecify/jdk/blob/main/.github/workflows/jspecify.yml#L29). Current OpenJDK 28 sources in this branch already support GCC 15 (which is also what your local workstation has configured in `build/linux-x86_64-server-release`), and `jspecify.yml` already passes `--disable-warnings-as-errors`. (If anything else in Ubuntu 26.04 ever causes trouble, you could also pin `runs-on: ubuntu-24.04` to match upstream [main.yml](https://github.com/jspecify/jdk/blob/main/.github/workflows/main.yml#L60).) (Maybe we *should* find the version that upstream uses, install that, and run `update-alternatives` for that. But for now, I'm happy to get the build working again, and we can cross that bridge when we come to it.) --- .github/workflows/jspecify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jspecify.yml b/.github/workflows/jspecify.yml index 787134f5260..30581f9a363 100644 --- a/.github/workflows/jspecify.yml +++ b/.github/workflows/jspecify.yml @@ -26,7 +26,7 @@ jobs: run: | sudo apt-get update sudo apt-get install --only-upgrade apt - sudo apt-get install gcc-10 g++-10 libcups2-dev libasound2-dev libfontconfig1-dev \ + sudo apt-get install libcups2-dev libasound2-dev libfontconfig1-dev \ libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev - name: Install jtreg run: |