Skip to content
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

Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux #65302

Merged
merged 6 commits into from
Oct 20, 2019

Conversation

msizanoen1
Copy link
Contributor

#62896 was caused by the usage of the GCC 5.2.0 toolchain, which was released back in 2015 and may have bugs affecting LLVM 9.
This PR upgrade GCC to 8.3.0 from 5.2.0, glibc from 1.16.0 to 1.17.0 and crosstool-ng to 1.24.0 only for dist-armv7-linux.
Fixes #62896

r? @alexcrichton

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2019
CT_BINUTILS_PKG_NAME="binutils"
CT_BINUTILS_SRC_RELEASE=y
CT_BINUTILS_PATCH_ORDER="global"
CT_BINUTILS_V_2_32=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binutils change default settings from time to time.
Upgrading them for other targets often resulted in errors on older distributions because they cannot understand newer features (like compressed debuginfo).

@alexcrichton
Copy link
Member

@bors: r+

Thanks so much for tracking this down @msizanoen1! We can continue to iterate on toolchain issues if they crop up, but getting working toolchains is likely the most important part of this :)

@bors
Copy link
Contributor

bors commented Oct 11, 2019

📌 Commit e2ce082 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2019
@stefson
Copy link

stefson commented Oct 11, 2019

in case this works, is the release team willing to push out a possible 1.38.1, or do we have to wait for 1.39.0 or even 1.40.0?

@Mark-Simulacrum
Copy link
Member

I think I would personally not feel comfortable backporting this to beta, and definitely not to stable -- it seems like the chance of breakage in edge case ways is too high to not let this bake. But I've not been following along too closely -- is this platform entirely broken today? i.e., presumably if beta as is is just entirely not working and this helps make it work for some cases, then it may make sense to backport as we are definitely improving things.

@stefson
Copy link

stefson commented Oct 11, 2019

The problem is that everyone either sticks to the upstream stage0 rust via rustup or using install.sh from the stage0, or to their distros rust which is bootstrapped all the way from a stage0 too.

I think @cuviper , you're the fedora maintainer of the rust package, do you know wether fedora's armv7 port is affected by #62896 ?

@cuviper
Copy link
Member

cuviper commented Oct 11, 2019

I'm not aware of any problems on Fedora, but we also build most of our packages with codegen-units=1 already, trading compile time for hopefully better optimization. I should try reproducing the issue directly, but if newer glibc/gcc solve it, we're probably clear already.

We've been steady using our own stage0 for a while now, not needing upstream binaries, so the official builds haven't affected us.

@mati865
Copy link
Contributor

mati865 commented Oct 11, 2019

@stefson stage0 isn't anything magical, it's just Rust's beta release (for official binaries). Building Rust itself works because it's cross compiled from x86_64 Linux distribution.
It seems this issue affects only ARMv7 rustc which means Rust doesn't work natively on ARMv7 but programs cross compiled from X to ARMv7 work fine.

IMO in worst case backporting this to beta will make cross compilation of crates to ARMv7 not possible from host with very old cross- Binutils/GCC. At same time it can fix running Rust natively on ARMv7 Linux distributions (at least those with recent enough toolchain).

@Mark-Simulacrum
Copy link
Member

IMO in worst case backporting this to beta will make cross compilation of crates to ARMv7 not possible from host with very old cross- Binutils/GCC. At same time it can fix running Rust natively on ARMv7 Linux distributions (at least those with recent enough toolchain).

I somewhat disagree here -- this is a sort of "fundamental" change and I could see this exposing issues that are new to us. It also seems like if we've not shipped a working stable for a while, in some sense the urgency in my eyes is also reduced. But I can definitely also see the perspective that we should backport this.

Beta backports in this case I think would fall on the infra team, and maybe (though probably not) the compiler team. So nominating as such for their approval.

@Mark-Simulacrum Mark-Simulacrum added beta-nominated Nominated for backporting to the compiler in the beta channel. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Oct 11, 2019
@msizanoen1
Copy link
Contributor Author

@alexcrichton I forgot that crosstool-ng 1.24.0 requires unzip. I am closing and reopening this.

@msizanoen1 msizanoen1 closed this Oct 12, 2019
@msizanoen1 msizanoen1 reopened this Oct 12, 2019
@msizanoen1
Copy link
Contributor Author

@alexcrichton I pushed some change to this PR. You may need to r+ again.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 15, 2019

📌 Commit e58ad8d has been approved by alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 20, 2019

⌛ Testing commit 870ea52 with merge e66a628...

bors added a commit that referenced this pull request Oct 20, 2019
Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux

#62896 was caused by the usage of the GCC 5.2.0 toolchain, which was released back in 2015 and may have bugs affecting LLVM 9.
This PR upgrade GCC to 8.3.0 from 5.2.0, glibc from 1.16.0 to 1.17.0 and crosstool-ng to 1.24.0 only for dist-armv7-linux.
Fixes #62896

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Oct 20, 2019

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing e66a628 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 20, 2019
@bors bors merged commit 870ea52 into rust-lang:master Oct 20, 2019
@msizanoen1 msizanoen1 deleted the fix-armv7-segfault branch October 20, 2019 06:16
@msizanoen1 msizanoen1 restored the fix-armv7-segfault branch October 20, 2019 06:16
@Fenex Fenex mentioned this pull request Oct 22, 2019
@pietroalbini
Copy link
Member

We discussed this at today's infrastructure meeting and decided to approve the backport!

@rustbot modify labels: beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 22, 2019
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 22, 2019
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request Oct 22, 2019
…crichton

Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux

rust-lang#62896 was caused by the usage of the GCC 5.2.0 toolchain, which was released back in 2015 and may have bugs affecting LLVM 9.
This PR upgrade GCC to 8.3.0 from 5.2.0, glibc from 1.16.0 to 1.17.0 and crosstool-ng to 1.24.0 only for dist-armv7-linux.
Fixes rust-lang#62896

r? @alexcrichton
bors added a commit that referenced this pull request Oct 24, 2019
[beta] backport rollup

This includes a bunch of PRs:
 *  Fix redundant semicolon lint interaction with proc macro attributes #64387
 *  Upgrade async/await to "used" keywords. #64875
 *  syntax: fix dropping of attribute on first param of non-method assocated fn #64894
 *  async/await: improve not-send errors #64895
 *  Silence unreachable code lint from await desugaring #64930
 *  Always mark rust and rust-call abi's as unwind #65020
 *  Account for macro invocation in `let mut $pat` diagnostic. #65123
 *  Ensure that associated `async fn`s have unique fresh param names #65142
 *  Add troubleshooting section to PGO chapter in rustc book. #65402
 *  Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux #65302
 *  Optimize `try_expand_impl_trait_type` #65293
 *  use precalculated dominators in explain_borrow #65172
 *  Fix ICE #64964 #64989
bors added a commit that referenced this pull request Oct 26, 2019
[beta] backport rollup

This includes a bunch of PRs:
 *  Fix redundant semicolon lint interaction with proc macro attributes #64387
 *  Upgrade async/await to "used" keywords. #64875
 *  syntax: fix dropping of attribute on first param of non-method assocated fn #64894
 *  async/await: improve not-send errors #64895
 *  Silence unreachable code lint from await desugaring #64930
 *  Always mark rust and rust-call abi's as unwind #65020
 *  Account for macro invocation in `let mut $pat` diagnostic. #65123
 *  Ensure that associated `async fn`s have unique fresh param names #65142
 *  Add troubleshooting section to PGO chapter in rustc book. #65402
 *  Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux #65302
 *  Optimize `try_expand_impl_trait_type` #65293
 *  use precalculated dominators in explain_borrow #65172
 *  Fix ICE #64964 #64989
 *  [beta] Revert "Auto merge of #62948 - matklad:failable-file-loading, r=petro… #65273
 *  save-analysis: Don't ICE when resolving qualified type paths in struct members #65353
 *  save-analysis: Nest tables when processing impl block definitions #65511
 *  Avoid ICE when checking `Destination` of `break` inside a closure #65518
 *  Avoid ICE when adjusting bad self ty #65755
 *  workaround msys2 bug #65762
@msizanoen1 msizanoen1 deleted the fix-armv7-segfault branch October 27, 2019 15:42
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2020
Upgrade GCC to 8.3.0, glibc to 2.17.0 and crosstool-ng to 1.24.0 for dist-arm-linux and dist-armhf-linux

Attempt to fix rust-lang#69420 in the same manner as rust-lang#65302 did for armv7l. I have tested that this eliminates the segfault while building a `hello_world` package on `arm-unknown-linux-gnueabihf`.

I have not been able to test whether the bug exists for `arm-unknown-linux-gnueabi` as well, but I suspect it does, so I upgraded the toolchain for that platform as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault compiling libc on armv7-unknown-linux-gnueabihf
10 participants