From 568f74ba15cb2fd5b96eccf36c2605f7621b2cab Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Tue, 5 May 2026 12:23:06 +0800 Subject: [PATCH] ci: install libfreetype-dev / libfontconfig1-dev for skia-safe link Linux `cargo test --workspace` failed at link time: /usr/bin/ld: cannot find -lfreetype: No such file or directory /usr/bin/ld: cannot find -lfontconfig: No such file or directory collect2: error: ld returned 1 exit status skia-safe 0.97 (P0 probe transient dev-dep) links against the system freetype + fontconfig on Linux. The GitHub-hosted ubuntu-latest runner ships only the runtime libs; we need the `-dev` packages so `cc` can resolve `-lfreetype` / `-lfontconfig` during link. macOS and Windows do not link against these (skia-bindings uses CoreText / DirectWrite respectively), so the install step stays gated on `runner.os == 'Linux'`. --- .github/workflows/rust-check.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml index 486d0f7ad..e983d66aa 100644 --- a/.github/workflows/rust-check.yml +++ b/.github/workflows/rust-check.yml @@ -38,7 +38,9 @@ jobs: # Linux GL prerequisites for the P0 probe ignored test step. xvfb gives # winit a virtual display; mesa software-rasterizes GL when no GPU is # available; libxkbcommon-x11-dev / libwayland-dev are winit's link-time - # dependencies on Linux. (No-op on macOS / Windows runners.) + # dependencies on Linux; libfreetype-dev / libfontconfig1-dev are + # skia-bindings' link-time dependencies on Linux (skia-safe v0.97 links + # against the system freetype + fontconfig). (No-op on macOS / Windows.) - name: Install Linux GL prereqs (P0 probe gate) if: runner.os == 'Linux' run: | @@ -47,7 +49,8 @@ jobs: xvfb \ libgl1-mesa-dri libglu1-mesa libegl1 libgles2 \ libxkbcommon-dev libxkbcommon-x11-dev \ - libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ + libfreetype-dev libfontconfig1-dev - run: cargo fmt --all -- --check - run: cargo build --workspace - run: cargo test --workspace