You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bindgen-cli fails to install in certain CI Docker environments #4396
One very weird (although not directly related to the optimization this PR is doing) thing is that bindgen-cli is failing to build (on master) in both aarch64-unknown-linux-musl and powerpc64le-unknown-linux-musl workflows and nothing else.
Furthermore, the error message always says:
error: failed to compile `bindgen-cli v0.72.0`, intermediate artifacts can be found at `/checkout/target`.To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.Caused by: cannot produce proc-macro for `clap_derive v4.1.0` as the target `x86_64-unknown-linux-gnu` does not support these crate types
We do know that clap_derive supports x86_64-unknown-linux-gnu. What could possibly go wrong?
PS: cargo -vV gives host: x86_64-unknown-linux-gnu and os: Ubuntu 22.4.0 [64-bit] for both workflows.
@Kobzol My current suspicion is that there could be some weird env vars set in those workflow Docker images that tricked cargo into doing the wrong thing (for example, installing codegen-cli for the wrong target), and I believe that has never happened before #4368's updating the Docker image for the builds. Do you happen to remember anything similar?
Activity
rami3l commentedon Jun 28, 2025
@Kobzol My current suspicion is that there could be some weird env vars set in those workflow Docker images that tricked
cargointo doing the wrong thing (for example, installingcodegen-clifor the wrong target), and I believe that has never happened before #4368's updating the Docker image for the builds. Do you happen to remember anything similar?Kobzol commentedon Jun 29, 2025
No, I haven't ever encountered this. Have you tried passing
--target x86_64-unknown-linux-gnuwhen installing bindgen-cli? rust-lang/rust#78210rami3l commentedon Jun 29, 2025
@Kobzol Aha! That solution doesn't seem obvious but it did do the trick, although I still don't quite understand why that is the case :'D Many thanks!