-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
mipsel targets: compilation fails with "Undefined temporary symbol $BB0_4" #108835
Comments
It's fine. We may not offer the best support for them due to technical and resource constraints, but we still want people to have the option to run Rust code on their OpenWRT router or their PlayStation or whatever. |
71: Do not run CI tests on mips r=ryankurte a=eldruin It seems we have been hit by rust-lang/rust#108835 Until that is fixed, let's not run the tests on mips targets. Also, I raised the MSRV due to the dependencies. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
i hit the same problem. build |
May be caused by a trigger for #113065 |
FYI, this can be worked around by enabling optimization. $ cargo +1.67 build --target mipsel-unknown-linux-gnu
Compiling repro v0.1.0 (...)
error: Undefined temporary symbol $BB0_4
error: could not compile `repro` due to previous error
$ cargo +1.67 build --target mipsel-unknown-linux-gnu --release
Compiling repro v0.1.0 (...)
Finished release [optimized] target(s) in 0.09s
$ RUSTFLAGS='-C opt-level=1' cargo +1.67 build --target mipsel-unknown-linux-gnu
Compiling repro v0.1.0 (...)
Finished dev [unoptimized + debuginfo] target(s) in 0.19s The same workaround works for error from |
Maybe its relocation is too far then that has been truncated? |
This should fix rust-lang/rust#108835 FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS.
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS.
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
This issue should be fixed by llvm/llvm-project#80799. |
@rustbot label llvm-fixed-upstream |
Can someone confirm that this is fixed on nightly? |
Yep. My initial reproducer fails with |
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
FastISel may create a redundant BGTZ terminal which fallthroughes. ``` BGTZ %2:gpr32, %bb.1, implicit-def $at bb.1.bb1: ; predecessors: %bb.0 ``` The `!I->isBarrier()` check in MipsAsmPrinter::isBlockOnlyReachableByFallthrough will incorrectly not print a label, leading to a `Undefined temporary symbol ` error when we try assembling the output assembly file. See the updated `Fast-ISel/pr40325.ll` and rust-lang/rust#108835 In addition, the `SwitchInst` condition is too conservative and prints many unneeded labels (see the updated tests). Just use the generic isBlockOnlyReachableByFallthrough, updated by commit 1995b9f for SPARC, which also handles MIPS. (cherry picked from commit 6b2fd7a)
Hi,
I hit a strange build failure in CI where
rustc-demangle
fails to build formipsel-unknown-linux-gnu
.Here's a reduced reproducer:
Meta
I'm using current nightly, but this is a regression from stable (
1.67.1
) to beta (1.68.0-beta.7
).rustc --version --verbose
:cargo bisect-rustc
points to d726c84 (innightly-2022-11-01
), but this feels like an LLVM bug.I can't trigger it via
--emit=llvm-ir
andllc repro.ll -o repro.o -filetype=obj
though. The LLVM version matches, but I'm probably not reproducingrustc
's interactions with LLVM faithfully..Sorry for the noise with obscure target architectures, but I'm reporting the issue here because I don't know how to reproduce it on LLVM's side 🙂
The text was updated successfully, but these errors were encountered: