虽然我确定我做错了什么,但我似乎找不到它。我正在使用bindgen = "0.55.1"并尝试生成pjsip绑定,尽管这个问题似乎早在此之前就出现了。以下是构建的输出:
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我通过bindgen推荐的brew install llvm在macOS上安装了clang。我已经验证了/usr/local/opt/llvm@11/lib/libclang.dylib确实存在。我怀疑符号不存在就是问题所在。我应该安装一个不同的(旧的) clang版本吗?如果是,是什么版本?
发布于 2020-11-01 04:08:24
好吧,我决定brew uninstall llvm作为最后一次绝望的行为。这似乎已经解决了这个问题。现在,我只处理链接错误,这就更有意义了。
https://stackoverflow.com/questions/64625840
复制相似问题