Skip to content

bootstraping does not find libLLVM-4.0.so #49052

Closed
@dilyanpalauzov

Description

@dilyanpalauzov

I am trying to build rustc-1.24.1-src, first with:
./configure --enable-ninja --enable-docs --enable-compiler-docs --enable-llvm-link-shared --enable-optimize --enable-full-bootstrap --enable-extended

and then with python /src/rustc-1.24.1-src/x.py build -v:

running: /src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /src/rustc-1.24.1-src/src/bootstrap/Cargo.toml --verbose
       Fresh quote v0.3.15
       Fresh libc v0.2.34
       Fresh dtoa v0.4.2
       Fresh cc v1.0.3
       Fresh cfg-if v0.1.2
       Fresh lazy_static v0.2.11
       Fresh serde v1.0.25
       Fresh num-traits v0.1.41
       Fresh unicode-xid v0.0.4
       Fresh itoa v0.3.4
       Fresh getopts v0.2.15
       Fresh num_cpus v1.7.0
       Fresh time v0.1.39
       Fresh cmake v0.1.29
       Fresh filetime v0.1.14
       Fresh toml v0.4.5
       Fresh synom v0.11.3
       Fresh serde_json v1.0.8
       Fresh build_helper v0.1.0 (file:///src/rustc-1.24.1-src/src/build_helper)
       Fresh syn v0.11.11
       Fresh serde_derive_internals v0.18.1
       Fresh serde_derive v1.0.25
       Fresh bootstrap v0.0.0 (file:///src/rustc-1.24.1-src/src/bootstrap)
    Finished dev [unoptimized] target(s) in 0.0 secs
running: /src/rustc-1.24.1-src/build/bootstrap/debug/bootstrap build -v
finding compilers
CC_x86_64-unknown-linux-gnu = "cc"
AR_x86_64-unknown-linux-gnu = "ar"
CXX_x86_64-unknown-linux-gnu = "c++"
running sanity check
learning about cargo
> Assemble { target_compiler: Compiler { stage: 2, host: "x86_64-unknown-linux-gnu" } }
  > Assemble { target_compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
    > Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
    < Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
    > Rustc { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
      > Test { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
        > Std { target: "x86_64-unknown-linux-gnu", compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
          > StartupObjects { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
          < StartupObjects { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
          > Sysroot { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
          < Sysroot { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
running: "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/src/rustc-1.24.1-src/src/libstd/Cargo.toml" "--message-format" "json"
    Finished release [optimized] target(s) in 0.0 secs
not updating "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/.libstd.stamp"; contents equal and 1521131078.509539045s <= 1521131078.576539337s
          c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
          > StdLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
            > Libdir { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
              c Sysroot { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
            < Libdir { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
            > CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Libstd }
            < CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Libstd }
          < StdLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
        < Std { target: "x86_64-unknown-linux-gnu", compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
        c Sysroot { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
running: "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--manifest-path" "/src/rustc-1.24.1-src/src/libtest/Cargo.toml" "--message-format" "json"
    Finished release [optimized] target(s) in 0.0 secs
not updating "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0-test/x86_64-unknown-linux-gnu/release/.libtest.stamp"; contents equal and 1521131098.552624956s <= 1521131098.598625149s
        c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
        > TestLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Copying stage0 test from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
          c Libdir { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
          > CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Libtest }
          < CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Libtest }
        < TestLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
      < Test { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
      > Llvm { target: "x86_64-unknown-linux-gnu" }
      < Llvm { target: "x86_64-unknown-linux-gnu" }
      c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
      c Std { target: "x86_64-unknown-linux-gnu", compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
      c Sysroot { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
running: "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--features" " jemalloc llvm" "--manifest-path" "/src/rustc-1.24.1-src/src/rustc/Cargo.toml" "--message-format" "json"
    Finished release [optimized] target(s) in 0.2 secs
not updating "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/.librustc.stamp"; contents equal and 1521136580.448277454s <= 1521136583.688292879s
      c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" } }
      > RustcLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
        c Libdir { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
        > CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Librustc }
        < CleanTools { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", mode: Librustc }
      < RustcLink { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target_compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
    < Rustc { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
    > Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
    < Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
    c Libdir { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
    c Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
  < Assemble { target_compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
  > Rustc { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
    > Test { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
      > Std { target: "x86_64-unknown-linux-gnu", compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
        > StartupObjects { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
        < StartupObjects { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu" }
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
        c Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
        c Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
        c Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
        c Sysroot { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-gnu" } }
running: "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/src/rustc-1.24.1-src/src/libstd/Cargo.toml" "--message-format" "json"
error: process didn't exit successfully: `/src/rustc-1.24.1-src/build/bootstrap/debug/rustc -vV` (exit code: 127)
--- stderr
/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: libLLVM-4.0.so: cannot open shared object file: No such file or directory

thread 'main' panicked at 'command did not execute successfully: "/src/rustc-1.24.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/src/rustc-1.24.1-src/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101', src/bootstrap/compile.rs:886:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Traceback (most recent call last):
  File "/src/rustc-1.24.1-src/x.py", line 20, in <module>
    bootstrap.main()
  File "/src/rustc-1.24.1-src/src/bootstrap/bootstrap.py", line 758, in main
    bootstrap()
  File "/src/rustc-1.24.1-src/src/bootstrap/bootstrap.py", line 749, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/src/rustc-1.24.1-src/src/bootstrap/bootstrap.py", line 148, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /src/rustc-1.24.1-src/build/bootstrap/debug/bootstrap build -v

libLLVM-4.0.so is available, as find shows:
./build/x86_64-unknown-linux-gnu/llvm/lib/libLLVM-4.0.so ./build/x86_64-unknown-linux-gnu/llvm/lib/libLLVM-4.0.1.so ./build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-4.0.so

On my system I have clang 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions