Previous overlay only set CMAKE_C_FLAGS which gets overridden by
target-level COMPILE_FLAGS. This version:
1. Patches src/CMakeLists.txt to remove -fvisibility=hidden from
target COMPILE_FLAGS
2. Adds -DGRAPHITE2_EXPORTING so GR2_API macro uses
visibility("default") instead of visibility("hidden")
3. Stops replacing GRAPHITE2_STATIC check in Types.h with "1"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Root cause: vcpkg's graphite2 compiles with -fvisibility=hidden,
making gr_* symbols invisible in static libs. rust-lld (default on
Rust 1.95+) treats these as hard errors.
Fix: overlay port that rebuilds graphite2 with -fvisibility=default
and CMAKE_C_VISIBILITY_PRESET=default. This exports all symbols
properly while keeping static linking for portable binaries.
Also restore vcpkg-based build (reverts pkg-config switch) and
use Rust stable with default linker (no hacks needed).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vcpkg's graphite2/ICU static libs have symbol visibility issues that
break with every linker combination (lld, ld.bfd, mold). Switch to
system packages via pkg-config which link dynamically with proper
symbol exports.
Trade-off: Linux binary now depends on system ICU/harfbuzz at runtime,
but this matches how most Linux apps distribute (AppImage bundles
these automatically).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Forgot to add mold package to apt-get install after restoring
workflow to v1.1.6 base.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Root cause: ld.bfd can't mix anonymous + named version tags (binutils
bug #13406). lld errors on graphite2 hidden symbols. mold handles both.
Previous mold attempt failed due to also deleting system ICU .so files.
This time, only set RUSTFLAGS without touching system libraries.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ubuntu 22.04's ld.bfd (2.38) can't handle Rust's version scripts.
Ubuntu 24.04's ld.bfd (2.42) supports --undefined-version natively.
Keep the ld.lld→ld wrapper to avoid graphite2 hidden symbol errors.
Use Rust stable instead of pinned 1.94.1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deleting gcc-ld breaks self-contained linker mode. Instead, replace
the ld.lld binary with a shell script that delegates to /usr/bin/ld
(ld.bfd), which handles hidden symbols correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Even with Rust 1.94.1, the sysroot contains gcc-ld/ld.lld which cc
auto-detects and uses. Delete the wrapper directory so cc falls back
to system ld.bfd, which handles vcpkg graphite2's hidden symbols.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The shared rust-cache contained rust-lld from Rust 1.96 builds,
which was picked up even when using Rust 1.94.1. Add prefix-key
to force a clean cache for the 1.94.1 toolchain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rust 1.95+ introduced two incompatibilities with our vcpkg setup:
1. rust-lld as default linker — errors on graphite2 hidden symbols
2. New version script format — incompatible with ld.bfd
Pin to 1.94.1 (the version used in the successful v1.1.6 build)
instead of working around individual linker issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rust 1.95+ enables rust-lld by default on Linux. rust-lld treats
hidden symbol references (STV_HIDDEN) as hard errors, unlike the
traditional cc/ld.bfd linker used in Rust 1.94 and earlier.
vcpkg's graphite2 static library has gr_* symbols with hidden
visibility, causing link failures. Disable rust-lld with
-Clinker-features=-lld to use cc/ld.bfd as in the successful
v1.1.6 build (Rust 1.94.1).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove Cargo.lock from .gitignore and commit the lockfile with
tectonic sub-crates pinned to the versions that worked in v1.1.6.
Without a lockfile, cargo resolves latest sub-crate versions which
have breaking API changes incompatible with tectonic 0.15.0.
Workflow restored to v1.1.6 original (no linker hacks needed).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The v1.1.6 release built successfully without Cargo.lock committed
(cargo resolves fresh in CI). Our attempts to fix Linux linking by
switching linkers (lld → bfd → mold) and patching graphite2/ICU were
all caused by committing a Cargo.lock that pulled in incompatible
dependency versions.
Restore the workflow to the exact v1.1.6 state and remove Cargo.lock
from git, letting CI resolve dependencies naturally as before.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tectonic compiles xetex C++ against vcpkg ICU 78 headers but the
linker finds system libicuuc.so (v70), causing undefined ucnv_*_78
symbols. Remove system ICU .so files to force static linking against
vcpkg's ICU 78.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mold picks up system ICU (version 70) instead of vcpkg ICU (version 78),
causing undefined symbol errors for ucnv_*_78 functions. Add vcpkg
lib path via LIBRARY_PATH and -L flag to ensure correct ICU is linked.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ld.bfd handles hidden symbols but fails on Rust's version scripts.
lld handles version scripts but fails on hidden symbols.
mold handles both correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ld.bfd errors on "anonymous version tag cannot be combined with
other version tags" from Rust-generated symbols.map. The
--undefined-version flag makes this non-fatal.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rust-lld treats hidden symbol references as hard errors, but ld.bfd
resolves them. vcpkg's graphite2 has STV_HIDDEN on gr_* symbols which
lld refuses to link. Switch to ld.bfd via RUSTFLAGS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
grep returns exit 1 when no match found, which aborts the script
under set -e. Wrap with { ... || true; } to prevent this.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use a temp file for symbol list instead of <() process substitution,
which fails in GitHub Actions shell. Also add explicit shell: bash.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
objcopy cannot modify symbols inside .a archives directly. Extract
individual .o files with ar, globalize gr_* symbols in each, then
repack the archive.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vcpkg builds graphite2 with -fvisibility=hidden, making gr_* API
symbols invisible to the linker. Use objcopy --globalize-symbol to
make them visible again before the Tauri build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tectonic's dep_support requires graphite2 at the vcpkg path.
Replace vcpkg's hidden-visibility graphite2 with symlinks to
the system libgraphite2 (from libgraphite2-dev) which exports
all symbols properly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vcpkg builds graphite2 with hidden symbol visibility, causing
undefined symbol errors at link time. Remove vcpkg's graphite2
before building so the linker falls back to the system
libgraphite2-dev which exports all symbols properly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The graphite2 hidden symbol issue is caused by fresh vcpkg builds,
not by tectonic version. The old v1 cache had a working graphite2
build. Restore the cache key to reuse it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>