esp-idf-sys: Fails to build crate on Macos

I have created a project from the template and have not modified a single thing. I attached the log of cargo build below.

log.txt

As for my setup, I’m using a macbook with m2 chip and I went through the rust on esp book multiple times to double and triple check if I have everything installed.

below is a list of what I installed and how

  • rust: through rustup downloaded from the official site
  • nightly toolchain: with this command rustup toolchain install nightly --component rust-src
  • riscv targets: with this command
rustup target add riscv32imc-unknown-none-elf # For ESP32-C2 and ESP32-C3
rustup target add riscv32imac-unknown-none-elf # For ESP32-C6 and ESP32-H2
  • llvm compiler infrastructure: with this command brew install llvm
  • python: with brew install python
  • git: preinstalled with dev tools
  • ldproxy: with cargo install ldproxy
  • espup: with cargo install espup
  • espflash: with cargo install espflash
  • esp compatible rust etc.: with espup install

Note that I could not build the std template while the no_std template worked perfectly fine!

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 17

Most upvoted comments

Thanks for bringing me onto the right track so I could find out what was causing it! Before I just had a million and one ideas what could be wrong like that I didn’t install a proper version of python or llvm or it just didn’t compile on apples arm for reason but you pointing out it’s likely something with clang path got me thinking that just set may not be global. Thanks for the help!