TanTanDev / wooting_snake

Snake on wooting keyboards, written with Rust
Apache License 2.0
23 stars 5 forks source link

Clang error with "cargo run" #3

Open PastaJ36 opened 4 years ago

PastaJ36 commented 4 years ago

When I try to run the Rust code I get the following error:

192:wooting_snake jeroen$ cargo run
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.32.3`
    ... which is depended on by `coreaudio-sys v0.2.2`
    ... which is depended on by `coreaudio-rs v0.9.1`
    ... which is depended on by `cpal v0.11.0`
    ... which is depended on by `rodio v0.11.0`
    ... which is depended on by `wooting_snake v0.1.1 (/Users/jeroen/code/klooien/test/wooting_snake)`
links to native library `clang`

package `clang-sys v0.26.4`
    ... which is depended on by `bindgen v0.47.3`
    ... which is depended on by `wooting-analog-sdk-sys v0.1.0 (https://github.com/TanTanDev/rust-wooting-sdk.git#ccc555d0)`
    ... which is depended on by `wooting-sdk v0.1.1 (https://github.com/TanTanDev/rust-wooting-sdk.git#ccc555d0)`
    ... which is depended on by `wooting_snake v0.1.1 (/Users/jeroen/code/klooien/test/wooting_snake)`
also links to native library `clang`

I tried updating to the latest Rust version, but that doesn't seem to help.

I think it's related to this issue: https://github.com/rust-lang/cargo/issues/5237. From what I can see the solutions is to manually make sure the bindgen version are the same? That seems a little weird. Did you run into this issue? @TanTanDev

Thanks!

TanTanDev commented 4 years ago

That's odd, what libclang version do you have? I'm using 10.0.0. you can check on windows cmd with

clang --version