fix: use system packages (pkg-config) for Linux tectonic deps

vcpkg's static libraries have symbol visibility issues on Linux that
are incompatible with Rust's default linker (rust-lld since 1.95+):
- graphite2: -fvisibility=hidden makes gr_* symbols invisible
- ICU: version suffix mismatch between headers and .a files

Switch Linux to pkg-config + system packages (apt). This links
dynamically against system libs, which:
- AppImage bundles automatically via linuxdeploy
- .deb declares as package dependencies (added to tauri.conf.json)

macOS and Windows continue using vcpkg (static) unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hanjin Bae 2026-06-09 23:37:47 +09:00
parent 9b1a8825d1
commit aeb405625f
2 changed files with 18 additions and 37 deletions

View file

@ -447,42 +447,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf \
autoconf autoconf-archive automake libtool pkg-config
# Static linking via vcpkg — avoids runtime dependency on system ICU/harfbuzz.
# Without this, the binary links against the build host's libicuuc.so.70
# (Ubuntu 22.04) and fails on distros shipping newer ICU (e.g. Ubuntu 25.10
# with libicuuc.so.76). Mirrors the macOS approach (commit 9566956).
- name: Setup vcpkg
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg $HOME/vcpkg
$HOME/vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
- name: Restore vcpkg cache
id: vcpkg-cache
uses: actions/cache/restore@v4
with:
path: ~/vcpkg/installed
key: vcpkg-linux-x64-v1
- name: Install Linux dependencies (vcpkg)
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
env:
VCPKG_BINARY_SOURCES: "clear"
run: |
$HOME/vcpkg/vcpkg install \
"harfbuzz[graphite2]:x64-linux" \
fontconfig:x64-linux \
freetype:x64-linux \
icu:x64-linux
- name: Save vcpkg cache
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/vcpkg/installed
key: vcpkg-linux-x64-v1
autoconf autoconf-archive automake libtool pkg-config \
libharfbuzz-dev libgraphite2-dev libicu-dev libfreetype-dev \
libfontconfig-dev libpng-dev
- uses: dtolnay/rust-toolchain@stable
with:
@ -505,7 +472,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZOTERO_CONSUMER_KEY: ${{ secrets.ZOTERO_CONSUMER_KEY }}
ZOTERO_CONSUMER_SECRET: ${{ secrets.ZOTERO_CONSUMER_SECRET }}
TECTONIC_DEP_BACKEND: vcpkg
TECTONIC_DEP_BACKEND: pkg-config
CXXFLAGS: "-std=c++17"
CFLAGS: ""
run: pnpm --filter @claude-prism/desktop tauri build --target x86_64-unknown-linux-gnu

View file

@ -55,6 +55,20 @@
"nsis": {
"installMode": "perMachine"
}
},
"linux": {
"deb": {
"depends": [
"libwebkit2gtk-4.1-0",
"libgtk-3-0",
"libicu72",
"libharfbuzz0b",
"libgraphite2-3",
"libfreetype6",
"libfontconfig1",
"libpng16-16"
]
}
}
},
"plugins": {