japaric / cargo-call-stack

Whole program static stack analysis
Apache License 2.0
563 stars 51 forks source link

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

Open JuliDi opened 1 year ago

JuliDi commented 1 year ago

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?

japaric commented 1 year ago

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