Skip to content

cargo build/test on Windows #520

@caugner

Description

@caugner

cargo build fails

It needs Visual Studio Build Tools for C++ with C++ Tools for Linux and Mac Development.

error: linking with `link.exe` failed: exit code: 1
  |
  = note: "link.exe" "/NOLOGO" "C:\\Users\\windo\\AppData\\Local\\Temp\\rustcv1i3lv\\symbols.o" "<2 object files omitted>" "<sysroot>\\lib\\rustlib\\aarch64-pc-windows-msvc\\lib/{libstd-*,libpanic_unwind-*,libcfg_if-*,libwindows_targets-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libunwind-*,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" "/OUT:C:\\Users\\windo\\rari\\target\\debug\\build\\quote-1fd7b8016982e23c\\build_script_build-1fd7b8016982e23c.exe" "/OPT:REF,NOICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libstd.natvis"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: link: extra operand 'C:\\Users\\windo\\rari\\target\\debug\\build\\quote-1fd7b8016982e23c\\build_script_build-1fd7b8016982e23c.build_script_build.4f82b1af25c764d3-cgu.0.rcgu.o'
          Try 'link --help' for more information.


error: linking with `link.exe` failed: exit code: 1
  |
  = note: "link.exe" "/NOLOGO" "C:\\Users\\windo\\AppData\\Local\\Temp\\rustcEi73mZ\\symbols.o" "<3 object files omitted>" "<sysroot>\\lib\\rustlib\\aarch64-pc-windows-msvc\\lib/{libstd-*,libpanic_unwind-*,libcfg_if-*,libwindows_targets-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libunwind-*,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" "/OUT:C:\\Users\\windo\\rari\\target\\debug\\build\\proc-macro2-f59fafbda86fad52\\build_script_build-f59fafbda86fad52.exe" "/OPT:REF,NOICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libstd.natvis"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: link: extra operand 'C:\\Users\\windo\\rari\\target\\debug\\build\\proc-macro2-f59fafbda86fad52\\build_script_build-f59fafbda86fad52.build_script_build.93c25409de576810-cgu.0.rcgu.o'
          Try 'link --help' for more information.


note: `link.exe` returned an unexpected error

note: you may need to install Visual Studio build tools with the "C++ build tools" workload

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `quote` (build script) due to 1 previous error

cargo test cannot run successfully

It seems to require mv, see: #518 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions