镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Issue with 'hello world' example #8

Closed

Description

@jgranduel

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 😊!

Activity

  1. proggeramlug commented on Mar 25, 2026

    @proggeramlug
    Contributor

    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 -lpulse flags were being passed unconditionally for every Linux build. They're now only linked when your program actually uses perry/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't macos, ios, etc. was rejected. The parser now treats non-platform values as the input path, so perry run ., perry run src/main.ts, etc. all work as expected.

    To update:

    perry 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!

  2. jgranduel commented on Mar 25, 2026

    @jgranduel
    Author

    I was about to update indeed, but perry didn't spot the new version (still on WSL)

    $ perry --version
    perry 0.4.8
    $ perry update
    Perry is up to date (v0.4.8)
    
  3. norwayiscoming commented on Mar 26, 2026

    @norwayiscoming

    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:

    sudo apt install libpulse-dev

    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:

    perry update --force

    If that doesn’t work, you may need to manually download from the releases page. Good luck!

  4. proggeramlug commented on Mar 26, 2026

    @proggeramlug
    Contributor

    Thanks @norwayiscoming - all true and correct. Also, new releases are flying in, all with fixes for various platforms (including Linux).

  5. jgranduel commented on Mar 26, 2026

    @jgranduel
    Author

    With perry-0.4.19, the update worked out well on WSL (not on Windows). Might expect a .gz ?

    Windows> perry update
    Update available: 0.4.15 → 0.4.19
      Release: https://github.com/PerryTS/perry/releases/tag/v0.4.19
    
    Downloading perry-windows-x86_64.zip v0.4.19...
    Error: Failed to extract archive
    
    Caused by:
        0: failed to iterate over archive
        1: invalid gzip header
    
  6. proggeramlug commented on Apr 23, 2026

    @proggeramlug
    Contributor

    Closing this as perry has moved way beyond this for now. If any issues remain just reopen or file a new ticket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions