Open moxian opened 3 years ago
@rustbot label +A-incr-comp +O-windows-msvc +T-compiler
Possibly related to https://github.com/rust-lang/rust/issues/81280 (which would make it independent of windows).
I'll yank the windows tag. I don't know why I assumed that just because it was on windows it would be windows specific. Maybe it's that I'm still figuring out how to do this tagging thing. In any case, I'm sorry for the error!
@rustbot label -O-windows-msvc
Just got this error while linking rustc_driver
with incremental enabled (not for the first time).
= note: ld.lld: error: undefined symbol: anon.91c2f56426c5022640e519f02889d07d.8.llvm.746630307250149404
>>> referenced by C:\msys64\home\we\rust\library\core\src/option.rs:0
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.1brnvk2mjzqx5b9n.rcgu.o):(rustc_resolve::macros::registered_idents)
>>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_fn_like_elision::{closure#9}>)
>>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#6}>)
>>> referenced 30 more times
ld.lld: error: undefined symbol: anon.91c2f56426c5022640e519f02889d07d.9.llvm.746630307250149404
>>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_fn_like_elision::{closure#9}>)
>>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#6}>)
>>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#7}>)
>>> referenced 30 more times
ld.lld: error: undefined symbol: core::ptr::drop_in_place::<rustc_span::FileName> (.llvm.1438190246702246187)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:0
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.4391tludo7n7dv8i.rcgu.o):(core::ptr::drop_in_place::<rustc_span::SpanSnippetError>)
>>> referenced 9 more times
ld.lld: error: undefined symbol: core::ptr::drop_in_place::<(rustc_span::FileName, rustc_span::BytePos)> (.llvm.1438190246702246187)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.4391tludo7n7dv8i.rcgu.o):(core::ptr::drop_in_place::<rustc_span::SpanSnippetError>)
>>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
>>> librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.5327cotcw21h0vj4.rcgu.o):(core::ptr::drop_in_place::<core::result::Result<alloc::string::String, rustc_span::SpanSnippetError>>)
>>> referenced 2 more times
collect2.exe: error: ld returned 1 exit status
I'm compiling a project of mine with both --release and incremental. And after a certain code change i'm getting linker errors:
This is extremely fragile, and almost any attempt to minimize the issue, or even really preserve for posterity is unsuccessful. (as a specific example: this binary depends on another rust project on local filesystem. Trying to move them both to a dedicated place triggers a recompilation in a way that makes the bug disappear) (but raw
rustc
invocation on the copy of thesniffer
itself seems to result in linkage errors, as desired).Potentially related: #61917 , #45929
-Ccodegen-units=9999
doesn't seem to do anything.Let me know if there's anything i can do to get meaningful diagnostics.
I'm not comfortable sharing the repro (i.e. the full source folder + target/ directory) publicly, but I'm happy to do so in private for whoever is willing to minimize/debug this (figuring out the exact logistics of this seem to be easiest if you @ me on Discord -
moxian#8121
)Meta
rustc --version --verbose
: