-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusCall for partcipation: This issues needs some investigation to determine current statusT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Summary
Having optimize = "false"
in bootstrap.toml
causes
= note: Undefined symbols for architecture arm64:
"core::ptr::drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$::hcc3526ae516987a1", referenced from:
std::panicking::try::cleanup::h73ac583610235009 in libstd-2e13ee922e5a6504.rlib[7](std-2e13ee922e5a6504.std.de67259d40fecdda-cgu.04.rcgu.o)
std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hedd318147b7d845a in libstd-2e13ee922e5a6504.rlib[18](std-2e13ee922e5a6504.std.de67259d40fecdda-cgu.15.rcgu.o)
"alloc::boxed::Box$LT$T$C$A$GT$::from_raw_in::he9e618f702525f8b", referenced from:
std::panicking::try::cleanup::h73ac583610235009 in libstd-2e13ee922e5a6504.rlib[7](std-2e13ee922e5a6504.std.de67259d40fecdda-cgu.04.rcgu.o)
"alloc::boxed::Box$LT$T$C$A$GT$::into_raw::h79583d854b3b1b93", referenced from:
_$LT$std..panicking..begin_panic_handler..FormatStringPayload$u20$as$u20$core..panic..PanicPayload$GT$::take_box::h14da0fd70b068231 in libstd-2e13ee922e5a6504.rlib[7](std-2e13ee922e5a6504.std.de67259d40fecdda-cgu.04.rcgu.o)
_$LT$std..panicking..begin_panic_handler..StaticStrPayload$u20$as$u20$core..panic..PanicPayload$GT$::take_box::hfd105107c2b4e561 in libstd-2e13ee922e5a6504.rlib[7](std-2e13ee922e5a6504.std.de67259d40fecdda-cgu.04.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
when compiling a crate with
[profile.release]
panic = 'abort'
[profile.dev]
panic = 'abort'
Command used
cargo build
Expected behaviour
No errors from the linker.
Actual behaviour
Some symbols are undefined.
Bootstrap configuration (bootstrap.toml)
[rust]
codegen-backends = ["llvm"]
debug = true
debuginfo-level = 2
optimize = false
Operating system
macOS 15.5, aarch64
HEAD
6b00bc38
(1.88.0)
Additional context
I came across this problem while using an explicitly unsupported configuration in bootstrap.toml
: optimize = "false"
.
As such, this is not a problem, in the sense that I got what I asked for: non-obvious errors using an unsupported configuration.
As mentioned in this discussion on Zulip, however, it could be useful to see if this error indicates a deeper issue that might be worth investigating.
Build Log
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.E-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusCall for partcipation: This issues needs some investigation to determine current statusT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.