Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to make #406

Open
breezewish opened this issue Jun 3, 2019 · 10 comments
Open

Failed to make #406

breezewish opened this issue Jun 3, 2019 · 10 comments

Comments

@breezewish
Copy link
Member

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?

@nrc
Copy link
Contributor

nrc commented Jun 19, 2019

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

@breezewish
Copy link
Member Author

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

@fredchenbj
Copy link
Contributor

fredchenbj commented Jun 20, 2019

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.

@kennytm
Copy link
Contributor

kennytm commented Jul 9, 2019

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 #406 (comment)?

@lance6716
Copy link
Contributor

Ping @hanfei1991 @flowbehappy

@Fullstop000
Copy link
Contributor

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

@breezewish
Copy link
Member Author

@Fullstop000 Maybe you can try just make go.

@Fullstop000
Copy link
Contributor

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

@breezewish
Copy link
Member Author

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

@gregwebs
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants