Skip to content

rust 1.68.0 install fails with missing llvm-tools if using external llvm #108948

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

Closed
jpalus opened this issue Mar 9, 2023 · 1 comment · Fixed by #109256
Closed

rust 1.68.0 install fails with missing llvm-tools if using external llvm #108948

jpalus opened this issue Mar 9, 2023 · 1 comment · Fixed by #109256
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jpalus
Copy link

jpalus commented Mar 9, 2023

Close to the end of dist target there's:

Skipping LlvmTools (aarch64-unknown-linux-gnu): external LLVM                

but shortly after install fails with:

thread 'main' panicked at 'missing llvm-tools', install.rs:215:14                                                                                                                              
@jpalus jpalus added the C-bug Category: This is a bug. label Mar 9, 2023
@jpalus
Copy link
Author

jpalus commented Mar 10, 2023

Looks like 23a34c1 lacks checks for external LLVM:

LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
let tarball = builder
.ensure(dist::LlvmTools { target: self.target })
.expect("missing llvm-tools");
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
};

like dist does:

rust/src/bootstrap/dist.rs

Lines 1992 to 2001 in 2c8cc34

fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
let target = self.target;
/* run only if llvm-config isn't used */
if let Some(config) = builder.config.target_config.get(&target) {
if let Some(ref _s) = config.llvm_config {
builder.info(&format!("Skipping LlvmTools ({}): external LLVM", target));
return None;
}
}

@albertlarsan68 albertlarsan68 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 10, 2023
pld-gitsync pushed a commit to pld-linux/rust that referenced this issue Mar 10, 2023
- fix install by reverting 23a34c1 (see rust-lang/rust#108948)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…san68

Check for llvm-tools before install

Fixes rust-lang#108948
`@jpalus` Please review
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…san68

Check for llvm-tools before install

Fixes rust-lang#108948
``@jpalus`` Please review
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…san68

Check for llvm-tools before install

Fixes rust-lang#108948
```@jpalus``` Please review
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…san68

Check for llvm-tools before install

Fixes rust-lang#108948
````@jpalus```` Please review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants