I ran into a project build issue with the following output:
error: failed to run custom build command for `grpcio-sys v0.12.1+1.46.5-patched`
Caused by:
process didn't exit successfully: `C:\..\target\debug\build\grpcio-sys-9aa662d3a4136772\build-script-build` (exit code: 101)
--- stderr
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_ASM_FLAGS
CMAKE_ASM_FLAGS_DEBUG
CMAKE_BUILD_TYPE
CMake Warning at third_party/abseil-cpp/CMakeLists.txt:74 (message):
A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake
3.8 and up. We recommend enabling this option to ensure your project still
builds correctly.
CMake Warning at cmake/protobuf.cmake:51 (message):
gRPC_PROTOBUF_PROVIDER is "module" but PROTOBUF_ROOT_DIR is wrong
Call Stack (most recent call first):
CMakeLists.txt:317 (include)
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_ASM_FLAGS
CMAKE_ASM_FLAGS_DEBUG
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1
build script failed, must exit now', C:\Users\Mi\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.49\src\lib.rs:1104:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This happens when I try to build the project using:
[dependencies]
protobuf="3.2.0"
protobuf-codegen="3.2.0"
protocol-rust="2.28.0"
grpcio-compiler="0.12.1"
grpcio="0.12.1"
Without grpcio and/or grpcio-compiler i get error in the following code that compiler doesn't get grpcio's:
(code fragment of ptotobuf grpc file)
const METHOD_NODE_HANDSHAKE: ::grpcio::Method<super::messages::Version, super::messages::Version> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/messages.Node/Handshake",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_NODE_HANDLE_TRANSACTION: ::grpcio::Method<super::messages::Transaction, super::messages::Confirmed> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/messages.Node/HandleTransaction",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
I've already checked through versions of CMake, protoc ect.
So the question is what should I try?
Has anyone already encountered this problem?
Also I would like to ask about PROTOBUF_ROOT_DIR
environment variable. Because I've already set up my environment path var million times. Currently it has a value of Protobuf (C:/Program Files/Protobuf) which contains bin, include and readme, but compiler still says that PROTOBUF_ROOT_DIR
is wrong.