Repository navigation
Closed
Labels
bugConfirmed defect or regressionConfirmed defect or regression
Description
What happened
Linking failed with the following error log
Collecting modules...
Found 1 module(s): 1 native, 0 JavaScript
Generating code...
Wrote object file: main_ts.o
Linking (runtime-only)...
[strip-dedup] Processing: /home/zafaransari/Downloads/perry/libperry_ui_gtk4.a
[strip-dedup] llvm-ar not found, skipping dedup for libperry_ui_gtk4.a (optional — install with: rustup component add llvm-tools)
[strip-dedup] skipped for UI lib (non-fatal): llvm-ar not found
Warning: `pkg-config --libs gtk4` did not return GTK4 linker flags (pkg-config exited 1: Package gtk4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk4', required by 'virtual:world', not found). Falling back to a hardcoded GTK4 link set — install `libgtk-4-dev` (Debian/Ubuntu) or `gtk4-devel` (Fedora/RHEL) and ensure pkg-config can find `gtk4.pc` to silence this warning.
Linking perry/ui (native UI) from /home/zafaransari/Downloads/perry/libperry_ui_gtk4.a
/usr/bin/ld: cannot find -lgtk-4: No such file or directory
/usr/bin/ld: cannot find -lgraphene-1.0: No such file or directory
collect2: error: ld returned 1 exit status
Error: Linking failedWhat you expected
App should compile without linking error
Linkin.g failed
Minimal reproduction
- peery init playground
- Copy paste counter example from doc
- peery compile src/main.ts// your code here
import { App, VStack, Text, Button, State } from "perry/ui";
const count = State(0);
App({
title: "Counter",
width: 400,
height: 300,
body: VStack(16, [
Text(`Count: ${count.value}`),
Button("Increment", () => count.set(count.value + 1)),
]),
});Command you ran:
perry compile src/main.tsEnvironment
-
Perry version: perry 0.5.465
-
Host OS: Ubuntu 25.10
-
Target: native
-
Installed via: Downloaded peery cli binary from release page on github and also tried installation from npm.
Diagnostic output
Perry Doctor
Environment Checks
──────────────────
✓ perry version: 0.5.465
✓ update status: up to date
✓ clang (LLVM codegen): Ubuntu clang version 20.1.8 (0ubuntu4)
✓ system linker (cc): cc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
✓ runtime library: /home/zafaransari/Downloads/perry/libperry_runtime.a
✓ project config (perry.toml): found
All checks passed!
Anything else
CLi apps are compiling correctly but GUI app failed to link
Metadata
Metadata
Assignees
Labels
bugConfirmed defect or regressionConfirmed defect or regression
Activity
ansarizafar commentedon May 2, 2026
I have installed all the dependencieswith following commands as suggested by Google AI but I am still unable to compile GUI app
Error log
ansarizafar commentedon May 2, 2026
I have also installed perry in my project from npm but unable to compile app
Why I am getting following error
proggeramlug commentedon May 2, 2026
Confirmed — this is a real link.rs bug, not a missing system package on your end. Fix is committed for v0.5.495 (next release).
Root cause: v0.5.440 added
gstreamer = "0.23"tocrates/perry-ui-gtk4/Cargo.tomlfor the perry/media playbin backend. The trimmedlibperry_ui_gtk4.aretains the gstreamer-rs objects, but the Linux GTK4 link branch only emits GTK4 libs —pkg-config --libs gtk4doesn't transitively referencegstreamer-1.0, so ld correctly complainsDSO missing from command line. YourRUSTFLAGS=…workaround was a dead-end becauseperry compileinvokesccdirectly for the final link step (RUSTFLAGS is dropped on the floor — that env var only affects cargo/rustc invocations).[strip-dedup] rlib NOT foundis benign — it's a non-fatal fallback path that triggers symbol-based dedup instead. We don't ship the companion .rlib, so this message will always appear and isn't related to your link error.Workaround until v0.5.495 ships — shadow
ccwith a wrapper that appends the missing libs:Command::new("cc")in perry honors PATH lookup, so the wrapper is picked up cleanly. It only touches link invocations (perry usesccexclusively for linking on Linux), so it won't interfere with anything else.Once v0.5.495 lands the official release pipeline, you can drop the wrapper —
perry compile src/main.tswill Just Work afterapt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev.ansarizafar commentedon May 2, 2026
Thanks for this amazing project. I will wait for the next release.
fix(link): GTK4 gstreamer link + perry-hir stale export (#423) (#426)
proggeramlug commentedon May 5, 2026
Fix shipped in v0.5.494 (commit dd44155) — GTK4 link command now includes the gstreamer libs transitively required by the perry/media playbin backend. Current release is v0.5.523, so an
npm i -g @perryts/perry(or fresh download from releases) plusapt install libgtk-4-dev libgraphene-1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-devshould letperry compile src/main.tslink cleanly without theccwrapper workaround. Closing — please reopen if you still hit the linker error on a current release.refactor(link): extract the GTK4 pkg-config lib groups to linux_ui_li…
fix(link): stop --whole-archive'ing the stdlib on the Linux GTK4 UI p…