R
R
Rustem Ayupov2021-04-09 13:34:13
Windows
Rustem Ayupov, 2021-04-09 13:34:13

How to compile Rust source on Win7 32 bit system?

Hello!
Decided to learn Rust.
Downloaded and installed Microsoft Build Tools with cpp option.
Downloaded and installed rustup from the official site.
rustc works, it shows the version,
but when I try to compile, an error always pops up:

C:\projects\hello_world>rustc main.rs
error: linking with `link.exe` failed: exit code: 1171
...
...
...
 = note: Non-UTF-8 output: LINK : fatal error LNK1171: \xad\xa5 \xe3\xa4\xa0\xa5\xe2\xe1\xef \xa7\xa0\xa3\xe0\xe3\xa7\x
a8\xe2\xec mspdb140.dll (\xaa\xae\xa4 \xae\xe8\xa8\xa1\xaa\xa8: 87)\r\n

error: aborting due to previous error

Full message
C:\projects\hello_world>rustc main.rs
error: linking with `link.exe` failed: exit code: 1171
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x86
\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LARGEADDRESSAWARE" "/SAFESEH" "/LIBPATH:C:\\Users\\rust\\.rustup\\toolchains\\stable
-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "main.main.7rcbfp3g-cgu.0.rcgu.o" "main.main.7rcbfp3g-cg
u.1.rcgu.o" "main.main.7rcbfp3g-cgu.2.rcgu.o" "main.main.7rcbfp3g-cgu.3.rcgu.o" "main.main.7rcbfp3g-cgu.4.rcgu.o" "main.
main.7rcbfp3g-cgu.5.rcgu.o" "main.main.7rcbfp3g-cgu.6.rcgu.o" "main.main.7rcbfp3g-cgu.7.rcgu.o" "/OUT:main.exe" "main.4s
37gsrti678ik8u.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-m
svc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\li
b\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustl
ib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\etc\\
libstd.natvis" "/LIBPATH:C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-window
s-msvc\\lib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib
\\libstd-4161c1c4d1accdde.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-p
c-windows-msvc\\lib\\libpanic_unwind-50aac40def6dd693.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-window
s-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_demangle-a3f8ebf6860a365b.rlib" "C:\\Users\\rust\\.rustup\\too
lchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libhashbrown-2a3bfa8c9928bc65.rlib" "C:\\
Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_std_wor
kspace_alloc-6f44aacb5877ec36.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i6
86-pc-windows-msvc\\lib\\libunwind-da260cdc3b271146.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-
msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcfg_if-38e67e0d4e1c034e.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\s
table-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-895550a362cd6b03.rlib" "C:\\Users\\rust\\.r
ustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc-444115fbe6ff4d37.rlib"
 "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_s
td_workspace_core-f4f750f8c5829827.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustli
b\\i686-pc-windows-msvc\\lib\\libcore-5e1737c6fda2908f.rlib" "C:\\Users\\rust\\.rustup\\toolchains\\stable-i686-pc-windo
ws-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcompiler_builtins-6a87ef96cef37711.rlib" "advapi32.lib" "ws2_32.lib
" "userenv.lib" "msvcrt.lib"
  = note: Non-UTF-8 output: LINK : fatal error LNK1171: \xad\xa5 \xe3\xa4\xa0\xa5\xe2\xe1\xef \xa7\xa0\xa3\xe0\xe3\xa7\x
a8\xe2\xec mspdb140.dll (\xaa\xae\xa4 \xae\xe8\xa8\xa1\xaa\xa8: 87)\r\n
error: aborting due to previous error


I tried to fight in every way (everything I could dig up in google and stackoverflow): corrected the paths in PATH, replaced and re-registered mspdb140.dll, uninstalled and reinstalled Build Tools of different versions, saved the source in different encodings, installed it on a virtual machine on win7 - 32 etc.
All that I have achieved: the error message has become a little different, but with the same code:

C:\Users\root\projects\hello_world>rustc main.rs
error: linking with `link.exe` failed: exit code: 1171
...
...
...
 = note: LINK : fatal error LNK1171: unable to load mspdb140.dll (error code: 87)

error: aborting due to previous error

Full message
C:\Users\root\projects\hello_world>rustc main.rs
error: linking with `link.exe` failed: exit code: 1171
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x86\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LARGEADDRESSAWARE" "/SAFESEH" "/LIBPATH:C:\\
Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "main.main.7rcbfp3g-cgu.0.rcgu.o" "main.main.7rcbfp3g-cgu.1.rcgu.o" "main.main.7rcbfp3g-cgu.2.rc
gu.o" "main.main.7rcbfp3g-cgu.3.rcgu.o" "main.main.7rcbfp3g-cgu.4.rcgu.o" "main.main.7rcbfp3g-cgu.5.rcgu.o" "main.main.7rcbfp3g-cgu.6.rcgu.o" "main.main.7rcbfp3g-cgu.7.rcgu.o" "/OUT:main.exe" "main.4s
37gsrti678ik8u.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\root\\.rustup\\too
lchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Us
ers\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis" "/LIBPATH:C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-window
s-msvc\\lib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libstd-4161c1c4d1accdde.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i6
86-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libpanic_unwind-50aac40def6dd693.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-ms
vc\\lib\\librustc_demangle-a3f8ebf6860a365b.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libhashbrown-2a3bfa8c9928bc65.rlib" "C:\\
Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-6f44aacb5877ec36.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stabl
e-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libunwind-da260cdc3b271146.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc
\\lib\\libcfg_if-38e67e0d4e1c034e.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-895550a362cd6b03.rlib" "C:\\Users\\root\\.r
ustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc-444115fbe6ff4d37.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustli
b\\i686-pc-windows-msvc\\lib\\librustc_std_workspace_core-f4f750f8c5829827.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcore-5e
1737c6fda2908f.rlib" "C:\\Users\\root\\.rustup\\toolchains\\stable-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcompiler_builtins-6a87ef96cef37711.rlib" "advapi32.lib" "ws2_32.lib
" "userenv.lib" "msvcrt.lib"
= note: LINK : fatal error LNK1171: unable to load mspdb140.dll (error code: 87)
error: aborting due to previous error

What else can I try, or does rust not shine on 32 bits?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2021-04-14
@ayupov_r

Not quite a solution to the problem, but its possible relief is to build using the i686-pc-windows-gnu toolchain

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question