cpp protoc errors in example code

1,011 views
Skip to first unread message

br...@surround.io

unread,
Apr 24, 2015, 2:24:50 PM4/24/15
to grp...@googlegroups.com
I tried running some of the protoc commands manually on a proto file I have created, but I've only been able to get the second command to work. 

$ protoc -I ../../protos --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../../protos/route_guide.proto
$ protoc -I ../../protos --cpp_out=. ../../protos/route_guide.proto
The second command works as expected, but the first command spits out the following:

route_guide.pb.h: Tried to insert into file that doesn't exist.
route_guide.pb.h: Tried to insert into file that doesn't exist.
route_guide.pb.cc: Tried to insert into file that doesn't exist.
route_guide.pb.cc: Tried to insert into file that doesn't exist.

In order to see if this was user error, I cloned the example code and attempted to run the makefile, but I get similar results:

$ make
protoc -I ../../protos --cpp_out=. ../../protos/route_guide.proto
g++ -std=c++11 -I/home/me/ws/var/release/install/include -I/usr/local/include -pthread  -c -o route_guide.pb.o route_guide.pb.cc
protoc -I ../../protos --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../../protos/route_guide.proto
route_guide.pb.h: Tried to insert into file that doesn't exist.
route_guide.pb.h: Tried to insert into file that doesn't exist.
route_guide.pb.cc: Tried to insert into file that doesn't exist.
route_guide.pb.cc: Tried to insert into file that doesn't exist.
make: *** [route_guide.grpc.pb.cc] Error 1

Any guidance? 

Nicolas Noble

unread,
Apr 24, 2015, 4:06:42 PM4/24/15
to br...@surround.io, grp...@googlegroups.com
You're using an old version of the plugin. In this pull request, I have modified the way the plugin works. The examples and the way you're trying to compile is only representative of the new plugin.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/202d65b4-440d-4e92-9042-a3beac674a7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Dunlay

unread,
Apr 24, 2015, 5:02:01 PM4/24/15
to Nicolas Noble, grp...@googlegroups.com
I see. I am using the 0.6 release branch, which seems two days behind when your PR was merged. Guess bleeding the edge is where it's at. Thanks.

Nicolas Noble

unread,
Apr 24, 2015, 5:06:29 PM4/24/15
to Brian Dunlay, grp...@googlegroups.com
If you actually want or need to stay at 0.6, then you need to run a single command, such as this:

$ protoc -I ../../protos --cpp_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../../protos/route_guide.proto

Brian Dunlay

unread,
Apr 24, 2015, 5:25:24 PM4/24/15
to Nicolas Noble, grp...@googlegroups.com
Great, thanks Nicholas.
Reply all
Reply to author
Forward
0 new messages