-
I'm a Rust newbie. I was writing a project for ESP32-C3 when I added esp-wifi and got the following error from cargo build. ❯ cargo clean
Removed 3507 files, 959.9MiB total
❯ cargo build
Updating crates.io index
error: failed to select a version for `esp-hal-common`.
... required by package `esp32-hal v0.17.0`
... which satisfies dependency `esp32-hal = "^0.17.0"` of package `esp-wifi v0.2.0`
... which satisfies dependency `esp-wifi = "^0.2.0"` of package `network-monitor-esp-rs-no-std v0.1.0 (/Users/ivan/Projects/Ivan/network-monitor-esp-rs-no-std)`
versions that meet the requirements `^0.14.0` are: 0.14.1, 0.14.0
the package `esp-hal-common` links to the native library `esp-hal-common`, but it conflicts with a previous package which links to `esp-hal-common` as well:
package `esp-hal-common v0.15.0`
... which satisfies dependency `esp-hal-common = "^0.15.0"` of package `esp32c3-hal v0.15.0`
... which satisfies dependency `hal = "^0.15.0"` of package `network-monitor-esp-rs-no-std v0.1.0 (/Users/ivan/Projects/Ivan/network-monitor-esp-rs-no-std)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "esp-hal-common"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `esp-hal-common` which could resolve this conflict My dependencies are as follows: [dependencies]
hal = { package = "esp32c3-hal", version = "0.15.0", features = [
"embassy",
"async",
"embassy-time-timg0",
"embassy-executor-thread",
] }
esp-backtrace = { version = "0.10.0", features = [
"esp32c3",
"panic-handler",
"exception-handler",
"print-uart",
] }
esp-println = { version = "0.8.0", features = ["esp32c3"] }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-time = { version = "0.3.0", features = [] }
static_cell = { version = "2.0.0", features = ["nightly"] }
esp-wifi = { version = "0.2.0", features = ["esp32c3", "wifi"] }
Repo: https://github.com/IvanLi-CN/network-monitor-esp-rs-no-std/tree/before-add-esp-wifi The above repository has not been added before Also I have a question, why does the error message
In my simple mind, esp32-hal should be irrelevant, after all, I've specified the esp32c3 feature. Ask for help, thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It seems that I was misled by the prompt of esp32-hal. It is indeed a version mismatch. After I downgraded esp32c3-hal and related dependencies, at least this part was correct. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the inconvenience. Usually, we release a new version of esp-wifi shortly after a release of esp-hal but in this case we had to wait for another dependency to get their release. There will be a release shortly after running all the tests |
Beta Was this translation helpful? Give feedback.
Sorry for the inconvenience. Usually, we release a new version of esp-wifi shortly after a release of esp-hal but in this case we had to wait for another dependency to get their release. There will be a release shortly after running all the tests