Skip to content

error_index_generator: error while loading shared libraries: libLLVM-11-rust-1.50.0-nightly.so #80096

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
SimonSapin opened this issue Dec 16, 2020 · 10 comments · Fixed by #95440
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

Steps:

  • Checkout commit b32e6e6
  • Have profile = "library" in config.toml. In particular, this implies download-ci-llvm = "if-available"
  • Run ./x.py doc

Output (on the second run):

Updating only changed submodules
Submodules updated in 0.06 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
Generating unstable book md files (x86_64-unknown-linux-gnu)
Building stage0 tool unstable-book-gen (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.12s
Building stage0 tool rustbook (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.16s
Rustbook (x86_64-unknown-linux-gnu) - unstable-book
Documenting standalone (x86_64-unknown-linux-gnu)
Documenting book redirect pages (x86_64-unknown-linux-gnu)
Documenting stage0 std (x86_64-unknown-linux-gnu)
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.19s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.24s
    Finished release [optimized] target(s) in 0.27s
    Finished release [optimized] target(s) in 0.21s
    Finished release [optimized] target(s) in 0.19s
    Finished release [optimized] target(s) in 0.20s
Documenting stage0 compiler (x86_64-unknown-linux-gnu)
	skipping - compiler/librustdoc docs disabled
Documenting stage0 rustdoc (x86_64-unknown-linux-gnu)
	skipping - compiler/librustdoc docs disabled
Documenting error index (x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.21s
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 tool error_index_generator (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.16s
/home/simon/projects/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/error_index_generator: error while loading shared libraries: libLLVM-11-rust-1.50.0-nightly.so: cannot open shared object file: No such file or directory


command did not execute successfully: "/home/simon/projects/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/error_index_generator" "html" "/home/simon/projects/rust/build/x86_64-unknown-linux-gnu/doc/error-index.html" "1.50.0"
expected success, got: exit code: 127


failed to run: /home/simon/projects/rust/build/bootstrap/debug/bootstrap doc
@SimonSapin SimonSapin added the C-bug Category: This is a bug. label Dec 16, 2020
@camelid camelid added A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Dec 16, 2020
@camelid
Copy link
Member

camelid commented Dec 16, 2020

cc @Mark-Simulacrum

@SimonSapin
Copy link
Contributor Author

For what it’s worth b32e6e6 is just what I happened to get after running git pull today. I mentioned it in case something changes later, it’s a coincidence that that commit happens to be related to downloading LLVM from Rust CI.

@jyn514
Copy link
Member

jyn514 commented Jan 1, 2021

I think this is a duplicate of #78778.

@nnethercote
Copy link
Contributor

I think this is a duplicate of #78778.

That issue is closed, and its final comment points to this issue.

@nnethercote
Copy link
Contributor

I just hit this on the following sequence.

  • Do a fresh clone of rust-lang/rust
  • Run ./x.py setup
  • Select option (b) "compiler: Contribute to the compiler itself"
  • Run ./x.py test

The build finished like so:

Building stage0 tool error_index_generator (x86_64-unknown-linux-gnu)
   Compiling same-file v1.0.6
   Compiling walkdir v2.3.1
   Compiling error_index_generator v0.0.0 (/home/njn/dev/rust/src/tools/error_index_generator)
    Finished release [optimized] target(s) in 2.85s
/home/njn/dev/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/error_index_generator: error while loading shared libraries: libLLVM-13-rust-1.59.0-nightly.so: cannot open shared object file: No such file or directory

command did not execute successfully: "/home/njn/dev/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/error_index_generator" "html" "/home/njn/dev/rust/build/x86_64-unknown-linux-gnu/doc/error-index.html" "1.59.0"
expected success, got: exit status: 127

Build completed unsuccessfully in 0:20:41

@jyn514
Copy link
Member

jyn514 commented Jan 6, 2022

IMO the proper fix for this is to remove error-index's dependency on rustdoc, either by moving the relevant code out into a library that doesn't use rustc_private, or by duplicating the code altogether. There are other ways to solve this but they'll be more complicated and take longer to compile for no real benefit.

@camelid
Copy link
Member

camelid commented Jan 6, 2022

...or by making it invoke rustdoc-the-binary (through rustdoc foo.md), rather than using rustdoc-the-library.

@jyn514
Copy link
Member

jyn514 commented Mar 13, 2022

@conradludgate you should be able to work around this by adding --stage 2 I think.

@conradludgate
Copy link
Contributor

@conradludgate you should be able to work around this by adding --stage 2 I think.

Thanks, that worked

@jyn514
Copy link
Member

jyn514 commented Mar 27, 2022

...or by making it invoke rustdoc-the-binary (through rustdoc foo.md), rather than using rustdoc-the-library.

@camelid I think you're right that the binary will be easier - parsing the markdown requires parsing doctests so that it can generate the "Run" button, and parsing doctests requires all of rustc_parse.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
5 participants