-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Latest master toolchains are broken when linking LLVM: "__morestack: invalid needed version 2" #81554
Comments
The error is actually already mentioned in #81489. However, I am building Miri with cargo, so I don't know how I'd "use LLD instead". |
Yes, a revert seems appropriate. We're going to have to figure out where that's actually coming from. The only change I saw between 10 and 11 by grepping |
Yeah, I thought this issue would be limited to the rustc build, but it makes sense that it can also affect project linking against rustc shared objects. I've looked a bit into what the root cause is, and what I have so far as that the symbol comes from https://github.com/llvm/llvm-project/blob/b10d445307a0f3c7e5522836b4331090aacaf349/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp#L217 and is present as a weak symbol both when compiling with clang-10 and clang-11. The only difference I see from
So apparently Edit:
|
@nikic can you prepare a revert PR? |
The issue is probably going to be in how exactly the objects that comprise libLLVM.so are compiled, not linked. I suspect Alas, reasons these obscure failures can occur are many – I've seen them occur from things as trivial as forgetting to The question is: is there perhaps a way to disable ExecutionEngine entirely? Intuitively nothing we do should depend on that code. And if not, I'm comfortable patching out |
We normally don't link ExecutionEngine, but dist-x86_64-linux in particular builds LLVM with ThinLTO, in which case we link libLLVM.so as shared, instead of statically linking individual components into rustc_llvm. |
It seems to be possible to configure the components in libLLVM.so using |
So, I think we could have used |
Looks like I'm getting this locally when trying to bootstrap rustc (while building Backtrace
|
@matthiaskrgr which commit are you trying to build? |
Probably best to open a new issue then; this one has been closed and the steps to reproduce it still work without error -- you might be having a different problem. |
Opened #82839 |
Did anyone file an upstream bug report about this? I'm observing it outside of Rust, but with a similar setup (libLLVM.so with lld+ThinLTO, then linking it into a binary with ld.bfd). If not, I'd try to build a reproducer. |
I've opened bug 49915 for this. |
The bug has been fixed, the fix will be in LLVM 12.0.1. |
Thanks! We can try updating clang again once the 12.0.1 tag is there. |
When I install the latest master toolchains via
rustup-toolchain-install-master
and try to build Miri with them, linking fails:I did some bisection, and it looks like the problem started happening with #81489.
Cc @rust-lang/infra
The text was updated successfully, but these errors were encountered: