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

Error on bootstrapping : Empty search path given via '-L' #97138

Closed
b-ncMN opened this issue May 18, 2022 · 6 comments
Closed

Error on bootstrapping : Empty search path given via '-L' #97138

b-ncMN opened this issue May 18, 2022 · 6 comments

Comments

@b-ncMN
Copy link
Contributor

b-ncMN commented May 18, 2022

I've had this happen to me on my Linux machine and I do not understand why that happens,
This does not seem to be happening on my other machines, so I'm thinking that something on my system is borked, or some tool is not properly configured

   Did not run successfully: exit status: 1
"/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "--crate-name" "rustc_llvm" "--edition=2021" "compiler/rustc_llvm/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=0" "-C" "metadata=8189f5f94d222aad" "-C" "extra-filename=-8189f5f94d222aad" "--out-dir" "/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "--target" "x86_64-unknown-linux-gnu" "-C" "incremental=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/incremental" "-L" "dependency=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps" "--extern" "libc=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblibc-62e0192eb4aac4f1.rmeta" "--cfg=bootstrap" "-Csymbol-mangling-version=v0" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=off" "-Ztls-model=initial-exec" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-Cllvm-args=-import-instr-limit=10" "-Z" "binary-dep-depinfo" "-L" "native=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-c0b7cf8babb6cdd2/out" "-L" "native=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib" "-L" "native=" "--cfg" "llvm_component=\"aarch64\"" "--cfg" "llvm_component=\"arm\"" "--cfg" "llvm_component=\"asmparser\"" "--cfg" "llvm_component=\"avr\"" "--cfg" "llvm_component=\"bitreader\"" "--cfg" "llvm_component=\"bitwriter\"" "--cfg" "llvm_component=\"bpf\"" "--cfg" "llvm_component=\"coverage\"" "--cfg" "llvm_component=\"hexagon\"" "--cfg" "llvm_component=\"instrumentation\"" "--cfg" "llvm_component=\"ipo\"" "--cfg" "llvm_component=\"linker\"" "--cfg" "llvm_component=\"lto\"" "--cfg" "llvm_component=\"m68k\"" "--cfg" "llvm_component=\"mips\"" "--cfg" "llvm_component=\"msp430\"" "--cfg" "llvm_component=\"nvptx\"" "--cfg" "llvm_component=\"powerpc\"" "--cfg" "llvm_component=\"riscv\"" "--cfg" "llvm_component=\"sparc\"" "--cfg" "llvm_component=\"systemz\"" "--cfg" "llvm_component=\"webassembly\"" "--cfg" "llvm_component=\"x86\"" "-l" "static=llvm-wrapper" "-l" "dylib=LLVM-14-rust-1.63.0-nightly" "-l" "static=stdc++" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot" "-Z" "force-unstable-if-unmarked"
-------------
error: could not compile `rustc_llvm` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo CARGO_CRATE_NAME=rustc_llvm CARGO_MANIFEST_DIR=/home/infrandomness/Documents/Dev/rust/compiler/rustc_llvm CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=rustc_llvm CARGO_PKG_REPOSITORY='' CARGO_PKG_VERSION=0.0.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps:/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0/lib' OUT_DIR=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-c0b7cf8babb6cdd2/out /home/infrandomness/Documents/Dev/rust/build/bootstrap/debug/rustc --crate-name rustc_llvm --edition=2021 compiler/rustc_llvm/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C metadata=8189f5f94d222aad -C extra-filename=-8189f5f94d222aad --out-dir /home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern libc=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblibc-62e0192eb4aac4f1.rmeta --cfg=bootstrap -Csymbol-mangling-version=v0 -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=off -Ztls-model=initial-exec -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo -L native=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-c0b7cf8babb6cdd2/out -L native=/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib -L native= --cfg 'llvm_component="aarch64"' --cfg 'llvm_component="arm"' --cfg 'llvm_component="asmparser"' --cfg 'llvm_component="avr"' --cfg 'llvm_component="bitreader"' --cfg 'llvm_component="bitwriter"' --cfg 'llvm_component="bpf"' --cfg 'llvm_component="coverage"' --cfg 'llvm_component="hexagon"' --cfg 'llvm_component="instrumentation"' --cfg 'llvm_component="ipo"' --cfg 'llvm_component="linker"' --cfg 'llvm_component="lto"' --cfg 'llvm_component="m68k"' --cfg 'llvm_component="mips"' --cfg 'llvm_component="msp430"' --cfg 'llvm_component="nvptx"' --cfg 'llvm_component="powerpc"' --cfg 'llvm_component="riscv"' --cfg 'llvm_component="sparc"' --cfg 'llvm_component="systemz"' --cfg 'llvm_component="webassembly"' --cfg 'llvm_component="x86"' -l static=llvm-wrapper -l dylib=LLVM-14-rust-1.63.0-nightly -l static=stdc++` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
command did not execute successfully: "/home/infrandomness/Documents/Dev/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "-v" "-v" "-v" "-v" "--release" "--features" "llvm" "--manifest-path" "/home/infrandomness/Documents/Dev/rust/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
Traceback (most recent call last):
  File "/home/infrandomness/Documents/Dev/rust/./x.py", line 27, in <module>
    bootstrap.main()
  File "/home/infrandomness/Documents/Dev/rust/src/bootstrap/bootstrap.py", line 1212, in main
    bootstrap(help_triggered)
  File "/home/infrandomness/Documents/Dev/rust/src/bootstrap/bootstrap.py", line 1198, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/home/infrandomness/Documents/Dev/rust/src/bootstrap/bootstrap.py", line 203, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /home/infrandomness/Documents/Dev/rust/build/bootstrap/debug/bootstrap build -vvvv
@compiler-errors
Copy link
Member

I think this is because you need libstdc++-static, which fixed this issue for me before. The error message certainly could be improved, though.

@ghost
Copy link

ghost commented May 19, 2022

Just happened to me as well, a better error message would be lovely. =D

@ghost
Copy link

ghost commented May 19, 2022

Update -> Can confirm, installing libstdc++-static fixes it. Tested on Fedora 36 (Silverblue), but should work on any distro.

@b-ncMN
Copy link
Contributor Author

b-ncMN commented May 19, 2022

Being a fedora 37 user, I installed libstdc++-static and this effectively solved my issue

@sundeep-kokkonda
Copy link
Contributor

I am also facing this issue on Fedora and Ubuntu as well. The static libs should be installed on the Host machine (Fedora/Ubuntu) or the static libs to be made available in the native sysroot path?

@b-ncMN
Copy link
Contributor Author

b-ncMN commented Jun 16, 2022

I am also facing this issue on Fedora and Ubuntu as well. The static libs should be installed on the Host machine (Fedora/Ubuntu) or the static libs to be made available in the native sysroot path?

The libraries should be installed on the host machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants