Skip to content

Peery GUI app: Linking failed on Ubuntu 25.10 #423

@ansarizafar

Description

@ansarizafar

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 failed

What 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.ts

Environment

  • 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

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions