Closed
Description
When I add split-debuginfo = "unpacked"
to my profile.release
in Cargo.toml (on Linux), my build fails with:
error: failed to build archive: No such file or directory
error: could not compile `cfg-if` due to previous error
warning: build failed, waiting for other jobs to finish...
In debug I initially had the same problem but a cargo clean
fixed it without requiring me to turn off split-debuginfo
. However, release continues to be failing even after cargo clean
.
Meta
rustc --version
rustc 1.65.0 (897e375 2022-11-02)
cargo --version
cargo 1.65.0 (4bc8f24d3 2022-10-20)
Activity
davidli2010 commentedon Nov 3, 2022
It's silent in my macOS in release profile, but no dSYM generated. It's OK in dev profile.
vlovich commentedon Nov 3, 2022
Oh not sure if it matters, but I also have debug = true set for my release build.
davidli2010 commentedon Nov 3, 2022
Thanks for your reminder. I forgot that
debug
is off by default in release profile.ItsEthra commentedon Nov 3, 2022
Can confirm this happens for me as well but with
split-debuginfo=packed
.rustc 1.65.0 (897e37553 2022-11-02)
cargo 1.65.0 (4bc8f24d3 2022-10-20
ehuss commentedon Nov 4, 2022
Can you provide some more information, such as the target you are building for (
x86_64-unknown-linux-gnu
?), the output ofrustc --version --verbose
, and anything else that might help narrow down the issue? Is your profile exactly this?filialpails commentedon Nov 4, 2022
I got this same error when I tried compiling with both split debug info and linker plugin LTO.
tchollingsworth commentedon Nov 4, 2022
also need LTO enabled, works fine without here
vlovich commentedon Nov 4, 2022
Thanks @tchollingsworth for clarifying. Yeah, I do have LTO on as well.
[-]`split-debuginfo = "unpacked"` fails in release build[/-][+]linux split-dwarf fails with `-Clinker-plugin-lto`[/+]ehuss commentedon Nov 5, 2022
cc @davidtwco or @michaelwoerister in case this didn't hit your radar.
The reproduction is:
with the error:
From what I can tell, the archiver is expecting a
.dwo
file to exist (added around here). AFAIK, that doesn't make sense with a bitcode-only output. The decision of whether or not a dwo is expected I think is made around here. I'm guessing that decision (or perhaps something at a higher level) needs to be aware that the split-dwarf won't happen with bitcode-only output? (IOW, that case should only be true ifwrite_output_file
was called with adwo_out
value withSome
?)marmeladema commentedon Nov 5, 2022
Should this issue be marked as a stable-to-stable regression?
split-debuginfo = "packed"
, andlto = "fat"
#10404220 remaining items