rust - Bindgen 似乎无法在 OSX 上找到 clang
问题描述
虽然我确定我做错了什么,但我似乎找不到它。我正在使用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
我通过on的bindgen
推荐安装了 clang 。我已经验证 /usr/local/opt/llvm@11/lib/libclang.dylib 确实存在。我怀疑符号不存在是问题所在。我应该安装不同(旧)版本的 clang,如果是,是什么版本?brew install llvm
macOS
解决方案
好吧,我决定brew uninstall llvm
作为最后的绝望行动。这似乎已经解决了这个问题。现在,我只是在处理链接错误,这更有意义。
推荐阅读
- r - 检查某些特定月份是否位于 data.table 的两个日期列之间
- python - 根据python中的条件值在行中插入数据
- php - React:重定向到子域时保留 cookie
- azure - 如何向 IOTCentral 报告遥测数据?
- php - 如何使用 HTML 表单将动态选项发布到 php 脚本?
- javascript - 有没有可能使用 .reduce()、.map()、.filter() 方法对该数组进行排序?
- python - 逻辑错误?Python 错误捕获和变量
- javascript - React Drag and Drop - react-dnd - 使组件同时可拖放(应用两个角色 - 拖放)
- android - Cordova webview 上不显示 Adsense 广告
- java - 如何在张海的 MaterialRatingBar 库中更改星星的颜色我找不到方法?