Summary
TL;DR: When building rust 1.82 onwards and trying to link the rustc_driver with ld.gold, it will fail with the following error:
= note: /usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_alloc failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_alloc_error_handler failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_alloc_zeroed failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_dealloc failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_no_alloc_shim_is_unstable failed: symbol not defined
/usr/libexec/binutils234/elf/ld.gold: error: version script assignment of to symbol __rust_realloc failed: symbol not defined
collect2: error: ld returned 1 exit status
error: could not compile `rustc_driver` (lib) due to 1 previous error
Full story on Zulip: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/__rust_alloc_error_handler_should_panic.20not.20defined/with/510418013
Command used
Rust +1.82 bootstrapped with a custom script.
Expected behaviour
The build to succeed.
Actual behaviour
Fails to build, see summary.
Bootstrap configuration (bootstrap.toml)
Operating system
DragonFly BSD 6.4 and above (including bleeding edge).
HEAD
Any Rust version from 1.82 and above.
Additional context
Build Log
Summary
TL;DR: When building rust 1.82 onwards and trying to link the
rustc_driverwith ld.gold, it will fail with the following error:Full story on Zulip: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/__rust_alloc_error_handler_should_panic.20not.20defined/with/510418013
Command used
Rust +1.82 bootstrapped with a custom script.
Expected behaviour
The build to succeed.
Actual behaviour
Fails to build, see summary.
Bootstrap configuration (bootstrap.toml)
<config>Operating system
DragonFly BSD 6.4 and above (including bleeding edge).
HEAD
Any Rust version from 1.82 and above.
Additional context
Build Log