laptou / bluez-rs

Control Bluetooth on Linux.
MIT License
39 stars 9 forks source link

I cannot compile bluez #25

Open wpd opened 3 years ago

wpd commented 3 years ago

I'm new to rust, but want to try it with bluez. From cargo new test-bluez I added: bluez = "0.3.0" to Cargo.toml, but when I try to compile, it fails with:

...
error: aborting due to 43 previous errors

Some errors have detailed explanations: E0034, E0308.
For more information about an error, try `rustc --explain E0034`.
error: could not compile `bitvec`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

I know that this is not a bluez problem, but I am hoping that there is something I can change with the way I import bluez into my project in order to make this compile.

wpd commented 3 years ago

Note that changing bitvec = "0.19" to bitvec = "0.21" in my local copy of bluez-rs (and pointing my Cargo.toml file my local copy) solved this problem for me.

laptou commented 3 years ago

I'm not sure what's up with this. I updated bitvec to version 0.20 in the latest update that I pushed out, but updating it to version 0.21 caused everything to stop compiling -- I think there are a lot of breaking changes between 0.20 and 0.21. How did you get this to work?

wpd commented 3 years ago

Hi laptou, I'm not too sure how I managed to get this to work when was first playing with it. It was a late night and I didn't take great notes. When I returned to it the next day, I found more information and was able to work around this issue by adding

funty = "=1.1.0"

to my project. Apparently, there are some breaking changes between bitvec, funty, and the rustc compiler that just need to be ironed out. Pinning funty to version 1.1.0 worked around these issues for me.

rye commented 3 years ago

This doesn't seem to be an issue anymore, at least for me on beta Rust and on Linux.

It looks like bitvec was later updated to 0.22.3, so this may have been resolved. According to the bitvec release notes for 0.21.1, a funty release performed some symbol migration, and was released as a minor version upgrade (despite it being breaking, which would usually mean it should be a major version upgrade).

Can this issue be closed?