You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Many tests failing with "Couldn't compile the test" on 32-bit PowerPC with 1.49 beta #81334
Debian's LLVM 11 package (llvm-toolchain-11) already contains the fix, so it can't be this.
I'm trying to bisect this now in the Rust compiler itself but I just stumbled into the problem that a cross build no longer builds a full stage2 compiler with the std compiler which can be used on the target system, so I will first have to figure out what changed in Rust here.
0328e69287b083af4d5d4b49cfc9175e9c82c88e is the first bad commit
commit 0328e69287b083af4d5d4b49cfc9175e9c82c88e
Author: Josh Triplett <[email protected]>
Date: Sun Oct 25 22:11:20 2020 -0700
Compile tools and internal libraries with the initial-exec TLS model
This should produce more efficient code, with fewer calls to
__tls_get_addr. The tradeoff is that libraries using it won't work with
dlopen, but that shouldn't be a problem for tools or for our own
internal libraries.
Co-authored-by: Mark Rousskov <[email protected]>
src/bootstrap/builder.rs | 8 ++++++++
src/bootstrap/lib.rs | 4 ++++
2 files changed, 12 insertions(+)
At a first blush sounds like a limitation of the platform most likely (much like how it doesn't really support e.g. copy relocations all that well on PPC64) in which case a simple exclusion would make sense here.
@glaubitz there are reports of powerpc little endian toolchains still hitting this bug, can you imagine to push a simple patch to include the case of little endian as well?
...Does LLVM, or any of our codegen backends for that matter, actually support PowerPC 32-bit LE targets? Do they really exist? I know PowerPCs are bi-endian, but I thought the endian-switch bit was an extension that 32-bit architectures didn't have to include.
Well, I do know we don't actually support any ppc32le Rust targets. I don't think it would exactly be what one would call a "maintenance burden" to accept a patch that adds a mild fix to bootstrap for custom targets. But if people are really using this target, it might be better to submit an application to add it as a new tier 3 target, so we can at least be Formally Aware of it.
@stefson The patch you ask for is simple so if you send it in we probably would happily accept it, but the best way to make sure Void Linux's powerpcle-unknown-linux-* targets are accounted for in the future would be to go through the process of upstreaming them as a tier 3 target. For Tier 3 Platform Support, it isn't required that it works well or passes tests. In fact, it isn't even required to build. However, merely having such support in the codebase would help with letting us know which tuples are actually in use, and thus reduce the likelihood of accidentally stomping on them.
Activity
bjorn3 commentedon Jan 24, 2021
I am seeing a lot of signal 4 (SIGILL) errors in the build log.
glaubitz commentedon Jan 24, 2021
Ah, that reminds me of one bug in LLVM: https://bugs.llvm.org/show_bug.cgi?id=46683
I'll check whether this one fixes it: llvm/llvm-project@a5d161c
glaubitz commentedon Jan 24, 2021
Debian's LLVM 11 package (
llvm-toolchain-11) already contains the fix, so it can't be this.I'm trying to bisect this now in the Rust compiler itself but I just stumbled into the problem that a cross build no longer builds a full stage2 compiler with the std compiler which can be used on the target system, so I will first have to figure out what changed in Rust here.
bjorn3 commentedon Jan 24, 2021
You can pass
--stage 2to./x.py. The default changed to--stage 1.glaubitz commentedon Jan 24, 2021
Thanks, that's what I guessed already, I just couldn't find the change in the vast amount of other changes ;).
bjorn3 commentedon Jan 24, 2021
https://blog.rust-lang.org/inside-rust/2020/08/30/changes-to-x-py-defaults.html: #73964
glaubitz commentedon Apr 12, 2021
Just cross-compiled 1.50 and the issue is still there:
glaubitz commentedon Apr 12, 2021
I cannot get a sensible backtrace, unfortunately:
glaubitz commentedon May 27, 2021
I'm bisecting this now. I think it might actually be a bug in the Rust compiler and not LLVM.
glaubitz commentedon May 29, 2021
git bisecthas lead me to 0328e69:nagisa commentedon May 29, 2021
At a first blush sounds like a limitation of the platform most likely (much like how it doesn't really support e.g. copy relocations all that well on PPC64) in which case a simple exclusion would make sense here.
glaubitz commentedon May 29, 2021
I can confirm that reverting that change fixes the Rust compiler on 32-bit PowerPC for me. So, I agree, it should just be disabled on this target.
glaubitz commentedon May 29, 2021
I can submit a simple patch either tonight or tomorrow some time.
Rollup merge of rust-lang#85807 - glaubitz:powerpc-disable-initial-ex…
stefson commentedon Apr 8, 2022
@glaubitz there are reports of powerpc little endian toolchains still hitting this bug, can you imagine to push a simple patch to include the case of little endian as well?
example: https://github.com/void-ppc/void-packages/blob/master/srcpkgs/rust/patches/fix-ppc32.patch
workingjubilee commentedon Jul 22, 2022
...Does LLVM, or any of our codegen backends for that matter, actually support PowerPC 32-bit LE targets? Do they really exist? I know PowerPCs are bi-endian, but I thought the endian-switch bit was an extension that 32-bit architectures didn't have to include.
Well, I do know we don't actually support any ppc32le Rust targets. I don't think it would exactly be what one would call a "maintenance burden" to accept a patch that adds a mild fix to bootstrap for custom targets. But if people are really using this target, it might be better to submit an application to add it as a new tier 3 target, so we can at least be Formally Aware of it.
jrtc27 commentedon Jul 22, 2022
Yes. https://reviews.llvm.org/D93918
workingjubilee commentedon Jul 27, 2022
Fair enough!
@stefson The patch you ask for is simple so if you send it in we probably would happily accept it, but the best way to make sure Void Linux's
powerpcle-unknown-linux-*targets are accounted for in the future would be to go through the process of upstreaming them as a tier 3 target. For Tier 3 Platform Support, it isn't required that it works well or passes tests. In fact, it isn't even required to build. However, merely having such support in the codebase would help with letting us know which tuples are actually in use, and thus reduce the likelihood of accidentally stomping on them.