fix(link): GTK4 gstreamer link + perry-hir stale export (#423)#426
Merged
Conversation
`lower_module_with_class_id_types_and_seed` was added to the public re-exports in v0.5.489 (66c5e74) but the function definition was never pushed to main — it lives in an unmerged in-progress branch. Result: `cargo build -p perry-hir` on `origin/main` HEAD fails with `error[E0432]: unresolved import lower::lower_module_with_class_id_types_and_seed`, so any source build of perry from main has been broken since v0.5.489 landed. The cached optimized libs still work, which is why this didn't surface immediately. No callers on main reference the function yet (the matching collect_modules.rs call site is also in the in-progress branch), so dropping the stale export is a no-op for behavior. The export will return when the larger feature it belongs to is ready to land.
Linux GTK4 link branch only emitted GTK4 libs; pkg-config --libs gtk4 doesn't transitively reference gstreamer-1.0, so the gstreamer-rs objects retained in libperry_ui_gtk4.a (added by v0.5.440 #371 for perry/media) caused 'undefined reference to gst_message_parse_buffering' + 'DSO missing from command line' at link time on Ubuntu 25.10 even with libgtk-4-dev + libgstreamer1.0-dev installed. Fix: query pkg-config --libs for gstreamer-1.0 + base/app/video/audio, fall back to hardcoded -lgstreamer-1.0 -lgstbase-1.0 -lgstapp-1.0 -lgstvideo-1.0 -lgstaudio-1.0 with a warning that names the apt + dnf package names.
proggeramlug
added a commit
that referenced
this pull request
May 3, 2026
…rt &str API Two post-rebase fixups against origin/main: - crates/perry-hir/src/lib.rs: re-export `lower_module_with_class_id_types_and_seed`. The export was dropped during the rebase resolution against #426 (which removed an unrelated stale export); the function itself still lives in lower.rs and is still called by collect_modules. Without this re-export the perry binary fails to link with E0425. - crates/perry/src/commands/compile/collect_modules.rs: pass `src.as_str()` to `cached_resolve_import`. Upstream tightened the parameter to `&str`; our existing call site passed `&String`.
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.
Summary
Two fixes that together unblock
perry compilefor a GTK4 GUI app on Ubuntu 25.10 (#423).Commit 1 —
fix(perry-hir): drop stale export of unimplemented function: v0.5.489 (66c5e74) addedlower_module_with_class_id_types_and_seed,tocrates/perry-hir/src/lib.rs'spub use lower::{...}block, but the function definition was never pushed to main (it lives in an unmerged in-progress branch). Source builds of perry from main have been broken witherror[E0432]: unresolved importsince v0.5.489 landed. No callers on main reference the function yet, so dropping the stale export is a no-op for behavior — the export will return when the larger feature it belongs to is ready to land.Commit 2 —
fix(link): add gstreamer libs to GTK4 link command (#423, v0.5.494): v0.5.440 (feat(media): perry/media streaming playback (#351, v0.5.429) #371) addedgstreamer = "0.23"tocrates/perry-ui-gtk4/Cargo.tomlfor the perry/media playbin backend. The trimmedlibperry_ui_gtk4.aretains the gstreamer-rs objects regardless of whether the user's program importsperry/media, but the Linux GTK4 link branch inlink.rsonly emits GTK4 libs (-lgtk-4 -lgio-2.0 …).pkg-config --libs gtk4doesn't transitively referencegstreamer-1.0, so ld correctly complainsundefined reference to gst_message_parse_buffering+DSO missing from command line. The user'sRUSTFLAGS=-l gstreamer-1.0 …workaround was a dead-end sinceperry compileinvokesccdirectly for the final link.Fix: query
pkg-config --libs gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-video-1.0 gstreamer-audio-1.0and append the result; on failure fall back to-lgstreamer-1.0 -lgstbase-1.0 -lgstapp-1.0 -lgstvideo-1.0 -lgstaudio-1.0(Debian/Ubuntu shiplibgstbase-1.0.so.0, notlibgstreamer-base-1.0.so.0— the soname differs from the pkg-config name). The 5 libs cover what gstreamer-rs's playbin path touches inmedia_playback.rs. Same pkg-config → hardcoded-fallback shape as the existing GTK4 block above. Fallback warning names both the apt and dnf package names.The
[strip-dedup] rlib NOT foundline the user also reported is benign — it's a fallback path that triggers symbol-based dedup, exactly what strip-dedup is designed to do when the companion .rlib isn't shipped (and we don't ship it).Bumps version 0.5.493 → 0.5.494.
Test plan
cargo build --release -p perryclean on the worktree (verifies commit 1 unbreaks main + commit 2 doesn't regress)