ruabmbua / hidapi-rs

Rust bindings for the hidapi C library
MIT License
172 stars 81 forks source link

hidraw build error #55

Closed fpagliughi closed 4 years ago

fpagliughi commented 4 years ago

I'm trying to build on Linux (Mint 19) using the hidraw backend, but I'm getting a build error.

[dependencies.hidapi]
version = "1.2"
default-features = false
features = ["linux-static-hidraw"]
error: failed to run custom build command for `hidapi v1.2.1`

Caused by:
  process didn't exit successfully: `/home/fmp/hidd/target/debug/build/hidapi-432a5c23f3442b71/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Exactly one linux hidapi backend must be selected.', /home/fmp/.cargo/registry/src/github.com-1ecc6299db9ec823/hidapi-1.2.1/build.rs:94:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...

Am I doing something wrong?

ruabmbua commented 4 years ago

Hm. It is working in my case.

ruabmbua commented 4 years ago

Are you maybe including hidapi as a transitive dependency somewhere else? One of your dependencies might request another hidapi backend.

fpagliughi commented 4 years ago

Yes! That was it. Thank you.