Open DaGaMs opened 3 months ago
I also got a cargo build --release
problem when I used rust-htslib v0.47.0
, reverting to v0.46.0
solved the problem.
--- stderr
./htslib/htslib/hts.h:31:10: fatal error: 'stddef.h' file not found
thread 'main' panicked at hts-sys-2.1.4/build.rs:275:14:
Unable to generate bindings.: ClangDiagnostic("./htslib/htslib/hts.h:31:10: fatal error: 'stddef.h' file not found\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I think i also ran into this a while ago. @FelixMoelder i think this might be caused by this recent change:
https://github.com/rust-bio/rust-htslib/blob/5eb729bf35ea653688ac25f6cea82bc6e06c9442/Cargo.toml#L24
So, this is probably related to this feature request in bindgen
:
https://github.com/rust-lang/rust-bindgen/issues/918
What I don't understand is: why does 0.46.0 work but 0.47.0 doesn't? If dependency on libclang.a is a general issue of bindgen, then why does 0.46.0 build fine for me? And vice versa, why does adding one header to hts-sys suddenly break things? 🤔
I tried to upgrade my code's dependency on rust-htslib to version 0.47.0 (from 0.46.0) but now when I do
cargo build -r
on Linux (eg in a docker container) withoutclang
, I get:Reverting back to 0.46.0 fixes the issue. I'm not sure what happened here, but I suspect it was not intentional?