-
Notifications
You must be signed in to change notification settings - Fork 13.3k
tools depending on rustc crates can't build with rust.download-rustc=true
and llvm.download-ci-llvm=false
options
#123586
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
Comments
I am unsure whether this is a bug in bootstrap or a limitation of using precompiled CI cc @nikic |
Building tools that link against rustc internals requires both the rustc-dev and llvm-tools-preview components to be installed. The former for all crate metadata and librustc_driver.so in the sysroot, while the latter is for libLLVM.so. Linking against the libLLVM.so in the rustc component that rustc itself is linked against doesn't work as it isn't in the sysroot for the target. It is in |
Even if
So, if |
Rollup merge of rust-lang#123642 - onur-ozkan:restrict-llvm-option, r=Mark-Simulacrum do not allow using local llvm while using rustc from ci From: rust-lang#123586 (comment) > Even if `llvm.download-ci-llvm` is set to true, `stage > 0` rustc will always use the prebuilt LLVM library which comes with ci-rustc. So I tried to use locally-built LLVM libraries in the ci-rustc by replacing the existing LLVM libraries with the locally built ones, and it appears that this is indeed a limitation of using `rust.download-rustc=true` as it fails with the following error: > > ``` > $ ./build/host/ci-rustc/bin/rustc --version > ./build/host/ci-rustc/bin/rustc: symbol lookup error: /home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc/bin/../lib/librustc_driver-a03ea465d8e03db1.so: undefined symbol: LLVMInitializeARMTargetInfo, version LLVM_18.1 > ``` > > So, if `rust.download-rustc` is set to true and `llvm.download-ci-llvm` is false, I believe bootstrap should terminate the process (as it always uses prebuilt LLVM libraries from ci-rustc, there is no point to build LLVM locally) while parsing the configuration. Resolves rust-lang#123586 r? Mark-Simulacrum
…ulacrum do not allow using local llvm while using rustc from ci From: rust-lang/rust#123586 (comment) > Even if `llvm.download-ci-llvm` is set to true, `stage > 0` rustc will always use the prebuilt LLVM library which comes with ci-rustc. So I tried to use locally-built LLVM libraries in the ci-rustc by replacing the existing LLVM libraries with the locally built ones, and it appears that this is indeed a limitation of using `rust.download-rustc=true` as it fails with the following error: > > ``` > $ ./build/host/ci-rustc/bin/rustc --version > ./build/host/ci-rustc/bin/rustc: symbol lookup error: /home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc/bin/../lib/librustc_driver-a03ea465d8e03db1.so: undefined symbol: LLVMInitializeARMTargetInfo, version LLVM_18.1 > ``` > > So, if `rust.download-rustc` is set to true and `llvm.download-ci-llvm` is false, I believe bootstrap should terminate the process (as it always uses prebuilt LLVM libraries from ci-rustc, there is no point to build LLVM locally) while parsing the configuration. Resolves #123586 r? Mark-Simulacrum
When trying to build tools that rely on rustc crates using the
rust.download-rustc=true
andllvm.download-ci-llvm=false
options,ld
can not find the LLVM it needs.I have also attempted to build
rustdoc
andclippy
and they too failed due to the same issue. So I am quite sure this happens on any tool that uses rustc crates.The text was updated successfully, but these errors were encountered: