cargo-call-stack icon indicating copy to clipboard operation
cargo-call-stack copied to clipboard

error[E0463]: can't find crate for panic_abort" on ESP32-C3

Open JuliDi opened this issue 2 years ago • 1 comments

Hi,

When trying to run call stack for my ESP32-C3 I get the error "error[E0463]: can't find crate for panic_abort"

The command I run is cargo +nightly call-stack --bin my_bin --target riscv32imc-esp-espidf > cg.dot

In my cargo config I already have the corresponding options for build-std set:

[unstable]
build-std = ["panic_abort", "std"]
build-std-features = ["panic_immediate_abort"]

An also tried the -Z build-std=panic_abort,std parameters suggested in other issues. I see that panic_abort is built: Compiling panic_abort v0.0.0 (/Users/user/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/panic_abort) but when it is almost done compiling, it will throw the above error.

Is there any fix for this?

JuliDi avatar Feb 01 '23 10:02 JuliDi

cargo b -Z build-std --target x86_64-unknown-linux-gnu works on a fresh cargo new --bin hello project whereas cargo b -Z build-std --target riscv32imc-esp-espidf does not, so I consider this a upstream bug in the standard library and/or Cargo's build-std feature

japaric avatar Feb 27 '23 19:02 japaric