-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error related to bindgen when building on alpine #477
Comments
Have you install clang? |
Yes,I have installed clang and its libs which at |
I think you are probably correct. Do you have any idea how to fix it? |
In https://github.com/KyleMayes/clang-sys#dependencies:
It may be helpful. |
In grpc-rs/grpc-sys/Cargo.toml:
My guess is that this prevents the static feature?Both about |
I'm afraid the feature can't be enabled until it works both static and dynamic way. The library is for general purpose, it should not require all users to compile a static library. |
I understand what you said, but maybe adding a feature to support static compilation is a good idea. |
I have made a docker image to build static bin under debian 9,if anyone needs it,I'll share it. |
Have you verified whether static features work? I'm OK with the feature but we may not release it until 0.7.0 as upgrading bindgen can break things. See rust-lang/cargo#5237 |
Yes,I tried to manually turn on the static feature of bindgen, and it worked normally, no longer forced to search for libclang.so. |
@ZhangLei-cn Plz share :3 |
Well this was bit of a nightmare bug to figure out, but eventually my persistence prevailed. So I'm using The main problem I faced was that inside the buster image running
This of course makes the build even longer than it is with Rust but what can you do. Now it at least builds, hurray. And only 25 minutes in Github CI... Christ 😅 But maybe this helps somebody out. |
Describe the bug
thread 'main' panicked at 'Unable to find libclang: "the
libclang
shared library at /usr/lib/libclang.so.10 could not be opened: Dynamic loading not supported"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.51.1/src/lib.rs:1731:13To Reproduce
Steps to reproduce the behavior:
cargo build --target x86_64-unknown-linux-musl
Expected behavior
Build successed.
System information
Additional context
All content:
The text was updated successfully, but these errors were encountered: