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

build broken, rustc_driver fails to link (with llvm?) #82839

Closed
matthiaskrgr opened this issue Mar 6, 2021 · 7 comments
Closed

build broken, rustc_driver fails to link (with llvm?) #82839

matthiaskrgr opened this issue Mar 6, 2021 · 7 comments
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

@matthiaskrgr
Copy link
Member

The repo is at 51748a8
I'm using clang 11.1.0 and sccache to build.
I already tried a clean rebuild (of llvm+rustc) but that didn't help.
I can try to do a sccache-less build next but I'm not sure if it will make a difference.

   Compiling rustc_driver v0.0.0 (/home/matthias/vcs/github/rust/compiler/rustc_driver)
error: linking with `cc` failed: exit code: 1
...

  = note: /usr/bin/ld: /home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-12-rust-dev.so: __morestack: invalid needed version 2
          /usr/bin/ld: /home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-12-rust-dev.so: error adding symbols: bad value
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `rustc_driver`

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--features" " llvm max_level_info" "--manifest-path" "/home/matthias/vcs/github/rust/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
failed to run: /home/matthias/vcs/github/rust/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:01:36
Backtrace

Updating only changed submodules
Submodules updated in 0.06 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.30s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.31s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling rustc_driver v0.0.0 (/home/matthias/vcs/github/rust/compiler/rustc_driver)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-8a4e692bfe6731a9.rustc_driver.118v6stn-cgu.0.rcgu.o" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-8a4e692bfe6731a9.rustc_driver.118v6stn-cgu.1.rcgu.o" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-8a4e692bfe6731a9.rustc_driver.118v6stn-cgu.2.rcgu.o" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-8a4e692bfe6731a9.rustc_driver.118v6stn-cgu.3.rcgu.o" "-o" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-8a4e692bfe6731a9.so" "-Wl,--version-script=/tmp/rustcKWpRFt/list" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-8a4e692bfe6731a9.1hgshg3cxrlhudyx.rcgu.o" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/psm-ce575543779f6829/out" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-2b8944c4df3e12e2/out" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_error_codes-c87e3d5ac793ee35.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_save_analysis-79f3e7026830c358.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librls_data-271e5744e599b199.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librls_span-5b706634921bf70f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_interface-b2d6e5a6988bedbf.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_codegen_llvm-72e6347ceb466df3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_llvm-c2e1008c0a09c820.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_ty_utils-76929eaaa3440c39.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_traits-cb901472ea65a083.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libchalk_engine-aa5879920a24b24d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libchalk_solve-3da06f260cc478df.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing_tree-1fe178bebeaa5fdc.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing_subscriber-de53c01dd8a70b2e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libchrono-efb6d71c512cbef6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libnum_integer-e40400ea458afd1f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libnum_traits-553c553692257cbb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libsharded_slab-49f8651e45564f62.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing_serde-6869aa3f682e893d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libserde_json-118fc88acd0aebf7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libryu-8a6faee8413e2e99.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libitoa-d1d5e01c95c0e190.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing_log-245941a857c512a1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libansi_term-af9b938b994f469c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmatchers-351300adabc454b6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libregex_automata-4ca3b8b7cb682793.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libbyteorder-f0318d61775de3f1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpetgraph-96782e04adc0acb7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libfixedbitset-871e3ea915edabdf.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_privacy-3399f38309fa3a12.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_builtin_macros-fed6208846affaed.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_typeck-6f8222a3e9c1058e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_resolve-1c92d43afc4b86cf.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_ast_lowering-bf4ef74f6030fcdd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_query_impl-06615d36f1a01a94.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_passes-a71e10c66700ee54.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_mir_build-f939e51d1ab81ee0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_mir-38ca578f8c6afde9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libgsgdt-28a3530d0ee8cd1d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libserde-6d320828d7ca8e35.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libregex-36f462e54524191b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libthread_local-4aae3e4636378654.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libregex_syntax-2bebc5e3bf839d13.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libaho_corasick-f9363b0a27f97ef8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmemchr-01e1d7418bf753b3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_codegen_ssa-c61b2c3454cba99f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_symbol_mangling-58c6c38ce837707b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_demangle-ea536d224ed95fa6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpunycode-944ef0fe97f04246.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_incremental-ef91e16cd9155a3e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpathdiff-6f14fdec609aff9a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcc-bf9f5b4f4f928daf.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_plugin_impl-33e8506081dfb95c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_metadata-24ecf71972ce3ddd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmemmap-9d00f7f3be0d5498.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_hir_pretty-459507ed8e63c595.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libsnap-6c890d769a2df980.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_expand-df50308126af8053.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_ast_passes-f5bd3f12fea22a82.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libitertools-b4c72a45a2149324.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libeither-d1bc76e50e77f042.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_parse-2e88474c383ec979.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libproc_macro-68b267e36468a10d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_lint-ac6053037c621f4c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libunicode_security-448a01014c3a571d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libunicode_script-f52c949a5247cb90.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libunicode_normalization-b4dd183fba92a91f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtinyvec-745218022b7ec94b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_trait_selection-84ab237fa320ef44.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_parse_format-c9a5d7674e5cded3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_infer-8d7eeb69054fddb2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_middle-e6b9a1d2cf641b1a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_rayon_core-4b38a042c145ccc3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcrossbeam_queue-94ab3b2b5480046a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcrossbeam_utils-a9d6770c3449bd05.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcrossbeam_deque-0f8901ec43d9a39f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcrossbeam_epoch-39e32a32f553b2a9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmemoffset-3f3982842b101023.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcrossbeam_utils-59938035e0af0c91.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmaybe_uninit-862714ff17b6e9ba.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libchalk_ir-7eac3e836f65e826.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_type_ir-12c6e801065f8a7a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_apfloat-26d38b2c0b7e5ba0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpolonius_engine-eafbb5e98882647a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libdatafrog-48636ca9c0e75cbd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_attr-c2f36e8108c8facc.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_ast_pretty-38e812f6c9165632.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_query_system-9064475601fa06fd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_hir-924ae9a03ba52988.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_session-f2cf1f3016927366.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libnum_cpus-6439dd71e246f9a7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libgetopts-147d27c382bb312e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_fs_util-952dbdafcdf8abff.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_feature-5db5d0bedaa7f246.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_errors-33871b0fefd13eb8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtermize-ca35ab4a378393ed.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libatty-37e5309e5234b6ad.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libannotate_snippets-f2b21c7005202a2d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtermcolor-a6b85a8fb70b1c0d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_lint_defs-2d18dc1dc4f3a811.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_target-8ee65045f65fd06b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_ast-556842d0929818df.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_lexer-66d72ace3d25f9b5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libunicode_xid-7c3db495c37329d5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_span-4ae6ac0357eebc6d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libscoped_tls-a963bf0eb6e5add9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libsha2-062cfcec50a2bcd1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libsha1-589e4e219cb22066.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcpuid_bool-c78845d5235d044f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmd5-1a4312498fc661f9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libopaque_debug-941a539a07a25e4f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libblock_buffer-1542cebd5be24f44.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libdigest-7cb2ba9c3db7f5b0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libgeneric_array-ee3f74482474af88.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtypenum-841617d77b76fe15.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libunicode_width-2388ccf7eb45d654.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_arena-11060237e56c0355.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_data_structures-b32e1a39b8a36b80.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libstacker-047b0541a77cf0b2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpsm-6c32f7fa56dcb2e4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtempfile-e902de1f15e3d8ed.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librand-25b230f7928062ca.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librand_chacha-964c838d8e136362.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libppv_lite86-1cfbe6875faa08e7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librand_core-57c853c1ea641cd6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libgetrandom-ea91e5f5fb90be86.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libremove_dir_all-f0631eb4e4412da7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libmeasureme-9c216814255470ae.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libparking_lot-a0ded4bf9d6738a2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libparking_lot_core-16c3cb228504dc0d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/liblock_api-67c531d5a58cbd55.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libscopeguard-ef852dd0090c34ef.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libinstant-1aea07bd2b820bd1.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libena-bf608237dd1f8b36.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/liblog-fc44c631fc2bdd61.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libstable_deref_trait-badd46b3c2660d03.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_graphviz-f78b77a37e9e57d3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libjobserver-6e808eb2a3b73606.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/liblibc-e9e91a2c8a0bbdc9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_hash-8ade21fc9fcbeba7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_index-85faaed310c1aa87.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/librustc_serialize-3fa4c1f26e2b1c9e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libindexmap-4fa5b020f93b6b00.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libhashbrown-fe535110b901fb79.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libsmallvec-8644906fdc153bc4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libarrayvec-dac3f8a90fa8a082.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcfg_if-1f771992d75cf5f5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libbitflags-68c54623cd4ecfc0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing-481a9a4e7ca07611.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libpin_project_lite-277eed2438941437.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libtracing_core-5949046fb0b41a09.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/liblazy_static-f1e5bbc91181b6a3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcKWpRFt/libcfg_if-757e31c653cf467c.rlib" "-Wl,--no-whole-archive" "-Wl,--start-group" "-L" "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lstd-234ccdde557f9b78" "-Wl,--end-group" "-Wl,-Bstatic" "/tmp/rustcKWpRFt/libcompiler_builtins-47f2bf3e3cd164ed.rlib" "-Wl,-Bdynamic" "-lLLVM-12-rust-dev" "-lstdc++" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,-rpath,$ORIGIN/../lib"
  = note: /usr/bin/ld: /home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-12-rust-dev.so: __morestack: invalid needed version 2
          /usr/bin/ld: /home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVM-12-rust-dev.so: error adding symbols: bad value
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `rustc_driver`

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--features" " llvm max_level_info" "--manifest-path" "/home/matthias/vcs/github/rust/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
failed to run: /home/matthias/vcs/github/rust/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:01:36

@nikic
Copy link
Contributor

nikic commented Mar 6, 2021

I believe the current known workarounds for this are 1. use gcc or clang 10 or older, or 2. use lld for linking.

@JohnTitor JohnTitor added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 6, 2021
@matthiaskrgr
Copy link
Member Author

Can confirm that using lld "fixes" this.

@aaronpuchert
Copy link

Seems to me like an issue in lld. I've opened bug 49915 for this.

@aaronpuchert
Copy link

Just for reference, here is the proposed fix: https://reviews.llvm.org/D100624.

@aaronpuchert
Copy link

The bug has been fixed, the fix will be in LLVM 12.0.1.

@jyn514
Copy link
Member

jyn514 commented Aug 20, 2021

@matthiaskrgr are you still hitting this now that LLVM 12 is merged?

@Mark-Simulacrum
Copy link
Member

Going to go ahead and close as fixed -- we're now requiring LLVM 12+ to build rustc.

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

No branches or pull requests

6 participants