Install error on windows10 with msvc
jiannanya opened this issue · comments
Hi there, I just install rust and run cmd :
cargo install minidump-stackwalk
But it unexpectedly got an build error:
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `C:\Users\CHENJI~1\AppData\Local\Temp\cargo-installHQigpm\release\build\ring-4232d471cd9b88f3\build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = Some("clang")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
CFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
CFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
--- stderr
running "clang" "-O3" "-ffunction-sections" "-fdata-sections" "--target=x86_64-pc-windows-msvc" "-I" "include" "-Wall" "-Wextra" "/GS" "/Gy" "/EHsc" "/GR-" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Zc:rvalueCast" "/sdl" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "/Ox" "-DNDEBUG" "-c" "/FoC:\\Users\\CHENJI~1\\AppData\\Local\\Temp\\cargo-installHQigpm\\release\\build\\ring-e9a530021c266280\\out\\aes_nohw.obj" "crypto/fipsmodule/aes/aes_nohw.c"
clang: error: no such file or directory: '/GS'
clang: error: no such file or directory: '/Gy'
clang: error: no such file or directory: '/EHsc'
clang: error: no such file or directory: '/GR-'
clang: error: no such file or directory: '/Zc:wchar_t'
clang: error: no such file or directory: '/Zc:forScope'
clang: error: no such file or directory: '/Zc:inline'
clang: error: no such file or directory: '/Zc:rvalueCast'
clang: error: no such file or directory: '/sdl'
clang: error: no such file or directory: '/Wall'; did you mean '-Wall'?
clang: error: no such file or directory: '/wd4127'
clang: error: no such file or directory: '/wd4464'
clang: error: no such file or directory: '/wd4514'
clang: error: no such file or directory: '/wd4710'
clang: error: no such file or directory: '/wd4711'
clang: error: no such file or directory: '/wd4820'
clang: error: no such file or directory: '/wd5045'
clang: error: no such file or directory: '/Ox'
clang: error: no such file or directory: '/FoC:\Users\CHENJI~1\AppData\Local\Temp\cargo-installHQigpm\release\build\ring-e9a530021c266280\out\aes_nohw.obj'
thread 'main' panicked at 'execution failed', C:\Users\chenjiannan\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ring-0.16.20\build.rs:656:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `minidump-stackwalk v0.17.0`, intermediate artifacts can be found at `C:\Users\CHENJI~1\AppData\Local\Temp\cargo-installHQigpm`
How can I solve it?
I don't think there are many people building these crates for Windows, unfortunately. (If you are on Windows you typically would use one of Microsoft's debuggers to read a minidump.) It looks like ring
's build is attempting to pass MSVC-style arguments to clang
, which obviously won't work. You might be able to set CC
to clang-cl
, which is the clang frontend with an MSVC-compatible interface. Otherwise I'd recommend having a look at ring's documentation.
@luser I think you meant to link to https://docs.rs/ring/latest/ring/ instead of some Minecraft-related documentation?
@luser I think you meant to link to https://docs.rs/ring/latest/ring/ instead of some Minecraft-related documentation?
🤦 You'd be correct, but https://github.com/briansmith/ring/blob/main/BUILDING.md is the actual docs link I intended to include (I edited the above comment for clarity). Thanks!
Releases have pre-built Windows binaries now, closing this.