[grpc-io] can't build the example - DEPENDENCY ERROR

1,340 views
Skip to first unread message

Simon Chamlian

unread,
Sep 13, 2018, 2:19:04 PM9/13/18
to grp...@googlegroups.com
Hi,

Previously I installed grpc and ran the example on a Ubuntu 16.04 machine.

I followed the instructions given in:


And it worked like a charm.

Now, I am trying to re-install it on a new machine (again Ubuntu 16.04) without success.

I keep on getting:

jay@Nembuntu:~/grpc/examples/cpp/helloworld$ make
 DEPENDENCY ERROR

You don't have the grpc c++ protobuf plugin installed in your path.
Please install grpc. You can find it here:

   https://github.com/grpc/grpc

Here is what I get when trying to detect if you have the plugin:

which grpc_cpp_plugin
Makefile:104: recipe for target 'system-check' failed
make: [system-check] Error 1 (ignored)


Makefile:104: recipe for target 'system-check' failed
make: *** [system-check] Error 1
jay@Nembuntu:~/grpc/examples/cpp/helloworld$

I checked the previous machine (protoc --version and I get: libprotoc 3.5.0)
The new machine I get: libprotoc 3.6.1

I did all the hints given in;


I tried:
cd third_party/protobuf
./autogen.sh
./configure
make
make check
make install
No luck.

jay@Nembuntu:~/grpc/third_party/protobuf$ make check
Making check in .
make[1]: Entering directory '/home/jay/grpc/third_party/protobuf'
make  check-local
make[2]: Entering directory '/home/jay/grpc/third_party/protobuf'
Making lib/libgmock.a lib/libgmock_main.a in gmock
/bin/sh: line 0: cd: third_party/googletest/googletest: No such file or directory
Makefile:1964: recipe for target 'check-local' failed
make[2]: *** [check-local] Error 1
make[2]: Leaving directory '/home/jay/grpc/third_party/protobuf'
Makefile:1826: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/home/jay/grpc/third_party/protobuf'
Makefile:1538: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1


Any hints?

Thx,
S


Nicolas Noble

unread,
Sep 13, 2018, 3:43:22 PM9/13/18
to simon.c...@mpbc.ca, grpc.io
At that point, your issue is with protobuf, not with grpc. I'd suggest following their own installation instructions separately at https://github.com/protocolbuffers/protobuf/blob/master/src/README.md

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CANmTPBZzBJM6wfLRGUadfmdQxsHKbtMcZdhRObZ_HQ-wRC7-7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Simon Chamlian

unread,
Sep 14, 2018, 9:34:48 AM9/14/18
to Nicolas Noble, grpc.io
Thanks Nicolas.

I did follow their instructions and I got:

============================================================================
Testsuite summary for Protocol Buffers 3.6.1
============================================================================
# TOTAL: 7
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================


But still getting same error message with the example:

jay@Nembuntu:~/grpc/examples/cpp/helloworld$ make
 DEPENDENCY ERROR

You don't have the grpc c++ protobuf plugin installed in your path.
Please install grpc. You can find it here:

   https://github.com/grpc/grpc

Here is what I get when trying to detect if you have the plugin:

which grpc_cpp_plugin
Makefile:104: recipe for target 'system-check' failed
make: [system-check] Error 1 (ignored)


Makefile:104: recipe for target 'system-check' failed
make: *** [system-check] Error 1
jay@Nembuntu:~/grpc/examples/cpp/helloworld$ ~


When I look in the Makefile, I see that this error message is generated on:
ifneq ($(HAS_PLUGIN),true)
    @echo " DEPENDENCY ERROR"
    @echo
    @echo "You don't have the grpc c++ protobuf plugin installed in your path."
    @echo "Please install grpc. You can find it here:"
    @echo
    @echo "   https://github.com/grpc/grpc"
    @echo
    @echo "Here is what I get when trying to detect if you have the plugin:"
    @echo
    -which $(GRPC_CPP_PLUGIN)
    @echo
    @echo
endif

where
PROTOC = protoc
PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3
PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN)
HAS_PLUGIN = $(shell $(PLUGIN_CHECK_CMD) > /dev/null && echo true || echo false

So basically, it is doing a (protoc --version | grep -q libprotoc.3):

jay@Nembuntu:~/grpc/examples/cpp/helloworld$ protoc --version | grep -q libprotoc.3
jay@Nembuntu:~/grpc/examples/cpp/helloworld$


But

jay@Nembuntu:~/grpc/examples/cpp/helloworld$ protoc --version
libprotoc 3.6.1


jay@Nembuntu:~/grpc/examples/cpp/helloworld$ protoc --version | grep libprotoc.3
libprotoc 3.6.1


Could it be that the -q in the grep is incorrect?

S.






To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

Nicolas Noble

unread,
Sep 15, 2018, 12:41:55 AM9/15/18
to simon.c...@mpbc.ca, grpc.io
-q means quiet. It transforms the behavior of grep to exit with a "true" or "false" status if there was a match or not.

At the end of the day, this is really just a quick helper, as indicated by the Makefile's comments. If you're certain everything is in place on your system, remove these constrains from the example's Makefile.

To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.

Simon Chamlian

unread,
Sep 19, 2018, 2:22:35 PM9/19/18
to Nicolas Noble, grpc.io
Nothing worked (remove the constraints.)

I finally copied the ~/grpc folder from the working machine onto the new machine and recompiled/re-installed (make, make install) to get the example running.

Weird.  I am the only one facing this issue?

Thanks,
S

Reply all
Reply to author
Forward
0 new messages