Repository navigation
Closed
Description
A regression with perry-0.48 on WSL at least (perry doctor fine and code compiled with previous version) :
# Initialize a new project
perry init my-project
cd my-project
# Compile and run
perry compile src/main.ts -o myapp
Collecting modules...
Found 1 module(s): 1 native, 0 JavaScript
Generating code...
Module init order (0 modules):
Wrote object file: main_ts.o
Generating stubs for 9 missing symbols (0 data, 9 functions, 0 identity)
- js_call_function
- js_new_from_handle
- js_runtime_init
- js_set_property
- js_create_callback
- js_get_export
- js_load_module
- js_new_instance
- js_await_js_promise
Linking (runtime-only)...
/usr/bin/ld: cannot find -lpulse-simple: No such file or directory
/usr/bin/ld: cannot find -lpulse: No such file or directory
collect2: error: ld returned 1 exit status
Error: Linking failed
also, probably linked:
perry run .
error: invalid value '.' for '[PLATFORM]'
[possible values: macos, ios, watchos, tvos, android, linux, windows, web]
For more information, try '--help'.
I tried like what I've seen in issue #6 : asking a quick diagnostic to Claude:
The error has nothing to do with your TypeScript code. It's a linker regression in perryts v0.48 where the build system unconditionally passes -lpulse-simple and -lpulse (PulseAudio libraries) to the linker — even for a pure CLI "Hello World" that has no audio whatsoever.
On WSL, PulseAudio dev libraries are typically not installed (WSL has no native audio subsystem), so ld can't find them and the link step fails.
There are two layers to the problem:
perryts bug: the compiler is emitting audio library flags as part of its default "runtime-only" link profile, which shouldn't be needed for a CLI app. Since you're on v0.48 and this is almost certainly an overly broad link config that should be guarded behind a feature flag or platform check.
WSL environment: even if the flag were intentional, WSL doesn't ship libpulse-dev by default, so any unconditional dependency on it will break here.
Workarounds to try :
Install the missing dev libraries (quick fix)
bash $ sudo apt update
sudo apt install libpulse-dev
This satisfies the linker. The libraries won't actually be used at runtime by a hello world, but the link will succeed.
An indeed, compilation was successful:
my-project$ ./myapp
Hello from Perry 😊!
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix: Linux PulseAudio linker error for non-UI programs, `perry run .`…
proggeramlug commentedon Mar 25, 2026
Hey @jgranduel, thanks for the detailed report (and the Claude diagnostic — spot on!).
Both issues are fixed in v0.4.14 (
9c0ef6c):PulseAudio linker error: The
-lpulse-simple -lpulseflags were being passed unconditionally for every Linux build. They're now only linked when your program actually usesperry/ui(audio capture). A plain hello world no longer requires PulseAudio installed.perry run .: The first positional argument was strictly typed as a platform enum, so anything that wasn'tmacos,ios, etc. was rejected. The parser now treats non-platform values as the input path, soperry run .,perry run src/main.ts, etc. all work as expected.To update:
There are a lot of updates landing right now and things are moving fast, so reports like yours are really helpful and appreciated — they help us catch regressions quickly. Keep them coming!
jgranduel commentedon Mar 25, 2026
I was about to update indeed, but perry didn't spot the new version (still on WSL)
norwayiscoming commentedon Mar 26, 2026
Just a heads up, I ran into a similar issue with the linker errors. It’s due to missing PulseAudio libraries on WSL, which are not really needed for a basic CLI app. You can either install the libraries using:
or, if you don’t need audio support, you might want to check if the issue persists in a newer version. I had success with v0.4.14. You can try forcing the update command like this:
If that doesn’t work, you may need to manually download from the releases page. Good luck!
proggeramlug commentedon Mar 26, 2026
Thanks @norwayiscoming - all true and correct. Also, new releases are flying in, all with fixes for various platforms (including Linux).
jgranduel commentedon Mar 26, 2026
With
perry-0.4.19, the update worked out well on WSL (not on Windows). Might expect a .gz ?fix: revert broad Tuple type additions that caused SIGBUS on complex …
scaffold: perry-codegen-llvm experimental backend (branch: llvm-backend)
scaffold: perry-codegen-llvm experimental backend (branch: llvm-backend)
proggeramlug commentedon Apr 23, 2026
Closing this as perry has moved way beyond this for now. If any issues remain just reopen or file a new ticket :)
fix(compile): warm auto-optimize cache dropped CPU-only well-known li…
fix(hir,codegen,runtime): closure-nested dynamic import() resolved; u…
fix(runtime): size perry-spawned thread stacks for the program's stat…
fix(runtime): size perry-spawned thread stacks for the program's stat…
fix(runtime): size perry-spawned thread stacks for the program's stat…
fix(runtime): size perry-spawned thread stacks for the program's stat…