rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.12k stars 12.69k forks source link

'Undefined reference' errors when building rustc with incremental compilation #85309

Open Aaron1011 opened 3 years ago

Aaron1011 commented 3 years ago

I've been getting the following errors (seemingly at random) while building rustc:

Updating only changed submodules
Submodules updated in 0.04 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized + debuginfo] target(s) in 0.12s
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/aaron/repos/rust/compiler/rustc_driver)
INFO rustc_codegen_llvm::back::lto 54 symbols to preserve in this crate
INFO rustc_codegen_llvm::back::lto going for that thin, thin LTO
INFO rustc_codegen_llvm::back::lto upstream or cached module "4e1tkg75h3ana9kz"
INFO rustc_codegen_llvm::back::lto upstream or cached module "1enpqhux0ohta7jr"
INFO rustc_codegen_llvm::back::lto upstream or cached module "ewe7rv6m89jl6fn"
INFO rustc_codegen_llvm::back::lto upstream or cached module "3ger21vviugcm0b6"
INFO rustc_codegen_llvm::back::lto upstream or cached module "37k3d2kw9aepjaxr"
INFO rustc_codegen_llvm::back::lto upstream or cached module "yyfy3ivjm9zsmfd"
INFO rustc_codegen_llvm::back::lto upstream or cached module "4h0aidervkzxfuw1"
INFO rustc_codegen_llvm::back::lto upstream or cached module "4ci006xrnawl9i0i"
INFO rustc_codegen_llvm::back::lto upstream or cached module "3rxat4206ylz60uw"
INFO rustc_codegen_llvm::back::lto upstream or cached module "emtaujr2mz2zlm4"
INFO rustc_codegen_llvm::back::lto upstream or cached module "57c7oxbywoz5wnmk"
INFO rustc_codegen_llvm::back::lto upstream or cached module "17e6p2wiwctevm8d"
INFO rustc_codegen_llvm::back::lto thin LTO data created
INFO rustc_codegen_llvm::back::lto thin LTO cache key map loaded
INFO rustc_codegen_llvm::back::lto prev_key_map: Some(
    ThinLTOKeysMap {
        keys: {
            "3ger21vviugcm0b6": "7CAF176A8C527D0E7A4A1B8F268A3D78D94A85F5",
            "4ci006xrnawl9i0i": "A85641EBCF091E03DA3B80F1907D3F24F53B2637",
            "4e1tkg75h3ana9kz": "A99ACD4DEADA9B31D0BFAC6240C697D738F26E3B",
            "yyfy3ivjm9zsmfd": "E1CFDF2EF22DDE1BBACA71540D416DC8A11F1ED5",
            "4h0aidervkzxfuw1": "D7FC254559F54F597D15C58F8B3386EB6F447389",
            "ewe7rv6m89jl6fn": "5FEEA32C65DD3243B3EA0B82FB1650BF5E6F2280",
            "37k3d2kw9aepjaxr": "99A1D8A0EFB1286732963F4175D57A9A00488F5C",
            "57c7oxbywoz5wnmk": "E18CEACD83EBC25300036C9C696FF3BEE43042B9",
            "emtaujr2mz2zlm4": "47781413C361780A6FDB2511607112513A7312BE",
            "1enpqhux0ohta7jr": "7B44CA2AFEE11C9780825707D0107D904C4E2356",
            "17e6p2wiwctevm8d": "A2D3AC69457BAFDC87791660D3E761EC07EC3489",
            "3rxat4206ylz60uw": "615FB54C3A170A481838020A9A0AE0473BD287E8",
        },
    },
)
INFO rustc_codegen_llvm::back::lto curr_key_map: ThinLTOKeysMap {
    keys: {
        "3ger21vviugcm0b6": "7CAF176A8C527D0E7A4A1B8F268A3D78D94A85F5",
        "4ci006xrnawl9i0i": "A85641EBCF091E03DA3B80F1907D3F24F53B2637",
        "4e1tkg75h3ana9kz": "A99ACD4DEADA9B31D0BFAC6240C697D738F26E3B",
        "yyfy3ivjm9zsmfd": "E1CFDF2EF22DDE1BBACA71540D416DC8A11F1ED5",
        "4h0aidervkzxfuw1": "D7FC254559F54F597D15C58F8B3386EB6F447389",
        "ewe7rv6m89jl6fn": "5FEEA32C65DD3243B3EA0B82FB1650BF5E6F2280",
        "37k3d2kw9aepjaxr": "99A1D8A0EFB1286732963F4175D57A9A00488F5C",
        "57c7oxbywoz5wnmk": "E18CEACD83EBC25300036C9C696FF3BEE43042B9",
        "emtaujr2mz2zlm4": "47781413C361780A6FDB2511607112513A7312BE",
        "1enpqhux0ohta7jr": "7B44CA2AFEE11C9780825707D0107D904C4E2356",
        "17e6p2wiwctevm8d": "A2D3AC69457BAFDC87791660D3E761EC07EC3489",
        "3rxat4206ylz60uw": "615FB54C3A170A481838020A9A0AE0473BD287E8",
    },
}
INFO rustc_codegen_llvm::back::lto checking which modules can be-reused and which have to be re-optimized.
INFO rustc_codegen_llvm::back::lto  - 4e1tkg75h3ana9kz: re-used
INFO rustc_codegen_llvm::back::lto  - 1enpqhux0ohta7jr: re-used
INFO rustc_codegen_llvm::back::lto  - ewe7rv6m89jl6fn: re-used
INFO rustc_codegen_llvm::back::lto  - 3ger21vviugcm0b6: re-used
INFO rustc_codegen_llvm::back::lto  - 37k3d2kw9aepjaxr: re-used
INFO rustc_codegen_llvm::back::lto  - yyfy3ivjm9zsmfd: re-used
INFO rustc_codegen_llvm::back::lto  - 4h0aidervkzxfuw1: re-used
INFO rustc_codegen_llvm::back::lto  - 4ci006xrnawl9i0i: re-used
INFO rustc_codegen_llvm::back::lto  - 3rxat4206ylz60uw: re-used
INFO rustc_codegen_llvm::back::lto  - emtaujr2mz2zlm4: re-used
INFO rustc_codegen_llvm::back::lto  - 57c7oxbywoz5wnmk: re-used
INFO rustc_codegen_llvm::back::lto  - 17e6p2wiwctevm8d: re-used
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.17e6p2wiwctevm8d.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.1enpqhux0ohta7jr.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.37k3d2kw9aepjaxr.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.3ger21vviugcm0b6.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.3rxat4206ylz60uw.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.4ci006xrnawl9i0i.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.4e1tkg75h3ana9kz.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.4h0aidervkzxfuw1.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.57c7oxbywoz5wnmk.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.emtaujr2mz2zlm4.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.ewe7rv6m89jl6fn.rcgu.o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.yyfy3ivjm9zsmfd.rcgu.o" "-o" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-ca4cbbcd840b65c9.so" "-Wl,--version-script=/tmp/rustcPyau36/list" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-ca4cbbcd840b65c9.11drn0e4xmqp66mq.rcgu.o" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/psm-9023676894f3f512/out" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-4da3886e843ddccf/out" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_error_codes-ad31f4f48ad38df3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_save_analysis-f8b16ba164cdff59.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librls_data-3c27807685eccce8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librls_span-66cc09d4287eb23c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_interface-265011a54df17456.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_codegen_llvm-f15f5ddffe46b96c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_llvm-fd1261ac0285f72f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libchalk_engine-680ab5a2c3038d0a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libchalk_solve-9c19f6a2c3a0c2b8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing_tree-9e0235f33d76b3db.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing_subscriber-e6bbffda4d0c18f5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libchrono-a97c64d4e040480c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libnum_integer-8ea934b963fa7acb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libnum_traits-fe8ec79457c84be5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libsharded_slab-a6b6614ba44faec7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing_serde-2ed4b3470389271f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libserde_json-7dd4df03e53ac8f0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libryu-85456117cecc3079.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libitoa-bed792a17ad9cd64.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing_log-cdaa6e733b9b42c3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libansi_term-3d5f990144d42b5f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libmatchers-e20c6501b104c668.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libregex_automata-81c5c11afb43fc6c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libbyteorder-0b90754ab32b9cce.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpetgraph-14be22b5f01ccaac.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libfixedbitset-2e8240aa3536eb44.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_privacy-b1ad1111bcaea690.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_builtin_macros-0e077a60ddd7f88a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_typeck-43e9783b14db00bb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_ty_utils-44ecb21de5eb197d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_resolve-64e9b14307462b81.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_ast_lowering-544f6ad82fdc6d37.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_query_impl-41a286aca58d4841.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_passes-4c89392f9340c5c0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_mir_build-f325d6a75aa689fe.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_mir-dff9bab0769715d2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libgsgdt-ee74aed575a53f52.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libserde-150b46a6fd20a684.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libregex-8f9eaabf0d8c9b98.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libthread_local-95a2ae9020b659d4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libregex_syntax-e38c7c96ca3baade.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libaho_corasick-178a3bfe4bcee9b4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libmemchr-1d1ba1b25f10ea47.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_codegen_ssa-a6b09d8bf1df23fa.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_symbol_mangling-a5ee09b003a8ac87.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_demangle-b55d4698b8652689.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpunycode-f6ec06d57bfaa606.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_incremental-4559ffd15c54d7ae.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand-90884f138babc884.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand_chacha-ed47b72222e040c0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand_core-c4e1def9feb1a82e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libgetrandom-7fd4239df11c496b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpathdiff-ebec1ace860d5163.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libobject-cfe82e238e99490a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libcc-12a53ff8d9d6cb62.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_plugin_impl-e4cf30225e177a0e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_metadata-65b3e26e741c6237.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_hir_pretty-6b470c3beeeac8ff.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libsnap-e9448dbb5b4951e6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_expand-c43ff14200fd75ee.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_ast_passes-9c2b023dfb95b1d3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libitertools-b649a25bcadd3985.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libeither-c4ed39d2370eb5c9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_parse-c4e4c65ff5ee1cd6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libproc_macro-98248c81062a3fec.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_lint-a9101ed9576d3bef.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libunicode_security-a999844d8cb05710.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libunicode_script-df7417b9f6ce8942.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libunicode_normalization-70cd8ffe2167bbf3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtinyvec-ced60a9cf66809ff.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_trait_selection-ed114e05e770bba5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_parse_format-3b04402af0df16bb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_infer-c43a3b67aa1dd661.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_middle-7c2d418fad1a7fc8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libchalk_ir-fbacf2e845d93f90.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_type_ir-1545e64ea97b6ba5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_apfloat-2389a203a7e6f60c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpolonius_engine-f8a8d8942115c270.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libdatafrog-759be42d2799a839.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_attr-a223dba5c8b7f45d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_ast_pretty-77612f6b51b63a89.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_query_system-c40f60aff92358a4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_hir-50e5733f721a4452.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_session-762342740a6009a2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libnum_cpus-5ce1f2c37df138ab.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libgetopts-74655b8a38cfe97e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_fs_util-28a4838dc0dad40b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_feature-99039100fab6188f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_errors-ceacccb6e47e9771.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtermize-0035f8630b8c1d2c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libatty-3ad46294e38b7699.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libannotate_snippets-11536cf1eff4a4df.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtermcolor-df8f3ae4c8d00082.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_lint_defs-7739461df0407c77.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_target-9e8695dec79ec1f0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_ast-2da49c74d163ede3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_lexer-88274b1501a2a230.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libunicode_xid-7a6ef0e089f7011b.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_span-d873f921caac0ac4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libscoped_tls-1d0e91e83631b709.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libsha2-b6a8b3fcc65d0a0c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libsha1-0acabff1bb1be278.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libcpuid_bool-62b8d8e333ed60e7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libmd5-4dd27817f343ab9e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libopaque_debug-1c80af5fa30821cc.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libblock_buffer-6b09373f298f25a0.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libdigest-d93616403a3ba407.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libgeneric_array-a919cfdb29e73d30.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtypenum-fd8e6fe3e06b461d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libunicode_width-2fe78d7daa3b2631.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_arena-ab4689ba30114a54.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_data_structures-0ceaf065d4035fd3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libstacker-a59a42483cfab0c4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpsm-2d7c37c8847d79ab.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libmemmap2-71dfa02d50342b97.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtempfile-9499690d8489030d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand-8abc674f2fab0209.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand_chacha-46a19e6934b27bb5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libppv_lite86-3479bd585617daad.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librand_core-e55a7efe1f59cef5.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libgetrandom-00ffa9eeee693df4.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libremove_dir_all-49a195770e503514.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libmeasureme-6055574cdfd55af9.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libparking_lot-0e582ff537d7eea8.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libparking_lot_core-602b26c8411e761f.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/liblock_api-4a6b326ff0f0fcd6.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libscopeguard-b2444a94e9518381.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libinstant-0b122d1095329937.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libena-0e556f43ed9595e7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/liblog-8094dc94efc85916.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libstable_deref_trait-e2efef11f1948cb7.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_graphviz-5cf3dd7dea3de01c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libjobserver-6d42cbe962e5c92d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/liblibc-81f73ad31f41c1f2.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_hash-602704db6e14812a.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_index-dd7468adda250649.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/librustc_serialize-9e97f1dc949a5224.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libindexmap-1a5fdacb9fadaf9c.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libhashbrown-1a16973f13cbd2db.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libsmallvec-b7fbc0a8181d0232.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libarrayvec-955264862be27c02.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libcfg_if-ad4efcf3c7691091.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libbitflags-55547b23f1d3a4c3.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing-91a3a54e5a567181.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libpin_project_lite-2e66a693ea88bb88.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libtracing_core-39f3848ef3a6c181.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/liblazy_static-054d0aec12b8da9e.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcPyau36/libcfg_if-bed5ed78b07b6418.rlib" "-Wl,--no-whole-archive" "-Wl,--start-group" "-L" "/home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lstd-94df7273bec49227" "-Wl,--end-group" "-Wl,-Bstatic" "/tmp/rustcPyau36/libcompiler_builtins-fb6d3210dc7eabc8.rlib" "-Wl,-Bdynamic" "-lLLVM-12-rust-1.54.0-nightly" "-lstdc++" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,-rpath,$ORIGIN/../lib"
  = note: /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o): in function `core::ptr::drop_in_place<chalk_ir::Binders<chalk_ir::DomainGoal<rustc_middle::traits::chalk::RustInterner>>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o):/home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: more undefined references to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689' follow
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o): in function `core::ptr::drop_in_place<core::iter::adapters::map::Map<alloc::vec::into_iter::IntoIter<chalk_ir::GenericArg<rustc_middle::traits::chalk::RustInterner>>,chalk_ir::Substitution<rustc_middle::traits::chalk::RustInterner>::from_iter<chalk_ir::GenericArg<rustc_middle::traits::chalk::RustInterner>,alloc::vec::Vec<chalk_ir::GenericArg<rustc_middle::traits::chalk::RustInterner>>>::{{closure}}>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr129drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$chalk_ir..GenericArg$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$GT$17he06387f1481bef7dE.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr129drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$chalk_ir..GenericArg$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$GT$17he06387f1481bef7dE.llvm.2369665957084634689'
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o): in function `core::ptr::drop_in_place<core::option::Option<chalk_ir::DomainGoal<rustc_middle::traits::chalk::RustInterner>>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o): in function `core::ptr::drop_in_place<core::iter::adapters::map::Map<core::iter::adapters::flatten::FlatMap<core::iter::adapters::take::Take<alloc::vec::into_iter::IntoIter<chalk_solve::rust_ir::AdtVariantDatum<rustc_middle::traits::chalk::RustInterner>>>,core::option::Option<chalk_ir::Ty<rustc_middle::traits::chalk::RustInterner>>,chalk_solve::clauses::builtin_traits::sized::push_adt_sized_conditions<rustc_middle::traits::chalk::RustInterner>::{{closure}}>,chalk_solve::clauses::builtin_traits::needs_impl_for_tys<rustc_middle::traits::chalk::RustInterner,core::iter::adapters::flatten::FlatMap<core::iter::adapters::take::Take<alloc::vec::into_iter::IntoIter<chalk_solve::rust_ir::AdtVariantDatum<rustc_middle::traits::chalk::RustInterner>>>,core::option::Option<chalk_ir::Ty<rustc_middle::traits::chalk::RustInterner>>,chalk_solve::clauses::builtin_traits::sized::push_adt_sized_conditions<rustc_middle::traits::chalk::RustInterner>::{{closure}}>>::{{closure}}>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr475drop_in_place$LT$core..iter..adapters..flatten..FlatMap$LT$core..iter..adapters..take..Take$LT$alloc..vec..into_iter..IntoIter$LT$chalk_solve..rust_ir..AdtVariantDatum$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$GT$$C$core..option..Option$LT$chalk_ir..Ty$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$C$chalk_solve..clauses..builtin_traits..sized..push_adt_sized_conditions$LT$rustc_middle..traits..chalk..RustInterner$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17heea317c75101505cE.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr475drop_in_place$LT$core..iter..adapters..flatten..FlatMap$LT$core..iter..adapters..take..Take$LT$alloc..vec..into_iter..IntoIter$LT$chalk_solve..rust_ir..AdtVariantDatum$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$GT$$C$core..option..Option$LT$chalk_ir..Ty$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$C$chalk_solve..clauses..builtin_traits..sized..push_adt_sized_conditions$LT$rustc_middle..traits..chalk..RustInterner$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17heea317c75101505cE.llvm.2369665957084634689'
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.58nqbwzhypt1oykn.rcgu.o): in function `core::ptr::drop_in_place<core::option::Option<chalk_ir::DomainGoal<rustc_middle::traits::chalk::RustInterner>>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E.llvm.2369665957084634689'
          /usr/sbin/ld: /tmp/rustcPyau36/librustc_traits-28633626e075ccd2.rlib(rustc_traits-28633626e075ccd2.5n0pwv63ojntlql.rcgu.o): in function `core::ptr::drop_in_place<chalk_ir::InEnvironment<chalk_ir::Constraint<rustc_middle::traits::chalk::RustInterner>>>':
          /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..Constraint$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17h60cb03661341c54dE.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/library/core/src/ptr/mod.rs:192: undefined reference to `_ZN4core3ptr90drop_in_place$LT$chalk_ir..Constraint$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17h60cb03661341c54dE.llvm.2369665957084634689'
          /usr/sbin/ld: /home/aaron/repos/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-ca4cbbcd840b65c9.so: hidden symbol `_ZN4core3ptr475drop_in_place$LT$core..iter..adapters..flatten..FlatMap$LT$core..iter..adapters..take..Take$LT$alloc..vec..into_iter..IntoIter$LT$chalk_solve..rust_ir..AdtVariantDatum$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$GT$$C$core..option..Option$LT$chalk_ir..Ty$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$$C$chalk_solve..clauses..builtin_traits..sized..push_adt_sized_conditions$LT$rustc_middle..traits..chalk..RustInterner$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17heea317c75101505cE.llvm.2369665957084634689' isn't defined
          /usr/sbin/ld: final link failed: bad value
          collect2: error: ld returned 1 exit status
Aaron1011 commented 3 years ago

The post https://lists.llvm.org/pipermail/llvm-bugs/2016-November/052080.html looks very similar - we're compiling with ThinLTO, and the pre-LTO bitcode for the affected module contains a switch:

; Function Attrs: nonlazybind uwtable
define internal fastcc void @"_ZN4core3ptr90drop_in_place$LT$chalk_ir..DomainGoal$LT$rustc_middle..traits..chalk..RustInterner$GT$$GT$17hc2fab4088400a657E"(%"chalk_ir::DomainGoal<rustc_middle::traits::ChalkRustInterner>"* %0) unnamed_addr #1 !dbg !3222 {
  %2 = getelementptr %"chalk_ir::DomainGoal<rustc_middle::traits::ChalkRustInterner>", %"chalk_ir::DomainGoal<rustc_middle::traits::ChalkRustInterner>"* %0, i64 0, i32 0, i64 0, !dbg !3223
  %3 = load i32, i32* %2, align 8, !dbg !3223, !range !3224
  %4 = zext i32 %3 to i64, !dbg !3223
  switch i64 %4, label %5 [
    i64 0, label %6
    i64 1, label %22
    i64 2, label %33
    i64 3, label %44
    i64 4, label %47
    i64 5, label %50
    i64 6, label %53
    i64 7, label %56
    i64 9, label %59
  ], !dbg !3223

However, the reproduction instructions in that post don't trigger a crash for me - it compiles successfully. Additionally, the issue in that thread was deterministic (without any caching involved), while this issue happens intermittently.

Aaron1011 commented 3 years ago

The LLVM bug is https://bugs.llvm.org/show_bug.cgi?id=31052, and was apparently fixed in https://reviews.llvm.org/D26880 (https://github.com/llvm/llvm-project/commit/185b4ab6d4435be5804272587a0871b38a7eef08).

petrochenkov commented 2 years ago

Just got this error while linking rustc_driver with incremental enabled (not for the first time).

  = note: ld.lld: error: undefined symbol: anon.91c2f56426c5022640e519f02889d07d.8.llvm.746630307250149404
          >>> referenced by C:\msys64\home\we\rust\library\core\src/option.rs:0
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.1brnvk2mjzqx5b9n.rcgu.o):(rustc_resolve::macros::registered_idents)
          >>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_fn_like_elision::{closure#9}>)
          >>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#6}>)
          >>> referenced 30 more times

          ld.lld: error: undefined symbol: anon.91c2f56426c5022640e519f02889d07d.9.llvm.746630307250149404
          >>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_fn_like_elision::{closure#9}>)
          >>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#6}>)
          >>> referenced by C:\msys64\home\we\rust\library\alloc\src\vec/mod.rs:425
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.2u8t3u4aqh8idzl4.rcgu.o):(<rustc_resolve::late::lifetimes::LifetimeContext>::with::<<rustc_resolve::late::lifetimes::LifetimeContext>::visit_segment_args::{closure#7}>)
          >>> referenced 30 more times

          ld.lld: error: undefined symbol: core::ptr::drop_in_place::<rustc_span::FileName> (.llvm.1438190246702246187)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:0
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.4391tludo7n7dv8i.rcgu.o):(core::ptr::drop_in_place::<rustc_span::SpanSnippetError>)
          >>> referenced 9 more times

          ld.lld: error: undefined symbol: core::ptr::drop_in_place::<(rustc_span::FileName, rustc_span::BytePos)> (.llvm.1438190246702246187)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.3bc39m1okvl6wof.rcgu.o):(<&mut <rustc_resolve::Resolver>::check_unused::{closure#0} as core::ops::function::FnMut<(&rustc_span::span_encoding::Span,)>>::call_mut)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.4391tludo7n7dv8i.rcgu.o):(core::ptr::drop_in_place::<rustc_span::SpanSnippetError>)
          >>> referenced by C:\msys64\home\we\rust\library\core\src\ptr/mod.rs:188
          >>>               librustc_resolve-fac19ceb16326411.rlib(rustc_resolve-fac19ceb16326411.5327cotcw21h0vj4.rcgu.o):(core::ptr::drop_in_place::<core::result::Result<alloc::string::String, rustc_span::SpanSnippetError>>)
          >>> referenced 2 more times
          collect2.exe: error: ld returned 1 exit status
petrochenkov commented 2 years ago

cc https://github.com/rust-lang/rust/issues/81280 https://github.com/rust-lang/rust/issues/86049