GRPC example fails to build

286 views
Skip to first unread message

dione...@gmail.com

unread,
Jun 10, 2017, 10:06:28 PM6/10/17
to bazel-discuss
I tried both the examples provided by grpc and https://github.com/mzhaom/trunk/blob/master/examples/rpc/bank.proto.

I get the following error when building:

ERROR: /home/dragos/trunk/examples/rpc/BUILD:3:1: in plugin attribute of generate_cc rule //examples/rpc:_bank_grpc_codegen: '@grpc//:grpc_cpp_plugin' does not have mandatory provider 'files_to_run'. Since this rule was created by the macro 'grpc_proto_library', the error might have been caused by the macro implementation in /home/dragos/trunk/tools/build_rules/grpc/cc_grpc_library.bzl:43:18

Any help would be greatly appreciated.

Dragos Ionescu

unread,
Jun 10, 2017, 10:34:36 PM6/10/17
to bazel-discuss


--
You received this message because you are subscribed to a topic in the Google Groups "bazel-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bazel-discuss/4Vu_uv9nZaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/d9d19b2d-77c1-4013-8de1-ee8e4328d77f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dione...@gmail.com

unread,
Jun 26, 2017, 1:24:44 PM6/26/17
to bazel-discuss, dione...@gmail.com
I saw a reply on the stack overflow thread so I wanted to follow up. There are a couple of issues here imo:

1. The logic in play seems extremely fragile. As noted on SO, several commits managed to unintentionally break / fix support. Is there any kind of test that can be added to prevent this in the future?

2. I personally spent many hours trying to debug this and did not get anywhere. By printing stuff, I could verify that the inputs / outputs were as expected but the failure message was not super helpful. Is there anything that can be done to make debugging this type of issues easier?

I'd be happy to open github bugs for any of the above. Finally, I wanted to ask if this issue is fixed in 0.5.2 release? If yes, maybe the fix should be mentioned in the release notes?

Kristina Chodorow

unread,
Jun 26, 2017, 1:49:23 PM6/26/17
to dione...@gmail.com, Marcel Hlopko, bazel-discuss
1. I've filed https://github.com/bazelbuild/bazel/issues/3266, feel free to add anything.

2. I assume you're talking about the "'@grpc//:grpc_cpp_plugin' does not have mandatory provider 'files_to_run'" message?  I'm not sure how much better we can make the error message, given that it was a bug in Bazel.  Theoretically an end user could legitimately hit this error message if they were using a rule set with a bug in it, but in your case tracking it down would have been an exercise in futility.

Based on a quick test I did, it does work on 0.5.2... so far.  Add Marcel as he's managing the release.



--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/52c578ce-e428-415e-8c96-b61ff00cc052%40googlegroups.com.

Marcel Hlopko

unread,
Jun 27, 2017, 7:38:17 AM6/27/17
to Kristina Chodorow, dione...@gmail.com, bazel-discuss
Vlad already added the test in https://github.com/bazelbuild/bazel/commit/36da18a6c8f4e9281eca1c9643a59fe16ab03c7c. It is true that the bug was fixed in March, then reintroduced, and fixed again in May. Hopefully now with the test this won't happen again. I confirm 0.5.2 doesn't have the bug.

On Mon, Jun 26, 2017 at 7:49 PM Kristina Chodorow <kcho...@google.com> wrote:
1. I've filed https://github.com/bazelbuild/bazel/issues/3266, feel free to add anything.

2. I assume you're talking about the "'@grpc//:grpc_cpp_plugin' does not have mandatory provider 'files_to_run'" message?  I'm not sure how much better we can make the error message, given that it was a bug in Bazel.  Theoretically an end user could legitimately hit this error message if they were using a rule set with a bug in it, but in your case tracking it down would have been an exercise in futility.

Based on a quick test I did, it does work on 0.5.2... so far.  Add Marcel as he's managing the release.
On Mon, Jun 26, 2017 at 1:24 PM, <dione...@gmail.com> wrote:
I saw a reply on the stack overflow thread so I wanted to follow up. There are a couple of issues here imo:

1. The logic in play seems extremely fragile. As noted on SO, several commits managed to unintentionally break / fix support. Is there any kind of test that can be added to prevent this in the future?

2. I personally spent many hours trying to debug this and did not get anywhere. By printing stuff, I could verify that the inputs  / outputs were as expected but the failure message was not super helpful. Is there anything that can be done to make debugging this type of issues easier?

I'd be happy to open github bugs for any of the above. Finally, I wanted to ask if this issue is fixed in 0.5.2 release? If yes, maybe the fix should be mentioned in the release notes?

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.

--
-- 
Marcel Hlopko | Software Engineer | hlo...@google.com | 

Google Germany GmbH | Erika-Mann-Str. 33  | 80636 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891
Reply all
Reply to author
Forward
0 new messages