cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.49k stars 365 forks source link

Undefined temporary symbol `$BB342_17` when compiling `rustc-demangle` #1322

Open AaronKutch opened 1 year ago

AaronKutch commented 1 year ago

Checklist

Describe your issue

When I run cross test --target mips-unknown-linux-gnu -Z build-std=core,alloc,proc_macro,std --features=std,zeroize_support,rand_support,serde_support,dag,try_support,debug on awint v0.12.0 (https://github.com/AaronKutch/awint/commit/74f41a5f41707e4c87dda98d51691c753465647a ) and cargo 1.74.0-nightly (925280f02 2023-08-25)

What target(s) are you cross-compiling for?

mips-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

What architecture is the host?

What container engine is cross using?

cross version

cross 2.5.0

Example

navigate to workspace root and run cross test --target mips-unknown-linux-gnu -Z build-std=core,alloc,proc_macro,std --features=std,zeroize_support,rand_support,serde_support,dag,try_support,debug I get the result

error: Undefined temporary symbol $BB342_17

error: could not compile `rustc-demangle` (lib) due to previous error

Additional information / notes

No response

AaronKutch commented 1 year ago

I know that mips was demoted recently, this isn't necessary if I could runs390x-unknown-linux-gnu (I need a 32-bit big endian system) which seems to be blocked by the libtest issues

taiki-e commented 1 year ago

This is rustc/llvm bug, and can be worked around by enabling optimization. https://github.com/rust-lang/rust/issues/108835#issuecomment-1636983993

urosbericsyrmia commented 7 months ago

This issue should be fixed by llvm/llvm-project#80799. Initially, the cause of the issue and the solution are explained in llvm/llvm-project#80666, but more elegant solution is just to remove derived isBlockOnlyReachableByFallthrough for Mips architecture.