ci: install gcc on the openSUSE runner so cargo can link #396

Merged
longjacksonle merged 3 commits from ci/fix-cc-linker-gcc into main 2026-07-28 20:25:29 +02:00

Problem

The Check job fails at error: linker cc not found while compiling the first build script, before it ever reaches clippy/build/tests. The shared RUNS_ON_OPENSUSE_BASE_LATEST runner image stopped shipping a C compiler, and rustc drives linking through cc. This is the same runner-image regression that broke mokosh-apps CI (fixed there in #446).

Fix

Add an "Ensure C toolchain" step before the cargo steps that runs sudo zypper --non-interactive install --no-recommends gcc. The gcc package provides /usr/bin/cc. The runner user is unprivileged, so a bare zypper install fails with Root privileges are required to run this command (exit 5); sudo is required and is passwordless on the runner.

Scope

Only check.yml compiles on the host. build-api.yml / build-web.yml compile inside docker buildx (their own toolchain), and e2e.yml / create-release.yml do not run host cargo builds, so none of them need this. The durable fix is restoring the toolchain in the base runner image itself (niceguyit infra); this unblocks CI in the meantime.

Verification

The identical change was verified green on mokosh-apps: the bare-zypper attempt failed with the root-privileges error, and the sudo version passed the toolchain step and let fmt/clippy/tests run.

## Problem The Check job fails at `error: linker cc not found` while compiling the first build script, before it ever reaches clippy/build/tests. The shared `RUNS_ON_OPENSUSE_BASE_LATEST` runner image stopped shipping a C compiler, and rustc drives linking through `cc`. This is the same runner-image regression that broke mokosh-apps CI (fixed there in #446). ## Fix Add an "Ensure C toolchain" step before the cargo steps that runs `sudo zypper --non-interactive install --no-recommends gcc`. The `gcc` package provides `/usr/bin/cc`. The runner user is unprivileged, so a bare `zypper install` fails with `Root privileges are required to run this command` (exit 5); sudo is required and is passwordless on the runner. ## Scope Only `check.yml` compiles on the host. `build-api.yml` / `build-web.yml` compile inside `docker buildx` (their own toolchain), and `e2e.yml` / `create-release.yml` do not run host cargo builds, so none of them need this. The durable fix is restoring the toolchain in the base runner image itself (niceguyit infra); this unblocks CI in the meantime. ## Verification The identical change was verified green on mokosh-apps: the bare-zypper attempt failed with the root-privileges error, and the sudo version passed the toolchain step and let fmt/clippy/tests run.
ci: install gcc on the openSUSE runner so cargo can link
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 29s
Check / fmt + clippy + build + tests (pull_request) Failing after 29s
ce96f138eb
The RUNS_ON_OPENSUSE_BASE_LATEST base image stopped shipping a C compiler, so the Check job fails at `error: linker cc not found` while compiling the first build script, before it reaches clippy/build/tests. rustc drives linking through `cc`, which the `gcc` package provides. Add a step to install it; the runner user is unprivileged so it goes through sudo (passwordless on the runner).

Same runner-image regression that broke mokosh-apps CI (fixed there in #446); the durable fix is restoring the toolchain in the base image. Only check.yml compiles on the host - build-api/build-web compile inside docker buildx, so they are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEnKozf9UzwgoT1RUELYpb
ci: also install libopenssl-devel for openssl-sys
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 34s
Check / fmt + clippy + build + tests (pull_request) Successful in 12m58s
67e312de62
The gcc step got the Check job past `linker cc not found`, but it then failed compiling `openssl-sys` (pulled in via reqwest/native-tls): `Package 'openssl' not found` from pkg-config. The trimmed base image is also missing the OpenSSL dev package. pkg-config itself is present (it runs and reports the miss), so only `libopenssl-devel` - which ships the headers and `openssl.pc` - needs adding alongside gcc.

Compiled clean locally only because the dev box already has OpenSSL headers; the runner does not.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEnKozf9UzwgoT1RUELYpb
ci(e2e): install Chromium system libraries trimmed from the runner
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 50s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m8s
Create release / Create release from merged PR (pull_request) Has been skipped
b41a5a69e9
The e2e job's bundled Chromium aborts at launch with `libgobject-2.0.so.0: cannot open shared object file`: the RUNS_ON_OPENSUSE_BASE_LATEST image was trimmed of the X / GTK / NSS / glib shared libraries it links. This is the exact case the "Install Playwright browser" step's comment anticipated ("if a future image trims them, add a zypper install step for the missing sonames").

Add a step that installs the openSUSE resolution of Chromium's soname dependency set (nss/nspr, glib, atk/at-spi, cups, dbus, drm, gbm, xcb/xkbcommon, the X11 libs, pango/cairo, alsa, gtk3) via sudo zypper. Package names were resolved against openSUSE by soname, not guessed. Same trimmed-base-image root cause as the gcc/openssl additions to check.yml; the durable fix is restoring these in the base image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEnKozf9UzwgoT1RUELYpb
longjacksonle deleted branch ci/fix-cc-linker-gcc 2026-07-28 20:25:30 +02:00
Author
Owner

Update: the runner-image trim turned out to be broader than just cc, so this PR grew to restore three sets of dropped native libraries. Both CI workflows are now green on the latest commit (b41a5a6):

  • check.yml (run 2195): SUCCESS. Needed gcc (linker cc) + libopenssl-devel (openssl-sys via reqwest/native-tls couldn't find openssl.pc).
  • e2e.yml (run 2196): SUCCESS. Playwright's bundled Chromium was aborting at launch on libgobject-2.0.so.0; added the openSUSE resolution of Chromium's soname dependency set (nss/nspr, glib, atk/at-spi, cups, dbus, drm, gbm, xcb/xkbcommon, the X11 libs, pango/cairo, alsa, gtk3). Package names were resolved by soname against openSUSE, not guessed.

All three are the same root cause: the RUNS_ON_OPENSUSE_BASE_LATEST image was rebuilt without libraries the jobs relied on being preinstalled. These per-repo sudo zypper install steps are a stopgap; the durable fix is restoring the libraries in the base runner image itself.

Update: the runner-image trim turned out to be broader than just `cc`, so this PR grew to restore three sets of dropped native libraries. Both CI workflows are now green on the latest commit (b41a5a6): - **check.yml** (run 2195): SUCCESS. Needed `gcc` (linker `cc`) + `libopenssl-devel` (`openssl-sys` via reqwest/native-tls couldn't find `openssl.pc`). - **e2e.yml** (run 2196): SUCCESS. Playwright's bundled Chromium was aborting at launch on `libgobject-2.0.so.0`; added the openSUSE resolution of Chromium's soname dependency set (nss/nspr, glib, atk/at-spi, cups, dbus, drm, gbm, xcb/xkbcommon, the X11 libs, pango/cairo, alsa, gtk3). Package names were resolved by soname against openSUSE, not guessed. All three are the same root cause: the `RUNS_ON_OPENSUSE_BASE_LATEST` image was rebuilt without libraries the jobs relied on being preinstalled. These per-repo `sudo zypper install` steps are a stopgap; the durable fix is restoring the libraries in the base runner image itself.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!396
No description provided.