what version of protoc does caffe want

2,815 views
Skip to first unread message

Dan Buckler

unread,
Jun 22, 2015, 7:34:50 PM6/22/15
to caffe...@googlegroups.com
When compiling caffe on centos I get 
/root/caffe-master/include/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
/root/caffe-master/include/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
/root/caffe-master/include/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
make[2]: *** [src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/proto.dir/all] Error 2
I have 
 /usr/bin/protoc --version
libprotoc 2.3.0
I have tried several versions of glog and protobuf. Does anyone have a list of the what version of the componants are needed? 

Dustin Webb

unread,
Jul 24, 2015, 2:00:33 PM7/24/15
to Caffe Users, dan.b...@gmail.com
Did you find a solution to this issue? I am running into exactly this same problem though I have protoc 3.0.0.

Sudeshna Roy

unread,
Jun 21, 2016, 6:57:10 AM6/21/16
to Caffe Users, dan.b...@gmail.com
This is because the the caffe was built with an older version of protoc, a fresh build should solve the problem.

Just go to your caffe folder, delete the previous build folder (e.g.,  .build_release) and make.

Thanks!

BlueRayONE

unread,
May 25, 2017, 5:38:50 AM5/25/17
to Caffe Users
I'm experiencing the same issue as Dan.
What is the current required version of protobuf and protoc to compile caffe? The newest? Or an older special one? With 2.5.0 (and 2.3.0 of course) it doesn't work.

Olzhas Kadyrakunov

unread,
Oct 18, 2017, 11:09:57 PM10/18/17
to Caffe Users
Thanks for your input Sudeshna!

I've recently switched from protobuf 2.6.1 to a newer version, which is 3.4.0. I deleted the old build folder, and then when trying to make, I get the following error:

 "In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is"
.

I guess, this is because I'm already using protobuf 3.4.0, while the "syntax" variable in caffe.proto is still set to proto2. Do you know a simple way to rewrite the whole caffe.proto file using the proto3 syntax instead? I know that all the "optional" and "required" keywords should be removed (which I did). However, some other modifications seem to be required (e.g., removing all the explicit default values).

Sorry if this is a bit off topic.
Reply all
Reply to author
Forward
0 new messages