Repository navigation
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-crossArea: Cross compilationArea: Cross compilationC-bugCategory: This is a bug.Category: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
In particular, this means you have to rebuild llvm for the host when cross-compiling.
I tried this code: x build --host i686-unknown-linux-gnu.
I expected to see this happen: The compiler builds successfully.
Instead, this happened:
-- Build files have been written to: /home/joshua/rustc3/build/i686-unknown-linux-gnu/llvm/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j" "8"
ninja: error: '/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-tblgen', needed by 'include/llvm/IR/Attributes.inc', missing and no known rule to make it
thread 'main' panicked at '
command did not execute successfully, got: exit status: 1
build script failed, must exit now', /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
finished in 8.264 seconds
failed to run: /home/joshua/rustc3/build/bootstrap/debug/bootstrap build --host i686-unknown-linux-gnu
Build completed unsuccessfully in 0:00:09
I think there's a secondary bug which is that x.py hard-codes llvm instead of ci-llvm/. But that seems easier to fix.
Meta
rustc --version --verbose:
<version>
Backtrace
<backtrace>
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-crossArea: Cross compilationArea: Cross compilationC-bugCategory: This is a bug.Category: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Activity
jyn514 commentedon Mar 29, 2022
Mentoring instructions:
src/bootstrapit generates therust-devcomponent (I think I might beRustDevin dist.rs?)@bors try, which will generate CI artifacts.trybuild locally and confirm thatx build --host i686-unknown-linux-gnuworks successfully (or if you're not on Linux, some other platform that's binary compatible).jyn514 commentedon Mar 29, 2022
@rustbot label: +E-mentor
bjorn3 commentedon Mar 30, 2022
Make sure to only copy it if it exists. It doesn't get build if the llvm backend isn't enabled.
cuviper commentedon Oct 7, 2022
It looks like
RustDevunconditionally copies llvm binaries right now, so I thinkllvm-tblgenshould be no different.rust/src/bootstrap/dist.rs
Lines 2020 to 2033 in 43c22af
Rollup merge of rust-lang#102790 - cuviper:llvm-tblgen, r=jyn514
Rollup merge of rust-lang#102790 - cuviper:llvm-tblgen, r=jyn514
Rollup merge of rust-lang#102790 - cuviper:llvm-tblgen, r=jyn514
Rollup merge of rust-lang#102790 - cuviper:llvm-tblgen, r=jyn514