Repository navigation
Description
tl;dr: #59652 (comment)
Cannot compile firefox anymore due to:
error: linking with ... cargo-linker
error: relocation refers to local symbol "" [12], which is defined in a discarded section
UPDATE bisect shows it's PR 59401
https://bugzilla.mozilla.org/show_bug.cgi?id=1541214
old info
This issue doesn't happen with Last **good** nightly:The issue happens with
First bad nightly:
nightly-2019-03-29-x86_64-unknown-linux-gnu (default)
rustc 1.35.0-nightly (237bf32 2019-03-28)
binary: rustc
commit-hash: 237bf32
commit-date: 2019-03-28
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0
nightly-2019-03-30-x86_64-unknown-linux-gnu (default)
rustc 1.35.0-nightly (e782d79 2019-03-29)
binary: rustc
commit-hash: e782d79
commit-date: 2019-03-29
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0
For each test I was using the same cargo:
cargo 1.35.0-dev (025b01ed 2019-04-01)
release: 1.35.0
commit-hash: 025b01edd0bba49b7e49c1cacc65bb1f6462ee57
commit-date: 2019-04-01
Errors look like this:
0:16.63 = note: /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-9b00dedc0dda6ebf.rlib(compiler_builtins-9b00dedc0dda6ebf.compiler_builtins.cqcjgied-cgu.0.rcgu.o)(.stack_sizes+0x0): error: relocation refers to local symbol "" [12], which is defined in a discarded section
0:16.84 section group signature: "(null)"
0:16.84 /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e4188d26f42911c5.rlib(std-e4188d26f42911c5.std.b8iklw2d-cgu.0.rcgu.o)(.stack_sizes+0x1b): error: relocation refers to local symbol "" [696], which is defined in a discarded section
0:16.84 section group signature: "(null)"
Activity
mati865 commentedon Apr 3, 2019
You might want to use https://github.com/rust-lang-nursery/cargo-bisect-rustc/blob/master/TUTORIAL.md
mati865 commentedon Apr 4, 2019
CC @japaric
pnkfelix commentedon Apr 4, 2019
triage: P-high. Leaving nominated for now (What is going on here with
-Z emit-stack-sizes...?)japaric commentedon Apr 9, 2019
Sorry for the breakage here. If PR #59401 is blocking anything feel free to revert it. It will probably be several days before I have some free time to dig into this (though my guess is that one of the extra, custom linker flags that firefox uses in their builds (see
MOZ_CARGO_WRAP_LDFLAGSin the linked bugzilla ticket) is not playing nicely with the new .stack_sizes section)14 remaining items
vorner commentedon Apr 11, 2019
Well, gentoo allows you to tweak the system a lot and you do a lot of compilation with that system. I discovered gold is a bit faster in most cases, so I set it as the my system default linker. It's not the general default if you get a fresh gentoo system.
pnkfelix commentedon Apr 12, 2019
Okay, thank you @vorner, that is very helpful.
Just to share knowledge, I don't see the same problem with the
dipsticktest on my Linux host; here are my versions ofccandld:I'll see if I can switch either of those around on this box in order to try to replicate the bug.
Update: Ooops, I should have reloaded the ticket before posting, there's been 16 hours of comments since @vorner posted.
pnkfelix commentedon Apr 12, 2019
Okay so my next question is what action to take at this point.
-Z emit-stack-sizeswas part of the recent nightly-to-beta promotion. So this ticket is now a regression from stable-to-beta. I'm going to change the labels accordingly.ld.gold; we are not going to try to work around it on our end."--gc-sectionswhen it will break things. That would require, I think, inspecting whether the already-builtlibtest/libstdhas a stack_sizes section when we are building up our linker invocation. That, or assuming it has such a section whenever we are on the target that happens to match the strings as is done in PR bootstrap: build crates under libtest with -Z emit-stack-sizes #59401's bootstrap changes.)Revert PR rust-lang#59401 to fix issue rust-lang#59652 (a stable-to-b…
pnkfelix commentedon Apr 12, 2019
I've posted a PR to do the revert. Rather than solely cherry-pick it to beta, I have posted it against master (that is, rather than let the issue persist on the nightly builds, I want the behavior on nightly to match that of beta here).
I do welcome a more nuanced implementation, if someone wants to make one, for nightly. But I want to deploy the simplest way to address the regression on both master and beta right now. (And that's what PR #59911 is.)
Rollup merge of rust-lang#59911 - pnkfelix:revert-pr-59401-to-fix-emi…
Rollup merge of rust-lang#59911 - pnkfelix:revert-pr-59401-to-fix-emi…
Rollup merge of rust-lang#59911 - pnkfelix:revert-pr-59401-to-fix-emi…
Auto merge of #23230 - jdm:rustup, r=SimonSapin
Revert PR rust-lang#59401 to fix issue rust-lang#59652 (a stable-to-b…