I'm trying to setup 'rustc' compiler on Windows 11 by following the quickstart guide Quickstart - Rust Compiler Development Guide
Since it is windows, I'm running the powershell script x.ps1
like below, but it keeps failing at symlink creation step.
D:\rust> .\x.ps1 setup --verbose
Error:
...
walkdir=D:\rust\build\bootstrap\debug\deps\libwalkdir-f2870198f2acf5fd.rlib --extern windows=D:\rust\build\bootstrap\debug\deps\libwindows-c4563d6075a2ef2a.rlib --extern xz2=D:\rust\build\bootstrap\debug\deps\libxz2-62574e69996d0533.rlib -Zallow-features= -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings -L native=C:\Users\Mallur\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.52.6\lib -L native=D:\rust\build\bootstrap\debug\build\lzma-sys-61433400dfaa550a\out`
Finished `dev` profile [unoptimized] target(s) in 59.89s
running: D:\rust\build\bootstrap\debug\bootstrap setup --verbose
finding compilers
CC_x86_64-pc-windows-msvc = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX64\\x64\\cl.exe"
CFLAGS_x86_64-pc-windows-msvc = ["-nologo", "-MT", "-Brepro"]
CXX_x86_64-pc-windows-msvc = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX64\\x64\\cl.exe"
CXXFLAGS_x86_64-pc-windows-msvc = ["-nologo", "-MT", "-Brepro"]
thread 'main' panicked at src/lib.rs:468:9:
symlink_dir(&build.config, &build_triple, &host) failed with The file or directory is corrupted and unreadable. (os error 1392) ("symlink_dir(D:\\rust\\build\\host => D:\\rust\\build\\x86_64-pc-windows-msvc) failed")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "D:\rust\x.py", line 50, in <module>
bootstrap.main()
File "D:\rust\src\bootstrap\bootstrap.py", line 1191, in main
bootstrap(args)
File "D:\rust\src\bootstrap\bootstrap.py", line 1167, in bootstrap
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
File "D:\rust\src\bootstrap\bootstrap.py", line 186, in run
raise RuntimeError(err)
RuntimeError: failed to run: D:\rust\build\bootstrap\debug\bootstrap.exe setup --verbose
Couldn't find any solutions online. How do I proceed here?