rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.27k stars 1.61k forks source link

[ERROR rust_analyzer::main_loop] FetchBuildDataError: #15980

Closed 2001lwy closed 11 months ago

2001lwy commented 11 months ago

[ERROR rust_analyzer::main_loop] FetchBuildDataError: error: failed to run custom build command for ring v0.17.5 note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by: process didn't exit successfully: E:\rust-demo\reservation\project\target\debug\build\ring-5e2bcd89a24f9330\build-script-build (exit code: 1) --- stdout cargo:rerun-if-env-changed=RING_PREGENERATE_ASM cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_175 OPT_LEVEL = Some("0") 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 = None cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") DEBUG = Some("true") 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 running: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "include" "-I" "E:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out" "-W4" "/Gy" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "-DNDEBUG" "-FoE:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out\crypto/curve25519/curve25519.o" "-c" "crypto/curve25519/curve25519.c" curve25519.c C:\Users\DSpc.cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\ring-0.17.5\crypto\curve25519./curve25519_tables.h(1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\Users\DSpc.cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\ring-0.17.5\crypto\curve25519../../third_party/fiat/curve25519_64_msvc.h(1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss exit code: 0 running: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "include" "-I" "E:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out" "-W4" "/Gy" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "-DNDEBUG" "-FoE:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out\crypto/fipsmodule/aes/aes_nohw.o" "-c" "crypto/fipsmodule/aes/aes_nohw.c" aes_nohw.c exit code: 0 running: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "include" "-I" "E:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out" "-W4" "/Gy" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "-DNDEBUG" "-FoE:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out\crypto/fipsmodule/bn/montgomery.o" "-c" "crypto/fipsmodule/bn/montgomery.c" montgomery.c crypto/fipsmodule/bn/montgomery.c(113): fatal error C1083: Cannot open include file: '../../limbs/limbs.inl': No such file or directory exit code: 2

--- stderr

error occurred: Command "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "include" "-I" "E:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out" "-W4" "/Gy" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "-DNDEBUG" "-FoE:\rust-demo\reservation\project\target\debug\build\ring-7f0be147c3df414b\out\crypto/fipsmodule/bn/montgomery.o" "-c" "crypto/fipsmodule/bn/montgomery.c" with args "cl.exe" did not execute successfully (status code exit code: 2).

2001lwy commented 11 months ago

Cargo.toml

[package] name = "reservation" version = "0.1.0" edition = "2021"

[dependencies] project = { version = "0.1.0", path = "../project" } sqlx = { version = "0.7.0", features = ["runtime-tokio-rustls", "postgres", "chrono", "uuid"] } thiserror = "1.0.48"

flodiebold commented 11 months ago

Does running cargo check work in your repository?

2001lwy commented 11 months ago

cargo check在您的存储库中运行有效吗?

I have used cargo check, but still have the same problem, but I have solved the problem by going to cargo's local warehouse and deleting ring 0.17.5