You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let bindings = bindgen::Builder::default().header("wrapper.h").clang_arg(include_path).blacklist_item("YDB_NOTTP")// Finish the builder and generate the bindings..generate()// Unwrap the Result and panic on failure..expect("Unable to generate bindings");
Actual Results
error: failed to run custom build command for `clang-sys v0.28.1`
Caused by:
process didn't exit successfully: `/home/joshua/Documents/Programming/yottadb/ydbrust/target/debug/build/clang-sys-0bef6ce726fcb6d1/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "couldn\'t find any valid shared libraries matching: [\'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:1165:5
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/jiasu.xzqcsaa.nyc.mn-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:77
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:61
4: core::fmt::write
at src/libcore/fmt/mod.rs:1028
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:65
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:50
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:188
9: std::panicking::default_hook
at src/libstd/panicking.rs:205
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:464
11: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:373
12: rust_begin_unwind
at src/libstd/panicking.rs:302
13: core::panicking::panic_fmt
at src/libcore/panicking.rs:139
14: core::result::unwrap_failed
at src/libcore/result.rs:1165
15: core::result::Result<T,E>::unwrap
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/result.rs:933
16: build_script_build::dynamic::link
at ./build/dynamic.rs:194
17: build_script_build::main
at ./build.rs:78
18: std::rt::lang_start::{{closure}}
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
19: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:48
20: std::panicking::try::do_call
at src/libstd/panicking.rs:287
21: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
22: std::panicking::try
at src/libstd/panicking.rs:265
23: std::panic::catch_unwind
at src/libstd/panic.rs:396
24: std::rt::lang_start_internal
at src/libstd/rt.rs:47
25: std::rt::lang_start
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
26: main
27: __libc_start_main
28: _start
Expected Results
bindgen should successfully find clang in one of the following places:
I think this is likely a regression from #1649. Do you use bindgen with default-features = false? If so, you probably want to add the dynamic feature to restore behavior.
I do use default-features = false, adding the runtime feature fixed the problem! I didn't see documentation for this on docs.rs, possibly because the latest build failed: https://docs.rs/crate/bindgen/0.52.0. It would be nice to document this somewhere for the next person :)
Bindgen Invocation
Actual Results
Expected Results
bindgen should successfully find clang in one of the following places:
This works fine with bindgen 0.51, it only breaks with 0.52.
See also KyleMayes/clang-sys#98.
The text was updated successfully, but these errors were encountered: