Skip to content
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

Bootstrap tries to build disabled RLS #85683

Closed
o01eg opened this issue May 25, 2021 · 1 comment · Fixed by #99139
Closed

Bootstrap tries to build disabled RLS #85683

o01eg opened this issue May 25, 2021 · 1 comment · Fixed by #99139
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

@o01eg
Copy link
Contributor

o01eg commented May 25, 2021

I trying to build rust from sources. I disabled RLS in config.toml but still get error:

command did not execute successfully: "/tmp/portage/dev-lang/rust-9999/work/rust-git-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "7" "-v" "--release" "--locked" "--manifest-path" "/tmp/portage/dev-lang/rust-9999/work/rust-git-src/src/tools/rls/Cargo.toml" "--features" "clippy" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
      < ToolBuild { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None }, tool: "rls", path: "src/tools/rls", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: ["clippy"] }
    < Rls { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None }, extra_features: [] }
thread 'main' panicked at 'Unable to build RLS', src/bootstrap/dist.rs:44:9
[llvm]
download-ci-llvm = false
optimize = true
release-debuginfo = false
assertions = false
ninja = true
targets = "X86;Mips;NVPTX;RISCV;BPF;AArch64;WebAssembly"
experimental-targets = ""
link-shared = false
[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["i686-unknown-linux-gnu","x86_64-unknown-linux-gnu","wasm32-unknown-unknown"]
docs = true
compiler-docs = false
submodules = false
python = "python3.9"
locked-deps = true
vendor = false
extended = true
tools = ["rust-analyzer","miri","clippy","cargo",]
verbose = 2
sanitizers = true
profiler = false
cargo-native-static = false
[install]
prefix = "/usr/lib/rust/9999"
sysconfdir = "etc"
docdir = "share/doc/rust"
bindir = "bin"
libdir = "lib"
mandir = "share/man"
[rust]
# https://github.com/rust-lang/rust/issues/54872
codegen-units-std = 1
optimize = true
debug = false
debug-assertions = false
debug-assertions-std = false
debuginfo-level = 0
debuginfo-level-rustc = 0
debuginfo-level-std = 0
debuginfo-level-tools = 0
debuginfo-level-tests = 0
backtrace = true
incremental = false
default-linker = "x86_64-pc-linux-gnu-gcc"
parallel-compiler = false
description = "gentoo"
rpath = false
verbose-tests = true
optimize-tests = true
codegen-tests = true
dist-src = false
remap-debuginfo = true
ignore-git = false
lld = true
# only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
# https://github.com/rust-lang/rust/issues/74976
# https://github.com/rust-lang/rust/issues/76526
deny-warnings = false
backtrace-on-ice = true
jemalloc = false
[dist]
src-tarball = false
compression-formats = ["gz"]
[target.i686-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
linker = "x86_64-pc-linux-gnu-gcc"
ar = "x86_64-pc-linux-gnu-ar"
[target.x86_64-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
linker = "x86_64-pc-linux-gnu-gcc"
ar = "x86_64-pc-linux-gnu-ar"
[target.wasm32-unknown-unknown]
linker = "rust-lld"

Meta

Rustc version: fbf1b1a

Backtrace

command did not execute successfully: "/tmp/portage/dev-lang/rust-9999/work/rust-git-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "7" "-v" "--release" "--locked" "--manifest-path" "/tmp/portage/dev-lang/rust-9999/work/rust-git-src/src/tools/rls/Cargo.toml" "--features" "clippy" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
      < ToolBuild { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None }, tool: "rls", path: "src/tools/rls", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: ["clippy"] }
    < Rls { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None }, extra_features: [] }
thread 'main' panicked at 'Unable to build RLS', src/bootstrap/dist.rs:44:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82b86216422e1ee696e20511180fada7a7a87949/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/82b86216422e1ee696e20511180fada7a7a87949/library/std/src/panicking.rs:435:5
   2: bootstrap::dist::missing_tool
             at ./src/bootstrap/dist.rs:44:9
   3: <bootstrap::dist::Rls as bootstrap::builder::Step>::run::{{closure}}
             at ./src/bootstrap/dist.rs:1032:17
   4: core::option::Option<T>::or_else
             at /rustc/82b86216422e1ee696e20511180fada7a7a87949/library/core/src/option.rs:788:21
   5: <bootstrap::dist::Rls as bootstrap::builder::Step>::run
             at ./src/bootstrap/dist.rs:1029:19
   6: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:1518:23
   7: <bootstrap::dist::Extended as bootstrap::builder::Step>::run
             at ./src/bootstrap/dist.rs:1336:29
   8: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:1518:23
   9: <bootstrap::dist::Extended as bootstrap::builder::Step>::make_run
             at ./src/bootstrap/dist.rs:1317:9
  10: bootstrap::builder::StepDescription::maybe_run
             at ./src/bootstrap/builder.rs:179:13
  11: bootstrap::builder::StepDescription::run
             at ./src/bootstrap/builder.rs:200:25
  12: bootstrap::builder::Builder::run_step_descriptions
             at ./src/bootstrap/builder.rs:577:9
  13: bootstrap::builder::Builder::execute_cli
             at ./src/bootstrap/builder.rs:569:9
  14: bootstrap::Build::build
             at ./src/bootstrap/lib.rs:520:13
  15: bootstrap::main
             at ./src/bootstrap/bin/main.rs:33:5
  16: core::ops::function::FnOnce::call_once
             at /rustc/82b86216422e1ee696e20511180fada7a7a87949/library/core/src/ops/function.rs:227:5

@o01eg o01eg added the C-bug Category: This is a bug. label May 25, 2021
@JohnTitor JohnTitor added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 15, 2021
@klensy
Copy link
Contributor

klensy commented Jun 16, 2021

@o01eg

Looking at config, you can try to set missing-tools = true to [dist], but i don't checked that.
How exactly you building rust?

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jul 14, 2022
…acrum

Give a better error when `x dist` fails for an optional tool

Before:
```
thread 'main' panicked at 'Unable to build RLS', dist.rs:42:9
```

After:
```
thread 'main' panicked at 'Unable to build submodule tool RLS (use `missing-tools = true` to ignore this failure)
note: not all tools are available on all nightlies
help: see https://forge.rust-lang.org/infra/toolstate.html for more information', dist.rs:43:9
```

Closes rust-lang#85683 by explaining better why the error is expected.
@bors bors closed this as completed in c1b43ef Jul 14, 2022
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.

3 participants