rust-lang / rust

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

Failed To Run Custom Build Command For `proc-macro-test v0.0.0` During Windows Compile From Source #130890

Open TeaFTI opened 1 month ago

TeaFTI commented 1 month ago

Tried compiling rust from source on Windows, but getting the below error: failed to run custom build command forproc-macro-test v0.0.0`.

Interestingly enough, when I was compiling 1.76.0, it worked fine with the same setting?

Information:

Command:

# Failed during check
python .\x.py check

# Failed during build
python .\x.py build

Error:

error: failed to run custom build command for `proc-macro-test v0.0.0

I expected to see this happen: Build completed successfully after running python .\x.py check

Instead, this happened: Got Build completed unsuccessfully after running python .\x.py check

Meta

N/A

Backtrace

``` Checking hir-expand v0.0.0 (C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\hir-expand) error: failed to run custom build command for `proc-macro-test v0.0.0 (C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test)` Caused by: process didn't exit successfully: `C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\release\build\proc-macro-test-ac25f6fb587a2d77\build-script-build` (exit code: 101) --- stdout cargo:rerun-if-changed=imp Creating C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging Creating C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\src Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\Cargo.toml to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\Cargo.toml Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\build.rs to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\build.rs Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\src\lib.rs to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\src\lib.rs Running "\\\\?\\C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "build" "-p" "proc-macro-test-impl" "--message-format" "json" "--target-dir" "C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target" "--target" "x86_64-pc-windows-msvc" proc-macro-test-impl failed to build ============ stdout ============ {"reason":"compiler-message","package_id":"path+file:///C:/Users/Aries/Desktop/Project/Repository/P/rust/build/x86_64-pc-windows-msvc/stage0-tools/x86_64-pc-windows-msvc/release/build/proc-macro-test-01ff525158874abc/out/proc-macro-test-imp-staging#proc-macro-test-impl@0.0.0","manifest_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"message":{"rendered":"error: linking with `link.exe` failed: exit code: 1104\n |\n = note: \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\link.exe\" \"/NOLOGO\" \"C:\\\\Users\\\\Aries\\\\AppData\\\\Local\\\\Temp\\\\rustcdbUXZm\\\\symbols.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.build_script_build.e80398efb4fee8ff-cgu.0.rcgu.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.29g61l5aniiv8i4hmxt9nq7no.rcgu.o\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\deps\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd-d7a86f21fcd377c7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libpanic_unwind-97f6a0482881a03a.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_demangle-f8c4d6a2240f107f.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd_detect-803b4d5ce4fcd522.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libhashbrown-5e5ab7fb8d3e9a6b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_alloc-7846558dfa99a578.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libunwind-3adc2db30827f7fe.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcfg_if-c91146a1b584a0a7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\liballoc-c032859c81f4576b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_core-628fee62996a202b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcore-dfdcb1635a201156.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcompiler_builtins-1f67c2a5a11a0b2e.rlib\" \"kernel32.lib\" \"advapi32.lib\" \"kernel32.lib\" \"ntdll.lib\" \"userenv.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"/defaultlib:libcmt\" \"/NXCOMPAT\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"/OUT:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.exe\" \"/OPT:REF,NOICF\" \"/DEBUG\" \"/PDBALTPATH:%_PDB%\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\intrinsic.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\liballoc.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libcore.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libstd.natvis\"\n = note: LINK : fatal error LNK1104: cannot open file 'C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target\\debug\\build\\proc-macro-test-impl-653802d6ec5b86af\\build_script_build-653802d6ec5b86af.exe'\r\n \n\n","$message_type":"diagnostic","children":[{"children":[],"code":null,"level":"note","message":"\"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\link.exe\" \"/NOLOGO\" \"C:\\\\Users\\\\Aries\\\\AppData\\\\Local\\\\Temp\\\\rustcdbUXZm\\\\symbols.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.build_script_build.e80398efb4fee8ff-cgu.0.rcgu.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.29g61l5aniiv8i4hmxt9nq7no.rcgu.o\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\deps\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd-d7a86f21fcd377c7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libpanic_unwind-97f6a0482881a03a.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_demangle-f8c4d6a2240f107f.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd_detect-803b4d5ce4fcd522.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libhashbrown-5e5ab7fb8d3e9a6b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_alloc-7846558dfa99a578.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libunwind-3adc2db30827f7fe.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcfg_if-c91146a1b584a0a7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\liballoc-c032859c81f4576b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_core-628fee62996a202b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcore-dfdcb1635a201156.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcompiler_builtins-1f67c2a5a11a0b2e.rlib\" \"kernel32.lib\" \"advapi32.lib\" \"kernel32.lib\" \"ntdll.lib\" \"userenv.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"/defaultlib:libcmt\" \"/NXCOMPAT\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"/OUT:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.exe\" \"/OPT:REF,NOICF\" \"/DEBUG\" \"/PDBALTPATH:%_PDB%\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\intrinsic.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\liballoc.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libcore.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libstd.natvis\"","rendered":null,"spans":[]},{"children":[],"code":null,"level":"note","message":"LINK : fatal error LNK1104: cannot open file 'C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target\\debug\\build\\proc-macro-test-impl-653802d6ec5b86af\\build_script_build-653802d6ec5b86af.exe'\r\n","rendered":null,"spans":[]}],"code":null,"level":"error","message":"linking with `link.exe` failed: exit code: 1104","spans":[]}} {"reason":"compiler-message","package_id":"path+file:///C:/Users/Aries/Desktop/Project/Repository/P/rust/build/x86_64-pc-windows-msvc/stage0-tools/x86_64-pc-windows-msvc/release/build/proc-macro-test-01ff525158874abc/out/proc-macro-test-imp-staging#proc-macro-test-impl@0.0.0","manifest_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"message":{"rendered":"error: aborting due to 1 previous error\n\n","$message_type":"diagnostic","children":[],"code":null,"level":"error","message":"aborting due to 1 previous error","spans":[]}} {"reason":"build-finished","success":false} ============ stderr ============ Compiling proc-macro-test-impl v0.0.0 (C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging) error: could not compile `proc-macro-test-impl` (build script) due to 2 previous errors --- stderr thread 'main' panicked at crates\proc-macro-srv\proc-macro-test\build.rs:91:9: proc-macro-test-impl failed to build note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... Build completed unsuccessfully in 0:09:16 ```

bjorn3 commented 1 month ago

This is the linker failure causing this problem:

  = note: LINK : fatal error LNK1104: cannot open file 'C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\target\debug\build\proc-macro-test-impl-653802d6ec5b86af\build_script_build-653802d6ec5b86af.exe'

This file is the output file that should be written by the linker. Do you maybe have an over eager antivirus blocking the creation of this file?

bjorn3 commented 1 month ago

Removed A-linkage as this is not related to object files, symbols or the rust or c compilation model. It would be suitable if the linker error was about missing or duplicate symbols or if one of the input files is not found, but this is about the linker not being able to create the output file.

onur-ozkan commented 1 month ago

Do you maybe have an over eager antivirus blocking the creation of this file?

FWIW I remember some users had the exact problem due to this reason.

TeaFTI commented 1 month ago

This is the linker failure causing this problem:

  = note: LINK : fatal error LNK1104: cannot open file 'C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\target\debug\build\proc-macro-test-impl-653802d6ec5b86af\build_script_build-653802d6ec5b86af.exe'

This file is the output file that should be written by the linker. Do you maybe have an over eager antivirus blocking the creation of this file?

Do you maybe have an over eager antivirus blocking the creation of this file?

FWIW I remember some users had the exact problem due to this reason.

Interestingly though, I don't have any antivirus, I only have the default Windows defender for Windows.

ChrisDenton commented 1 month ago

link.exe might be struggling with the path length limit. How long is the file name? If it's greater than 259 then it may not work.

If this is the case, a workaround might be to use subst from cmd.exe to map the rust directory to a drive then build from there so that path is shorter.

TeaFTI commented 1 month ago

link.exe might be struggling with the path length limit. How long is the file name? If it's greater than 259 then it may not work.

If this is the case, a workaround might be to use subst from cmd.exe to map the rust directory to a drive then build from there so that path is shorter.

let me investigate path length issue later today, Windows is known to have this issue

TeaFTI commented 1 month ago

link.exe might be struggling with the path length limit. How long is the file name? If it's greater than 259 then it may not work.

If this is the case, a workaround might be to use subst from cmd.exe to map the rust directory to a drive then build from there so that path is shorter.

Hi @ChrisDenton, I enabled LongPathsEnabled for Windows and ran the python ./x.py check again, but got the same error?

error: failed to run custom build command for `proc-macro-test v0.0.0 (C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test)`

Caused by:
  process didn't exit successfully: `C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\release\build\proc-macro-test-ac25f6fb587a2d77\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=imp
  Creating C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging
  Creating C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\src
  Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\Cargo.toml to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\Cargo.toml
  Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\build.rs to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\build.rs
  Copying C:\Users\Aries\Desktop\Project\Repository\P\rust\src\tools\rust-analyzer\crates\proc-macro-srv\proc-macro-test\imp\src\lib.rs to C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging\src\lib.rs
  Running "\\\\?\\C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "build" "-p" "proc-macro-test-impl" "--message-format" "json" "--target-dir" "C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target" "--target" "x86_64-pc-windows-msvc"
  proc-macro-test-impl failed to build
  ============ stdout ============
  {"reason":"compiler-message","package_id":"path+file:///C:/Users/Aries/Desktop/Project/Repository/P/rust/build/x86_64-pc-windows-msvc/stage0-tools/x86_64-pc-windows-msvc/release/build/proc-macro-test-01ff525158874abc/out/proc-macro-test-imp-staging#proc-macro-test-impl@0.0.0","manifest_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"message":{"rendered":"error: linking with `link.exe` failed: exit code: 1104\n  |\n  = note: \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\link.exe\" \"/NOLOGO\" \"C:\\\\Users\\\\Aries\\\\AppData\\\\Local\\\\Temp\\\\rustc4iaXZF\\\\symbols.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.build_script_build.e80398efb4fee8ff-cgu.0.rcgu.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.29g61l5aniiv8i4hmxt9nq7no.rcgu.o\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\deps\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd-d7a86f21fcd377c7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libpanic_unwind-97f6a0482881a03a.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_demangle-f8c4d6a2240f107f.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd_detect-803b4d5ce4fcd522.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libhashbrown-5e5ab7fb8d3e9a6b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_alloc-7846558dfa99a578.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libunwind-3adc2db30827f7fe.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcfg_if-c91146a1b584a0a7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\liballoc-c032859c81f4576b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_core-628fee62996a202b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcore-dfdcb1635a201156.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcompiler_builtins-1f67c2a5a11a0b2e.rlib\" \"kernel32.lib\" \"advapi32.lib\" \"kernel32.lib\" \"ntdll.lib\" \"userenv.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"/defaultlib:libcmt\" \"/NXCOMPAT\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"/OUT:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.exe\" \"/OPT:REF,NOICF\" \"/DEBUG\" \"/PDBALTPATH:%_PDB%\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\intrinsic.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\liballoc.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libcore.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libstd.natvis\"\n  = note: LINK : fatal error LNK1104: cannot open file 'C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target\\debug\\build\\proc-macro-test-impl-653802d6ec5b86af\\build_script_build-653802d6ec5b86af.exe'\r\n          \n\n","$message_type":"diagnostic","children":[{"children":[],"code":null,"level":"note","message":"\"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Enterprise\\\\VC\\\\Tools\\\\MSVC\\\\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\link.exe\" \"/NOLOGO\" \"C:\\\\Users\\\\Aries\\\\AppData\\\\Local\\\\Temp\\\\rustc4iaXZF\\\\symbols.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.build_script_build.e80398efb4fee8ff-cgu.0.rcgu.o\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.29g61l5aniiv8i4hmxt9nq7no.rcgu.o\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\deps\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd-d7a86f21fcd377c7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libpanic_unwind-97f6a0482881a03a.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_demangle-f8c4d6a2240f107f.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libstd_detect-803b4d5ce4fcd522.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libhashbrown-5e5ab7fb8d3e9a6b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_alloc-7846558dfa99a578.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libunwind-3adc2db30827f7fe.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcfg_if-c91146a1b584a0a7.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\liballoc-c032859c81f4576b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\librustc_std_workspace_core-628fee62996a202b.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcore-dfdcb1635a201156.rlib\" \"C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\\\\libcompiler_builtins-1f67c2a5a11a0b2e.rlib\" \"kernel32.lib\" \"advapi32.lib\" \"kernel32.lib\" \"ntdll.lib\" \"userenv.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"ws2_32.lib\" \"kernel32.lib\" \"/defaultlib:libcmt\" \"/NXCOMPAT\" \"/LIBPATH:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\x86_64-pc-windows-msvc\\\\lib\" \"/OUT:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0-tools\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\proc-macro-test-01ff525158874abc\\\\out\\\\target\\\\debug\\\\build\\\\proc-macro-test-impl-653802d6ec5b86af\\\\build_script_build-653802d6ec5b86af.exe\" \"/OPT:REF,NOICF\" \"/DEBUG\" \"/PDBALTPATH:%_PDB%\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\intrinsic.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\liballoc.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libcore.natvis\" \"/NATVIS:C:\\\\Users\\\\Aries\\\\Desktop\\\\Project\\\\Repository\\\\P\\\\rust\\\\build\\\\x86_64-pc-windows-msvc\\\\stage0\\\\lib\\\\rustlib\\\\etc\\\\libstd.natvis\"","rendered":null,"spans":[]},{"children":[],"code":null,"level":"note","message":"LINK : fatal error LNK1104: cannot open file 'C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target\\debug\\build\\proc-macro-test-impl-653802d6ec5b86af\\build_script_build-653802d6ec5b86af.exe'\r\n","rendered":null,"spans":[]}],"code":null,"level":"error","message":"linking with `link.exe` failed: exit code: 1104","spans":[]}}
  {"reason":"compiler-message","package_id":"path+file:///C:/Users/Aries/Desktop/Project/Repository/P/rust/build/x86_64-pc-windows-msvc/stage0-tools/x86_64-pc-windows-msvc/release/build/proc-macro-test-01ff525158874abc/out/proc-macro-test-imp-staging#proc-macro-test-impl@0.0.0","manifest_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\proc-macro-test-imp-staging\\build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"message":{"rendered":"error: aborting due to 1 previous error\n\n","$message_type":"diagnostic","children":[],"code":null,"level":"error","message":"aborting due to 1 previous error","spans":[]}}
  {"reason":"build-finished","success":false}

  ============ stderr ============
     Compiling proc-macro-test-impl v0.0.0 (C:\Users\Aries\Desktop\Project\Repository\P\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\build\proc-macro-test-01ff525158874abc\out\proc-macro-test-imp-staging)
  error: could not compile `proc-macro-test-impl` (build script) due to 2 previous errors

  --- stderr
  thread 'main' panicked at crates\proc-macro-srv\proc-macro-test\build.rs:91:9:
  proc-macro-test-impl failed to build
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:05:47
ChrisDenton commented 1 month ago

Unfortunately LongPathsEnabled requires applications to individually opt-in by using longPathAware in their manifest.

TeaFTI commented 1 month ago

One thing I noticed not sure what the \\\\?\\ in from the C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe is? Not sure if that's causing an issue.

I tried just running the command itself, but doesn't seem to work:

"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "build" "-p" "proc-macro-test-impl" "--message-format" "json" "--target-dir" "C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target" "--target" "x86_64-pc-windows-msvc"

Got the following error:

(pv312p) C:\Users\Aries\Desktop\Project\Repository\P\rust>"C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "build" "-p" "proc-macro-test-impl" "--message-format" "json" "--target-dir" "C:\\Users\\Aries\\Desktop\\Project\\Repository\\P\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\build\\proc-macro-test-01ff525158874abc\\out\\target" "--target" "x86_64-pc-windows-msvc"
error: failed to load manifest for workspace member `C:\Users\Aries\Desktop\Project\Repository\P\rust\library\std`
referenced by workspace at `C:\Users\Aries\Desktop\Project\Repository\P\rust\Cargo.toml`

Caused by:
  failed to parse manifest at `C:\Users\Aries\Desktop\Project\Repository\P\rust\library\std\Cargo.toml`

Caused by:
  the cargo feature `public-dependency` requires a nightly version of Cargo, but this is the `stable` channel
  See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
  See https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency for more information about using this feature.
ChrisDenton commented 1 month ago

Using Cargo directly to compile std is not really supported. Bootstrap does a fair bit of setup to make it work.

TeaFTI commented 3 weeks ago

tried running this using the latest 1.82.0, but also disabling all the security and firewall settings on Windows, but still getting the same error.

ChrisDenton commented 3 weeks ago

I mean, if the issue is that an external tool can only handle shorter paths (i.e. <260) then no amount of settings changes will help. The only workaround is to use shorter paths (maybe with the help of subst).

TeaFTI commented 1 week ago

@ChrisDenton, quick update, I moved the repo to a shorter path (less than 260 character) and try building and compile again, and I was able to get it build and compile successfully.

I'll leave this case open as a bug for tracking.