-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux split-dwarf fails with -Clinker-plugin-lto
#103932
Comments
It's silent in my macOS in release profile, but no dSYM generated. It's OK in dev profile. |
Oh not sure if it matters, but I also have debug = true set for my release build. |
Thanks for your reminder. I forgot that |
Can confirm this happens for me as well but with
|
Can you provide some more information, such as the target you are building for ( [profile.release]
split-debuginfo = "unpacked"
debug = true |
I got this same error when I tried compiling with both split debug info and linker plugin LTO. |
also need LTO enabled, works fine without here
|
Thanks @tchollingsworth for clarifying. Yeah, I do have LTO on as well. |
split-debuginfo = "unpacked"
fails in release build-Clinker-plugin-lto
cc @davidtwco or @michaelwoerister in case this didn't hit your radar. The reproduction is: touch foo.rs
rustc --crate-type=rlib -Csplit-debuginfo=packed -Clinker-plugin-lto foo.rs with the error:
From what I can tell, the archiver is expecting a |
Should this issue be marked as a stable-to-stable regression? |
Submitted #104105 to fix this. |
Thanks for the ping and the great pre-investigation, @ehuss! |
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? `@michaelwoerister`
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ``@michaelwoerister``
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ``@michaelwoerister``
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ```@michaelwoerister```
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ````@michaelwoerister````
…elwoerister llvm: dwo only emitted when object code emitted Fixes rust-lang#103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? `````@michaelwoerister`````
I am encountering this on
Adding the following to [target.x86_64-unknown-linux-gnu]
rustflags = ["-Csplit-debuginfo=packed"] Should I open a new issue, or do you want to track this together with the LTO case? |
@Shnatsel Can you put together a reproduction? Also, it might help to post the output of |
Here are the outputs of Successful run
Failed run
I imagine simply running Ubuntu 20.04 and adding this to [target.x86_64-unknown-linux-gnu]
rustflags = ["-Csplit-debuginfo=packed"] But I'll verify it and let you know. |
Yes, I've verified that this is reproducible on a clean Ubuntu 20.04 installation or live CD. Other than the commands above you need to |
Oh, I see that the failed run does contain the I'm confused why |
rustfilt sets LTO here. I don't know what other commands you are running, but if it is |
Up on @marmeladema's message:
|
When I add
split-debuginfo = "unpacked"
to myprofile.release
in Cargo.toml (on Linux), my build fails with:In debug I initially had the same problem but a
cargo clean
fixed it without requiring me to turn offsplit-debuginfo
. However, release continues to be failing even aftercargo clean
.Meta
rustc --version
rustc 1.65.0 (897e375 2022-11-02)
cargo --version
cargo 1.65.0 (4bc8f24d3 2022-10-20)
The text was updated successfully, but these errors were encountered: