Link error building copy_file with msvc - regression in rules_rust 0.66
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- build-system
Research direction
Reproduce the failure with rules_rust 0.66 by running bazel build //... on Windows with the MSVC toolchain. Inspect the generated linker arguments for external/rules_rust+/cargo/private:copy_file, especially the library paths, and compare them with rules_rust 0.65; done means the copy_file target and the full build link successfully.
Written by the indexing model from the issue text.
Description
When upgrading to rules_rust 0.66 from 0.65 we see this error:
D:\workdir\gitlab\plm\tc\servicemesh>bazel build //...
INFO: Analyzed 229 targets (2186 packages loaded, 86137 targets configured).
ERROR: D:/udu/b/jsuyf6jg/external/rules_rust+/cargo/private/BUILD.bazel:4:12: Compiling Rust bin copy_file (1 files) [for tool] failed: (Exit 1): process_wrapper.exe failed: error executing Rustc command (from target @@rules_rust+//cargo/private:copy_file) bazel-out\x64_windows-opt-exec-ST-ec4a08ce3b65\bin\external\rules_rust+\util\process_wrapper\process_wrapper.exe --subst pwd=${pwd} -- ... (remaining 55 arguments skipped)
error: linking with `external/tc_toolchain+/toolchain/x64-windows/14.42.34433/link.exe` failed: exit code: 1181
|
= note: "external/tc_toolchain+/toolchain/x64-windows/14.42.34433/link.exe" "/NOLOGO" "C:\\Users\\browchri.PLM\\AppData\\Local\\Temp\\rustclVmcWj\\symbols.o" "<2 object files omitted>" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/{libstd-*,libpanic_unwind-*,libwindows_targets-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libunwind-*,libcfg_if-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "kernel32.lib" "kernel32.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/LIBPATH:<sysroot>/lib/rustlib/x86_64-pc-windows-msvc/lib" "/OUT:bazel-out/x64_windows-opt-exec-ST-ec4a08ce3b65/bin/external/rules_rust+/cargo/private/copy_file.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/nologo" "/SUBSYSTEM:CONSOLE" "/NOLOGO" "/MACHINE:X64" "/NODEFAULTLIB" "delayimp.lib" "kernel32.lib" "/DYNAMICBASE" "/NXCOMPAT" "/Brepro" "/experimental:deterministic" "/NOLOGO" "/MACHINE:X64" "/NODEFAULTLIB" "delayimp.lib" "kernel32.lib" "/DYNAMICBASE" "/NXCOMPAT" "/Brepro" "/experimental:deterministic" "ucrt.lib" "vcruntime.lib" "msvcrt.lib" "msvcprt.lib" "oldnames.lib" "/DEBUG:FULL" "/INCREMENTAL:NO" "/pdbaltpath:%_PDB%" "/OPT:ICF" "/OPT:REF" "-LIBPATH:C:\\apps\\MVS17124\\VC\\Tools\\MSVC\\14.42.34433\\ATLMFC\\lib\\x64" "-LIBPATH:C:\\apps\\MVS17124\\VC\\Tools\\MSVC\\14.42.34433\\lib\\x64" "-LIBPATH:C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\lib\\um\\x64" "-LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.26100.0\\ucrt\\x64" "-LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.26100.0\\\\um\\x64"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: LINK : fatal error LNK1181: cannot open input file 'Files.obj'␍␍
- Dominant language
- Starlark
- Stars
- 857
- Forks
- 701
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 46
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_rust
-
`rust_test(crate = ...)` does not stage the crate's transitive dynamic libraries into runfilesPossibly taken @Wito-1 claimed this 65 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bazelbuild/rules_rust#4309 ·
Maintainers usually reply within 3 days
-
Windows (no-symlink path): drain_runfiles_dir_windows deletes retained runfiles — inverted filename_suffixes_to_retain conditionPossibly taken @Mattbusel claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bazelbuild/rules_rust#4266 ·
Maintainers usually reply within 3 days
-
rust.toolchain(strip_level = ...) is silently ignoredPossibly taken @Mattbusel claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bazelbuild/rules_rust#4223 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
bazelbuild/rules_rust#4152 · 1 reaction ·
Maintainers usually reply within 3 days
-
awaiting-response
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bazelbuild/rules_rust#3599 · 1 comment ·
Maintainers usually reply within 3 days
All issues in bazelbuild/rules_rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bazelbuild/apple_support#707 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
out-of-date
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
Maintainers usually reply within 1 day
-
blast/large refactor risk/low spend-dem
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chriskelly/MusicWall#87 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
neilotoole/sq#1503 ·
Maintainers usually reply within 1 day