rpi-ws281x / rpi-ws281x-rust

Rust bindings to the ws821x library enabled by bindgen.
MIT License
38 stars 25 forks source link

`libclang` shared library is not loaded on this thread #24

Open jimpo opened 1 year ago

jimpo commented 1 year ago

I get the following build error in my project using this library:

error: failed to run custom build command for `rs_ws281x v0.4.4`                                                                                                                                                   

Caused by:                                                                                                                                                                                                         
  process didn't exit successfully: `/home/jimpo/Code/git.buildroot.net/buildroot/output/build/ledbetter-1.0/target/release/build/rs_ws281x-dd55b51c0f12ed77/build-script-build` (exit status: 101)                
  --- stdout                                                                                                                                                                                                         ...                                                                                                                                                                            

  --- stderr                                                                                                                                                                                                         thread 'main' panicked at 'a `libclang` shared library is not loaded on this thread', /home/jimpo/Code/git.buildroot.net/buildroot/output/host/share/cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.4
.0/src/lib.rs:1731:1

I believe the issue is that the runtime default feature of bindgen is disabled in the Cargo.toml. Either the runtime or static feature should be enabled.

JMurph2015 commented 9 months ago

Everything (well except the example, oops) builds fine for me on 0.4.4. However, I have done some housecleaning, and now things definitely build for me on Ubuntu/Debian.