esp-rs / rust-build

Installation tools and workflows for deploying/building Rust fork esp-rs/rust with Xtensa and RISC-V support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linker not found when building for esp8266

konradmoesch opened this issue · comments

I am trying to build for esp8266 (lx106).
When executing $ cargo +esp build --release -Zbuild-std=core --target xtensa-esp8266-none-elf, i get the following error:

   Compiling esp8266-hal v0.5.1
   Compiling esp-adf-test v0.1.0 (/home/km/esp-adf-test)
error: linker `xtensa-lx106-elf-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `esp-adf-test` due to previous error

How do I install the linker and fix this error?
I am using --release because when building normally (dev profile), i run into the issue described here: MabezDev/xtensa-rust-quickstart#43 (even with lto=false and opt-level=0)

You need to add the linker to your path once you've downloaded it from here: https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/linux-setup.html#toolchain-setup