-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Description
C:\py\j\hello_rust>rustc -Vv
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: i686-pc-windows-gnu
release: 1.46.0
LLVM version: 10.0
I ran this command in order to use the included rust-lld linker:
C:\py\j\hello_rust>set CARGO_TARGET_I686_PC_WINDOWS_GNU_LINKER=rust-lld
Then, I tried to build my Cargo hello world project and here are the results:
C:\py\j\hello_rust>cargo build
Compiling hello_rust v0.1.0 (C:\py\j\hello_rust)
error: linking with `rust-lld` failed: exit code: 1
|
= note: "rust-lld" "-flavor" "gnu" "C:\\rust\\rustup\\toolchains\\stable-i686-
pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\self-contained\\crt2.o"
"C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc
-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\rust\\rustup\\toolchains\\stable-i686-pc
-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib" "-L" "C:\\rust\\rustup\\to
olchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\se
lf-contained" "C:\\py\\j\\hello_rust\\target\\debug\\deps\\hello_rust-279abe0508
1936aa.2zw63tsskilccwc6.rcgu.o" "C:\\py\\j\\hello_rust\\target\\debug\\deps\\hel
lo_rust-279abe05081936aa.4dhg8t1cjkw8md0h.rcgu.o" "C:\\py\\j\\hello_rust\\target
\\debug\\deps\\hello_rust-279abe05081936aa.58gt8py3qm1dgrz1.rcgu.o" "C:\\py\\j\\
hello_rust\\target\\debug\\deps\\hello_rust-279abe05081936aa.bginw74pvbx0dl9.rcg
u.o" "C:\\py\\j\\hello_rust\\target\\debug\\deps\\hello_rust-279abe05081936aa.g7
scjmtccrgkrgh.rcgu.o" "C:\\py\\j\\hello_rust\\target\\debug\\deps\\hello_rust-27
9abe05081936aa.pc9r2fex9ayk3br.rcgu.o" "-o" "C:\\py\\j\\hello_rust\\target\\debu
g\\deps\\hello_rust-279abe05081936aa.exe" "C:\\py\\j\\hello_rust\\target\\debug\
\deps\\hello_rust-279abe05081936aa.4dlwa79zjyk7oop1.rcgu.o" "--gc-sections" "-L"
"C:\\py\\j\\hello_rust\\target\\debug\\deps" "-L" "C:\\rust\\rustup\\toolchains
\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib" "--start-g
roup" "-Bstatic" "C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\
\rustlib\\i686-pc-windows-gnu\\lib\\libstd-e4e40256d0c086c9.rlib" "C:\\rust\\rus
tup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\
lib\\libpanic_unwind-8e02fc67161a7d8f.rlib" "C:\\rust\\rustup\\toolchains\\stabl
e-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\libhashbrown-3380
4d6248981d68.rlib" "C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\li
b\\rustlib\\i686-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-057cb2a83ed8d
602.rlib" "C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustli
b\\i686-pc-windows-gnu\\lib\\libbacktrace-951976a2e108e12f.rlib" "C:\\rust\\rust
up\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\l
ib\\libbacktrace_sys-91e9eefa1109c155.rlib" "C:\\rust\\rustup\\toolchains\\stabl
e-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\librustc_demangle
-bf0cbd257613d152.rlib" "C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gn
u\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\libunwind-c34988a92fa8dc0e.rlib" "C:\
\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-win
dows-gnu\\lib\\libcfg_if-17273c5475206f25.rlib" "C:\\rust\\rustup\\toolchains\\s
table-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\liblibc-fb8ee
cdcaa771961.rlib" "C:\\rust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib
\\rustlib\\i686-pc-windows-gnu\\lib\\liballoc-5cf9e879ba55ea4b.rlib" "C:\\rust\\
rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gn
u\\lib\\librustc_std_workspace_core-e16b6d2c85c40d6b.rlib" "C:\\rust\\rustup\\to
olchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\li
bcore-b978dcbc96dc6d47.rlib" "--end-group" "C:\\rust\\rustup\\toolchains\\stable
-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windows-gnu\\lib\\libcompiler_builti
ns-c6570c2846c80c80.rlib" "-Bdynamic" "-ladvapi32" "-lws2_32" "-luserenv" "C:\\r
ust\\rustup\\toolchains\\stable-i686-pc-windows-gnu\\lib\\rustlib\\i686-pc-windo
ws-gnu\\lib\\rsend.o"
= note: rust-lld: error: C:\rust\rustup\toolchains\stable-i686-pc-windows-gnu\
lib\rustlib\i686-pc-windows-gnu\lib\self-contained\crt2.o: unknown file type
rust-lld: error: C:\rust\rustup\toolchains\stable-i686-pc-windows-gnu\
lib\rustlib\i686-pc-windows-gnu\lib\rsbegin.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.2zw63tsskilccwc6.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.4dhg8t1cjkw8md0h.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.58gt8py3qm1dgrz1.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.bginw74pvbx0dl9.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.g7scjmtccrgkrgh.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.pc9r2fex9ayk3br.rcgu.o: unknown file type
rust-lld: error: C:\py\j\hello_rust\target\debug\deps\hello_rust-279ab
e05081936aa.4dlwa79zjyk7oop1.rcgu.o: unknown file type
rust-lld: error: C:\rust\rustup\toolchains\stable-i686-pc-windows-gnu\
lib\rustlib\i686-pc-windows-gnu\lib\rsend.o: unknown file type
error: aborting due to previous error
error: could not compile `hello_rust`.
To learn more, run the command again with --verbose.
I think that this probjem would go away if I used Clang.exe as the linker, but installing clang would be problematic on my end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.