Version problems using bindgen

#1

I am using soapysdr – but the problem is not specific to this crate per se. crates.io has 0.1.0 which depends on soapysdr-sys 0.6.0 on crates.io which seems to have been built with bindgen 0.31.3.

I am locally trying to build v4l2-sys (a binding to the Video4Linux API, if anyone is interested I’ll publish it to crates.io) but it wants to use bindgen 0.44.0. This results in:

|> cargo build
error: multiple packages link to native library `clang`, but a native library can be linked only once                                                                                                                                             

package `clang-sys v0.21.2`
    ... which is depended on by `bindgen v0.31.3`
    ... which is depended on by `soapysdr-sys v0.6.0`
    ... which is depended on by `soapysdr v0.1.0`
    ... which is depended on by `gst-plugin-sdr v0.0.0 (/home/users/russel/Repositories/Git/Masters/Private/GST_Plugin_SDR)`
links to native library `clang`

package `clang-sys v0.26.3`
    ... which is depended on by `bindgen v0.44.0`
    ... which is depended on by `v4l2-sys v0.0.0 (/home/users/russel/Repositories/Git/Masters/Private/V4L2_Sys)`
    ... which is depended on by `gst-plugin-sdr v0.0.0 (/home/users/russel/Repositories/Git/Masters/Private/GST_Plugin_SDR)`
also links to native library `clang`

which is rather annoying. I am hoping this turns out to be a not-uncommon problem, and that there is a de facto standard way of dealing with it.

1 Like
#2

cf. https://github.com/rust-lang/cargo/issues/5237