I installed grpc-java according to the instructions on my Mac (running Mavericks). This included installing protobuf v3.0.0-alpha-2, which I did:
$ which protoc
/usr/local/bin/protoc
$ /usr/local/bin/protoc --version
libprotoc 3.0.0
The Java examples work fine. Now I'd like to try the C++ examples and, ideally, have a C++ client talk to a Java server and visa-versa.
I cloned grpc and attempted to install it. sudo make install
and, subsequently, make verify-install
fail, telling me that protobuf 3 is not installed:
$ make verify-install
We couldn't find protoc 3.0.0+ installed on your system. While this
won't prevent grpc from working, you won't be able to compile
and run any meaningful code with it.
Please download and install protobuf 3.0.0+ from:
https://github.com/google/protobuf/releases
Once you've done so, or if you think this message is in error,
you can re-run this check by doing:
make verify-install
On line 259 of grpc/Makefile, I see this test:
PROTOC_CHECK_CMD = protoc --version | grep -q libprotoc.3
If I run protoc --version
on my Mac, I see something different (see above), so I tried changing the line above to
PROTOC_CHECK_CMD = protoc --version | grep -q 'libprotoc 3.0.0'
However I get the same error from make verify-install
.
I'e also tried removing the PROTOBUF_CHECK_CMD and PROTOC_CHECK_CMD tests at run_dep_checks (about line #895) but install still fails with the same error.
When I run make on grpc-common/cpp/helloworld, it builds, but greeter_client and greeter_server both fail:
$ ./greeter_server
E0310 17:38:23.349841000 140735186797328 server.c:617] assertion failed: grpc_is_initialized() && "call grpc_init()"
Abort trap: 6
I assume because the problem with installing grpc.
So, protobuf 3 is clearly installed. How can I convince the Makefile of that, or at least bypass that test?