Skip to content

snap/dcimgui: use system libraries rather than building static vendored libs - #14682

Merged
mitchellh merged 2 commits into
ghostty-org:mainfrom
jcollie:snap-system-libs
Oct 13, 2026
Merged

mitchellh merged 2 commits into
ghostty-org:mainfrom
jcollie:snap-system-libs

Conversation

@jcollie

@jcollie jcollie commented Oct 13, 2026

Copy link
Copy Markdown
Member

snaps have been building the vendored freetype/fontconfig libraries and linking them statically. As seen in non-snap builds, this is problematic because GTK links to the system shared libraries. Having two copies running at the same time causes crashes as the libraries fight each other in memory that they share.

Also fixes a related problem that dcimgui would get libfreetype.so copied into it's static library when built against the system shared libraries.

Related to: #14392

AI disclosure: Claude Code was used in the preparation of this PR.

With freetype from the system, the static dcimgui library was given
-lfreetype directly. Zig 0.16 then puts libfreetype.so into
libdcimgui.a, and the final link of ghostty fails on that archive
member, so any build with -fsys=freetype or --system failed from a
clean cache.

The static library now gets only freetype's include paths from
pkg-config, and the shared library is linked through the dcimgui
module and its test instead.
The snap built without --system, so it statically linked the vendored
copies of these libraries while GTK loaded Ubuntu's into the same
process. Build against the system libraries instead; GTK already
brings their runtime packages into the snap.
@jcollie
jcollie requested a review from a team as a code owner October 13, 2026 17:00
@mitchellh
mitchellh merged commit 1f80eec into ghostty-org:main Oct 13, 2026
103 checks passed
@github-actions github-actions Bot added this to the 1.4.0 milestone Oct 13, 2026
@jcollie
jcollie deleted the snap-system-libs branch October 13, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants