kvproto
kvproto copied to clipboard
Failed to make
Following instructions in README, and failed with the following error messages:
++ which grpc_cpp_plugin
+ protoc -I.:/Users/breezewish/Work/PingCAP/src/github.com/pingcap/kvproto/_vendor/src/github.com/gogo/protobuf:/Users/breezewish/Work/PingCAP/src/github.com/pingcap/kvproto/_vendor/src/github.com/gogo/protobuf/protobuf:../include --grpc_out ../cpp/kvproto --plugin=protoc-gen-grpc= coprocessor.proto deadlock.proto debugpb.proto enginepb.proto errorpb.proto import_kvpb.proto import_sstpb.proto kvrpcpb.proto metapb.proto pdpb.proto raft_cmdpb.proto raft_serverpb.proto tikvpb.proto
/Users/breezewish/Work/PingCAP/src/github.com/pingcap/kvproto/_vendor/src/github.com/gogo/protobuf: warning: directory does not exist.
/Users/breezewish/Work/PingCAP/src/github.com/pingcap/kvproto/_vendor/src/github.com/gogo/protobuf/protobuf: warning: directory does not exist.
: program not found or is not executable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
+ exit 1
make: *** [c++] Error 1
# breezewish @ ~/Work/PingCAP/src/github.com/pingcap/kvproto on git:master x [21:34:35] C:1
$ PATH="$(pwd)/protoc/bin:$PATH" which grpc_cpp_plugin
grpc_cpp_plugin not found
# breezewish @ ~/Work/PingCAP/src/github.com/pingcap/kvproto on git:master x [21:34:39] C:1
$ PATH="$(pwd)/protoc/bin:$PATH" protoc --version
libprotoc 3.1.0
What step am I missing?
Maybe need to git submodule update --recursive --init?
There is no submodule in this repo, how would it work? 🤔
I solved it by following steps:
git clone https://github.com/gogo/protobuf.git _vendor/src/github.com/gogo/protobuf;- follow https://github.com/grpc/grpc/blob/master/BUILDING.md,
make & make install, it would installgrpc_cpp_plugin; - add
include_directories("/usr/local/include")in cpp/CMakeLists.txt.
cc @hanfei1991 @flowbehappy
Given that the C++ code is .gitignore'd, could we remove c++ from make all?
Alternatively, is there any simple workaround to allow building C++ output without the complicated and platform-dependent steps of https://github.com/pingcap/kvproto/issues/406#issuecomment-504024215?
Ping @hanfei1991 @flowbehappy
Same issue here. It could be better to include the installation of grpc_cpp_plugin in README.md.
@Fullstop000 Maybe you can try just make go.
@breeswish I'm about to compromise and use make go && make rust :(
@Fullstop000 I actually never run make rust, since it only does check and does not change the code to be committed to this repo...
You can now build with ./scripts/docker-build.sh and then ./scripts/docker-run.sh make go rust. ./scripts/docker-run.sh make c++ runs but doesn't seem to be generating anything.