Skip to content

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

Closed

Description

@SimonSapin

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

Activity

  1. added
    A-linkageArea: linking into static, shared libraries and binaries
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.
    on Dec 16, 2020
  2. camelid commented on Dec 16, 2020

    @camelid
    Member
  3. SimonSapin commented on Dec 16, 2020

    @SimonSapin
    ContributorAuthor

    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.

  4. jyn514 commented on Jan 1, 2021

    @jyn514
    Member

    I think this is a duplicate of #78778.

  5. nnethercote commented on Jan 5, 2022

    @nnethercote
    Contributor

    I think this is a duplicate of #78778.

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

  6. nnethercote commented on Jan 5, 2022

    @nnethercote
    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
    
  7. jyn514 commented on Jan 6, 2022

    @jyn514
    Member

    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.

  8. camelid commented on Jan 6, 2022

    @camelid
    Member

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

  9. jyn514 commented on Mar 13, 2022

    @jyn514
    Member

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

  10. conradludgate commented on Mar 13, 2022

    @conradludgate
    Contributor

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

    Thanks, that worked

  11. jyn514 commented on Mar 27, 2022

    @jyn514
    Member

    ...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.

  12. added a commit that references this issue on Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions