0

While I'm sure its something I've done wrong, I can't seem to find it. I'm using bindgen = "0.55.1" and trying to generate pjsip bindings, although the problem seems to be well before that. This is the output from the build:

error: failed to run custom build command for `test-pjsip v0.1.0 (/Users/bruce/Projects/rust/examples/test-pjsip)`

Caused by:
  process didn't exit successfully: `/Users/bruce/Projects/rust/examples/test-pjsip/target/debug/build/test-pjsip-b32f0a4a7fbb2d3e/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=pjsip
  cargo:rustc-link-lib=pjsua

  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/local/opt/llvm@11/lib/libclang.dylib could not be opened: dlopen(/usr/local/opt/llvm@11/lib/libclang.dylib, 2): Symbol not found: __ZTIN4llvm13ErrorInfoBaseE\n  Referenced from: /usr/local/opt/llvm@11/lib/libclang.dylib\n  Expected in: /Users/bruce/.rustup/toolchains/stable-x86_64-apple-darwin/lib/libLLVM.dylib\n in /usr/local/opt/llvm@11/lib/libclang.dylib"', /Users/bruce/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.55.1/src/lib.rs:1896:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I installed clang, via the bindgen recommendation of brew install llvm on macOS. I've verified that /usr/local/opt/llvm@11/lib/libclang.dylib does exist. I suspect that the symbol not existing is the issue. Should I be installing a different (older) version of clang, and if so, what version?

Bruce
  • 503
  • 3
  • 13

1 Answers1

0

well, I decided to brew uninstall llvm as a last desperate act. That seems to have cured the problem. Now, I'm just dealing with the link error, which makes a whole lot more sense.

Bruce
  • 503
  • 3
  • 13