Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc should attempt to use the gold linker by default, but this breaks Debian Wheezy because of obsolete gcc #30783
Comments
brson
added
regression-from-stable-to-nightly
I-nominated
T-tools
labels
Jan 8, 2016
This comment has been minimized.
This comment has been minimized.
|
If this can't be fixed in the next week it should probably be reverted to rethink the migration strategy. |
This comment has been minimized.
This comment has been minimized.
|
Aw man this is unfortunate. Agree on reverting if we can't figure anything else out. I guess an "ideal solution" would be if gcc/clang read an environment variable as well as an argument, but I unfortunately don't see such an environment variable in clang at least. We can maybe try to parse something like I wonder, how is one supposed to tell gcc on wheezy to use gold? |
This comment has been minimized.
This comment has been minimized.
|
@xitep suggested how to detect gcc's support for this. Unfortunately it involves running gcc an extra time. I can't think of anything better. |
This comment has been minimized.
This comment has been minimized.
|
It's true that's a possibility, I would likely prefer to see that as the compiler attempts to run the entire linker and then parses the error message if one shows up, and only then is gold removed if the entire linker fails. That way we'd only run gcc once if possible, and twice in the worst case. That being said that's still a pretty big hit for distros because it's 2 times on all compiles, which is pretty unfortunate :( |
This comment has been minimized.
This comment has been minimized.
xitep
commented
Jan 12, 2016
|
I actually like the idea of environment variables from a user perspective. If I'd be able to set |
This comment has been minimized.
This comment has been minimized.
|
Oh sorry I meant moreso the compiler sets an environment variable which |
This comment has been minimized.
This comment has been minimized.
xitep
commented
Jan 12, 2016
|
"I wonder, how is one supposed to tell gcc on wheezy to use gold?": it seems just by installing binutils-gold. |
This comment has been minimized.
This comment has been minimized.
xitep
commented
Jan 12, 2016
|
An alternative to |
This comment has been minimized.
This comment has been minimized.
|
Hm detecting whether |
This comment has been minimized.
This comment has been minimized.
Assuming we add some way for the user to specify "disable gold", we could issue a warning when we run gcc twice, recommending that the user change their rustc invocation (or host configuration) accordingly |
This comment has been minimized.
This comment has been minimized.
|
(that way it's only "2 times until user changes host configuration to disable gold usage on rustc " Which is better than 2 times always |
This comment has been minimized.
This comment has been minimized.
|
@pnkfelix perhaps yeah, but at that point I'd probably be more in favor of just disabling by default. |
bors
added a commit
that referenced
this issue
Jan 14, 2016
This comment has been minimized.
This comment has been minimized.
|
I read @xitep's comment as "those who want to use gold can simply replace ld with a symlink to it". |
This comment has been minimized.
This comment has been minimized.
|
Or use the distro's mechanism for switching (such as |
This comment has been minimized.
This comment has been minimized.
|
Removing regression/nomination tags as this was fixed, leaving open as a reference to why we reverted ld.gold |
alexcrichton
added
A-tools
and removed
I-nominated
regression-from-stable-to-nightly
T-tools
labels
Jan 27, 2016
bstrie
changed the title
Nightly does not work on some Debian Wheezy because gcc doesn't support gold.
rustc cannot use gold on some Debian Wheezy because gcc doesn't support gold.
Mar 25, 2016
This comment has been minimized.
This comment has been minimized.
|
Since we're leaving this open, I've changed the title to something potentially more actionable. |
This comment has been minimized.
This comment has been minimized.
|
This is certainly part of a broader debate, but how long are we willing to support obsolete distros? Wheezy is already obsolete as of Jessie, and as of Stretch next year it will be doubly obsolete. |
This comment has been minimized.
This comment has been minimized.
xitep
commented
Mar 26, 2016
|
personally, i'm stuck with wheezy on a few systems for this year. regarding this particular issue, making a my point in a broader sense: it seems to me that supporting a platform which is merely a few years old and is going to be supported for some more makes rust an attractive alternative to other languages (in particular c++ and java.) i wouldn't be surprised if i wasn't the only one having to deal with "such old systems" in production. |
This comment has been minimized.
This comment has been minimized.
xitep
commented
May 26, 2016
•
|
hello, i just got aware of RUSTFLAGS which seems like a solution to my originally reported problem. given the desire to use ld.gold by default, i think it might be worth considering to enable that default again now and use |
bstrie
referenced this issue
Jul 14, 2016
Closed
use gold instead of bfd on Linux if it's available #14560
This comment has been minimized.
This comment has been minimized.
|
I propose that we revisit this around February 2017, since that's approximately the Stretch release date, by which point Wheezy will be even more emphatically obsolete. Which isn't to suggest that we shouldn't care about people still using Wheezy by then, but we need to prioritize the needs of the greatest proportion of our users, and gold-by-default is a significant speed win. |
bstrie
referenced this issue
Jul 14, 2016
Closed
Investigate the impact of using Gold for linking rather than the default linker on systems where it is available #29938
bstrie
changed the title
rustc cannot use gold on some Debian Wheezy because gcc doesn't support gold.
rustc should attempt to use the gold linker by default, but this breaks Debian Wheezy because of obsolete gcc
Jul 14, 2016
steveklabnik
added
T-tools
and removed
A-tools
labels
Mar 24, 2017
Mark-Simulacrum
added
T-dev-tools
and removed
T-tools
labels
May 24, 2017
This comment has been minimized.
This comment has been minimized.
sanmai-NL
commented
Jun 1, 2017
|
@bstrie: small update, the release date for Debian Stretch has been set at 17 June 2017. |
Mark-Simulacrum
added
the
C-feature-request
label
Jul 24, 2017
This comment has been minimized.
This comment has been minimized.
|
Stretch is now (and has been for a few months) stable, Jessie is oldstable, and Wheesy is in "LTS" until May 2018. Can we enable ld.gold by default yet? |
This comment has been minimized.
This comment has been minimized.
|
Or is it @rust-lang/dev-tools ? |
This comment has been minimized.
This comment has been minimized.
|
Note that Wheezy is going to have some extra support time. https://raphaelhertzog.com/2018/02/20/time-to-join-extended-long-term-support-for-debian-7-wheezy/ But... why does rust invoke ld through gcc anyways? |
This comment has been minimized.
This comment has been minimized.
|
Even if some people and companies want to keep supporting Wheezy, does that mean that recent rustc versions need to do the same? |
This comment has been minimized.
This comment has been minimized.
|
Well, Firefox builds are done on Debian Wheezy at the moment... |
brson commentedJan 8, 2016
Original report.
Rust nightly uses the gold linker where it can by passing
-fuse-ld=goldto gcc when it sees that ld.gold exists. Unfortunately, even ifld.goldexistsgccmay not understand-fuse-ld=gold.This distro came out in May 2013, so it's not that old.