Closed ramosbugs closed 8 months ago
This has came up before in https://github.com/rust-cross/cargo-zigbuild/pull/6, the underlying problem should have been fixed in https://github.com/ziglang/zig/pull/11207, I don't know if it's a regression from zig.
The output of the file
command on the binary shows with debug_info, not stripped
. Are you sure it's the same issue?
The output of the
file
command on the binary showswith debug_info, not stripped
.
That's because in #6 we added -g
flag.
I'm not saying it's the same issue, just that the missing debuginfo issue was fixed in #6 and zig, so if backtrace is empty, it might be a zig issue/regression assuming you are not using a super old zig version.
Thanks, I filed this issue as ziglang/zig#18280.
I originally filed this issue as cargo-lambda/cargo-lambda#577, but the issue is probably more closely tied to Zig.
I'm building a Lambda function by invoking:
I'm running on ARM64 MacOS:
As expected, this produces a binary that appears to contain debug symbols:
However, all of the backtraces I generate via the
backtrace
crate look like:Panics with
RUST_BACKTRACE=1
are similarly empty:Interestingly, everything works fine when I directly build the Lambda via the Homebrew
musl-cross
toolchain:Even in release mode, the Lambda built with
musl-cross
prints backtrace symbols.Is there a known issue in
cargo-zigbuild
with debug symbols when cross-compiling from aarch64 Darwin to aarch64 Linux?