-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to find libclang: "the libclang shared library #2360
Comments
well this says that dynamic loading is not supported, what happens if you use the EDIT: the |
A similar (but not exactly the same) issue happens here Rust-for-Linux/linux#934 and I suspect it is because the clang-sys version we use does not support clang 15. We will update the clang-sys version and do a new release as soon as possible. |
Hello, I have the same issue but I'm using the latest version of bindgen (tried a couple of older versions too) and clang 12 with alpine 3.15.8
|
@Karrq have you tried this?
|
I found the root cause: rust-lang/cargo#4423 I'm in a cross-compilation environment, thus |
Helloo 👋🏼 Exact error message: |
How did you all work your way around this ? |
I had the same issue on Alpine Linux 3.20 and found one workaround. Here are the steps:
[build-dependencies]
bindgen = { version = "0.70", default-features=false, features = ["logging", "prettyplease", "static"] }
#!/bin/bash
if [ "$1" = "--libs" ]; then
/usr/bin/llvm-config "$@" "--link-static"
else
/usr/bin/llvm-config "$@"
fi You may need to adjust the And make it executable:
export LLVM_CONFIG_PATH=/path/to/the/script The last 2 steps is to workaround a bug in |
Still have the bug |
apk info clang-dev
clang15-dev-15.0.5-r0 description:
A C language family front-end for LLVM (development files)
clang15-dev-15.0.5-r0 webpage:
https://llvm.org/
clang15-dev-15.0.5-r0 installed size:
21 MiB
cat /etc/alpine-release
3.15.1
--- stderr
thread 'main' panicked at 'Unable to find libclang: "the libclang shared library at /usr/lib/libclang.so.15.0.5 could not be opened: Dynamic loading not supported"', /root/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/bindgen-0.60.1/src/lib.rs:2172:31
The text was updated successfully, but these errors were encountered: