gpt4 book ai didi

rust - Bindgen 似乎无法在 OSX 上找到 clang

转载 作者:行者123 更新时间:2023-12-03 11:47:32 25 4
gpt4 key购买 nike

虽然我确定我做错了什么,但我似乎找不到它。我正在使用 bindgen = "0.55.1"并试图生成 pjsip绑定(bind),尽管问题似乎早在那之前。这是构建的输出:

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 安装了 clang brew install llvm的推荐|在 macOS .我已经验证/usr/local/opt/llvm@11/lib/libclang.dylib 确实存在。我怀疑符号不存在是问题所在。我应该安装不同(旧)版本的 clang,如果是,是什么版本?

最佳答案

好吧,我决定brew uninstall llvm作为最后的绝望行动。这似乎已经解决了这个问题。现在,我只是在处理链接错误,这更有意义。

关于rust - Bindgen 似乎无法在 OSX 上找到 clang,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64625840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com