fix(desktop): stop bundling glib in the Linux libmpv slice - #2359
Open
chrisdebian wants to merge 1 commit into
Open
fix(desktop): stop bundling glib in the Linux libmpv slice#2359chrisdebian wants to merge 1 commit into
chrisdebian wants to merge 1 commit into
Conversation
libglib-2.0.so.0 (2.72, built on the Ubuntu 22.04 stage container) was missing from SYSTEM_LIBS, so it shipped in the bundle and claimed the glib soname the moment JNA loaded libmpv. On a newer glib host (e.g. Ubuntu 24.04, glib 2.80) AWT's XDesktopPeer.init() could then no longer dlopen the system libgio-2.0.so.0, dying with an undefined symbol and disabling java.awt.Desktop for the rest of the process -- the root cause already documented in CLAUDE.md's 2026-07-31 entry. Adding it to SYSTEM_LIBS excludes it from the bundle so the loader falls through to the host's own glib, matching every other libc-family exclusion already in this list. Does not touch the DesktopApp.kt isDesktopSupported() workaround -- still needed for anyone on the currently-published tarball. Note: this only changes the staging script. Taking effect requires rebuilding the Linux tarball, republishing it to maxrave-dev/simpmusic-files, and re-pinning mpvNativesChecksums -- steps only doable through the existing mpvBundleAll pipeline. I don't have that pipeline available to verify end-to-end; this matches the root cause and fix already documented in CLAUDE.md, but hasn't been tested against a real staged build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scripts/mpv-linux/stage.shbundleslibglib-2.0.so.0(2.72, from the Ubuntu 22.04 stage container) into the Linux libmpv slice because it wasn't inSYSTEM_LIBS. On a newer glib host (e.g. Ubuntu 24.04, glib 2.80), the bundled glib claims the soname before AWT'sXDesktopPeer.init()candlopenthe systemlibgio-2.0.so.0, which then fails with an undefined symbol and disablesjava.awt.Desktopfor the rest of the process — breaking all 23 external-link call sites viaLocalUriHandler.This is the root cause already documented in
CLAUDE.md's 2026-07-31 entry ("Bundled glib disabledjava.awt.Desktopon Linux"), which also names the cure directly: "The actual cure is to stop bundling glib — add it toSYSTEM_LIBS, which needs the Linux tarball rebuilt, republished and re-pinned inmpvNativesChecksums." This PR is that first half.Adding
libglib-2.0.so.0toSYSTEM_LIBSexcludes it from the bundle, so the loader falls through to the host's own glib — same mechanism as every other libc-family exclusion already in that list.What this does NOT do
Desktop.isDesktopSupported()workaround inDesktopApp.kt— still needed for anyone on the currently-published tarball, and removing it here would break them.mpvNativesChecksums— perCLAUDE.md, that only happens throughmpvBundleAll, which I don't have access to.Verification
I don't have the
mpvBundleAllpipeline available, so this hasn't been tested against a real staged build.bash -nandshellcheckboth clean on the modified script — no new warnings introduced. Happy to help however's useful once it's staged on your end (e.g. confirming the fix against a built artifact, if you can share one).AI disclosure
This PR was drafted with Claude Code's help — it traced the fix against your own
CLAUDE.mdroot-cause entry, and I reviewed and confirmed the change before opening this.