kvproto icon indicating copy to clipboard operation
kvproto copied to clipboard

Failed to make

Open breezewish opened this issue 6 years ago • 10 comments

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?

breezewish avatar Jun 03 '19 13:06 breezewish

Maybe need to git submodule update --recursive --init?

nrc avatar Jun 19 '19 20:06 nrc

There is no submodule in this repo, how would it work? 🤔

breezewish avatar Jun 20 '19 12:06 breezewish

I solved it by following steps:

  1. git clone https://github.com/gogo/protobuf.git _vendor/src/github.com/gogo/protobuf ;
  2. follow https://github.com/grpc/grpc/blob/master/BUILDING.md, make & make install , it would install grpc_cpp_plugin;
  3. add include_directories("/usr/local/include") in cpp/CMakeLists.txt.

fredchenbj avatar Jun 20 '19 13:06 fredchenbj

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?

kennytm avatar Jul 09 '19 07:07 kennytm

Ping @hanfei1991 @flowbehappy

lance6716 avatar Jul 30 '19 08:07 lance6716

Same issue here. It could be better to include the installation of grpc_cpp_plugin in README.md.

Fullstop000 avatar Mar 12 '20 09:03 Fullstop000

@Fullstop000 Maybe you can try just make go.

breezewish avatar Mar 12 '20 09:03 breezewish

@breeswish I'm about to compromise and use make go && make rust :(

Fullstop000 avatar Mar 12 '20 09:03 Fullstop000

@Fullstop000 I actually never run make rust, since it only does check and does not change the code to be committed to this repo...

breezewish avatar Mar 12 '20 09:03 breezewish

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.

gregwebs avatar Mar 31 '21 17:03 gregwebs