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

Undefined symbols when bootstrapping with ld.gold in DragonFly BSD #139425

Open
tuxillo opened this issue Apr 5, 2025 · 0 comments
Open

Undefined symbols when bootstrapping with ld.gold in DragonFly BSD #139425

tuxillo opened this issue Apr 5, 2025 · 0 comments
Labels
A-linkers Area: linkers... you gotta love linkers C-external-bug Category: issue that is caused by bugs in software beyond our control T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@tuxillo
Copy link
Contributor

tuxillo commented Apr 5, 2025

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)

<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

<log>

@tuxillo tuxillo added C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 5, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 5, 2025
@onur-ozkan onur-ozkan added O-dragonfly Operating system: DragonFly BSD A-linkers Area: linkers... you gotta love linkers and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 6, 2025
@bjorn3 bjorn3 added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. and removed O-dragonfly Operating system: DragonFly BSD labels Apr 6, 2025
@jieyouxu jieyouxu added C-external-bug Category: issue that is caused by bugs in software beyond our control and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. C-bug Category: This is a bug. labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkers Area: linkers... you gotta love linkers C-external-bug Category: issue that is caused by bugs in software beyond our control T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants