alisomay / libpd-rs

Safe rust abstractions over libpd.
Other
82 stars 4 forks source link

Unmentioned build dependencies #17

Open BlacRyu opened 8 months ago

BlacRyu commented 8 months ago

When building (on Windows) I get the following error:

    thread 'main' panicked at C:\Users\blacr\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5:  

    failed to execute command: program not found                                                                                   
    is `cmake` not installed? 

After installing CMake, I then get the following:

    thread 'main' panicked at C:\Users\blacr\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.68.1\lib.rs:611:31:
    Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"

After installing LLVM I was then able to build successfully.

I then tried to run the with_nanou example but ran into another error:

     Running `target\release\examples\with_nannou.exe`
thread 'main' panicked at C:\Users\blacr\.cargo\registry\src\index.crates.io-6f17d22bba15001f\nannou_audio-0.18.0\src\stream\output.rs:134:10:
no matching supported audio output formats for the target device

I was able to solve this by changing the sample rate to my output devices current setting of 48000 Hz on line 39 of main.rs. After that the example seemed to run fine.

alisomay commented 8 months ago

Yeah maybe it is good to mention them.

Since this library depends on libpd that requires LLVM toolchain to build.

Also examples depend on cpal.

In windows cpal defaults to WASAPI backend. I don't know how that behaves exactly since when I'm on windows I generally use ASIO. On the other hand to use ASIO you need to build cpal with the asio feature.

But as you did, probably setting your environment as it needs will resolve the issue. Audio needs a bit more love in windows compared to a mac with Coreaudio backend 😅

anvlkv commented 4 months ago

I'm trying to run the simple example on macos but run into similar issues. cmake and llvm had to be installed