ivmarkov / rust-esp32-std-demo

Rust on ESP32 STD demo app. A demo STD binary crate for the ESP32[XX] and ESP-IDF, which connects to WiFi, Ethernet, drives a small HTTP server and draws on a LED screen.
Apache License 2.0
784 stars 105 forks source link

Build fails for `xtensa-esp32-espidf` because of error in esp-idf-svc #108

Closed michidk closed 2 years ago

michidk commented 2 years ago

I followed the instructions and executed cargo build --target xtensa-esp32-espidf. (Same with cargo +esp build --target xtensa-esp32-espidf and cargo +esp build --target xtensa-esp32-espidf --release)

Error:

error[E0308]: mismatched types
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/esp-idf-svc-0.42.0/src/ping.rs:36:18
   |
36 |             tos: conf.tos,
   |                  ^^^^^^^^ expected `i32`, found `u8`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `esp-idf-svc` due to previous error
warning: build failed, waiting for other jobs to finish...

I use a rust:1-bullseye Docker container with the following setup:

apt-get install -y git curl gcc clang ninja-build cmake libudev-dev unzip xz-utils python3 python3-pip python3-venv libusb-1.0-0 libssl-dev pkg-config libtinfo5 libpython2.7

curl -LO https://github.com/esp-rs/rust-build/releases/download/v1.62.0.0/install-rust-toolchain.sh
chmod a+x install-rust-toolchain.sh

git clone https://github.com/esp-rs/rust-build.git
cd rust-build
./install-rust-toolchain.sh

rustup default esp
cargo install ldproxy
brianmay commented 2 years ago

I believe this should be fixed with esp-idf-svc 0.42.1; this needs to be updated to Cargo.toml

michidk commented 2 years ago

Yep, can confirm that.