eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
546 stars 42 forks source link

Unable to find libclang #51

Closed thiru closed 5 years ago

thiru commented 5 years ago

Build fails with the following error message. I'm running Arch Linux with cargo 1.37.0.

❯ env RUST_BACKTRACE=1 cargo build --release
   Compiling emacs_module v0.10.0
error: failed to run custom build command for `emacs_module v0.10.0`
Caused by:
  process didn't exit successfully: `~/.config/nvim/plugged/parinfer-rust/target/release/build/emacs_module-5d86332a03566be2/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:999:5
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::default_hook
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::continue_panic_fmt
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: std::sync::once::Once::call_once::{{closure}}
   8: std::sync::once::Once::call_inner
   9: bindgen::Builder::generate
  10: build_script_build::main
  11: std::rt::lang_start::{{closure}}
  12: std::panicking::try::do_call
  13: __rust_maybe_catch_panic
  14: std::rt::lang_start_internal
  15: main
  16: __libc_start_main
  17: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
eraserhd commented 5 years ago

Ahh, right. A new dependency requires libclang.

Let me know which works.

thiru commented 5 years ago

Oh right, I assumed libclang was a rust library. sudo pacman -S clang did the trick.

Thanks, and awesome work on this project!

eraserhd commented 5 years ago

@thiru Thanks for reporting this. It is unclear, so I added a note in the README.