Closed
Description
I tried this code: ./configure --set profile=compiler --set rust.download-rustc=true && x t tests/ui-fulldeps/ --target i686-unknown-linux-gnu --run never
(--run never
is to avoid #110225).
I expected to see this happen: All tests pass.
Instead, this happened: Some tests fail (the same ones as in #110225):
failures:
[ui] tests/ui-fulldeps/deriving-encodable-decodable-box.rs
[ui] tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs
[ui] tests/ui-fulldeps/issue-14021.rs
[ui] tests/ui-fulldeps/compiler-calls.rs
[ui] tests/ui-fulldeps/stable-mir/crate-info.rs
[ui] tests/ui-fulldeps/mod_dir_path_canonicalized.rs
[ui] tests/ui-fulldeps/pprust-expr-roundtrip.rs
test result: FAILED. 63 passed; 7 failed; 1 ignored; 0 measured; 0 filtered out; finished in 3.86s
The failures look like
---- [ui] tests/ui-fulldeps/pprust-expr-roundtrip.rs stdout ----
error: test compilation failed although it shouldn't!
status: exit status: 1
command: "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/home/jyn/src/rust2/tests/ui-fulldeps/pprust-expr-roundtrip.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/home/jyn/.local/bin:/home/jyn/.local/lib/cargo/bin:/home/jyn/src/dotfiles/bin:/home/jyn/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcdeJQFz/symbols.o" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/pprust-expr-roundtrip.pprust_expr_roundtrip.f72f72b5-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/auxiliary" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lrustc_driver-678dead588f20b29" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-b5096806ff948049" "-Wl,-Bstatic" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-35b8a4bd2de4e62e.rlib" "-Wl,-Bdynamic" "-lLLVM-16-rust-1.70.0-nightly" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/pprust-expr-roundtrip/pprust-expr-roundtrip" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" "-Wl,-rpath,$ORIGIN/../../../stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "-Wl,-z,origin"
= note: /usr/bin/ld: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-678dead588f20b29.so: undefined reference to `LLVMInitializeLoongArchAsmPrinter@LLVM_16'
/usr/bin/ld: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-678dead588f20b29.so: undefined reference to `LLVMInitializeLoongArchAsmParser@LLVM_16'
/usr/bin/ld: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-678dead588f20b29.so: undefined reference to `LLVMInitializeLoongArchTargetInfo@LLVM_16'
/usr/bin/ld: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-678dead588f20b29.so: undefined reference to `LLVMInitializeLoongArchTarget@LLVM_16'
/usr/bin/ld: /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_driver-678dead588f20b29.so: undefined reference to `LLVMInitializeLoongArchTargetMC@LLVM_16'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: aborting due to previous error
------------------------------------------
I think we need to rebuild LLVM from source when cross-compiling, we can't use the downloaded version.
I'm unsure if this is related specifically to download-rustc
or whether download-ci-llvm
affects it too; I had both enabled.
Meta
HEAD is branched from 9be9b5e.