facebookarchive / C3D

C3D is a modified version of BVLC caffe to support 3D ConvNets.
Other
1.16k stars 507 forks source link

protobuf version #364

Closed yanjiaweisysu closed 6 years ago

yanjiaweisysu commented 6 years ago

Which version of protobuf should be used for C3D v1.1?

I tried protobuf 3.0 and there is error:

.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer headers. Please update

I also tried protobuf 3.5 and the error is:

.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const' collect2: error: ld returned 1 exit status make: *** [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1

I also tried protobuf 2.6, 3.2, 3.4, none of them works. Could you please give me some hint? Thanks!

XiongChengxin commented 6 years ago

Maybe you could try to type "make clean". I met the same error and solve it by this.

yanjiaweisysu commented 6 years ago

@XiongChengxin Thanks this solved the undefined reference problem, but I have new errors with protobuf 3.5.1 (with lower versions of protobuf it said please update):

.build_release/src/caffe/proto/caffe.pb.cc: In member function ‘void caffe::BlobProtoVector::InternalSwap(caffe::BlobProtoVector*)’: .build_release/src/caffe/proto/caffe.pb.cc:5505:21: error: ‘CastToBase’ was not declared in this scope CastToBase(&blobs_)->InternalSwap(CastToBase(&other->blobs_)); ^ .build_release/src/caffe/proto/caffe.pb.cc: In member function ‘virtual void caffe::Datum::Clear()’: .build_release/src/caffe/proto/caffe.pb.cc:5599:11: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘UnsafeMutablePointer’ data_.UnsafeMutablePointer()->clear();

I check by myself and there sure is no ‘UnsafeMutablePointer’. I'm really confused now...

yanjiaweisysu commented 6 years ago

Problem solved by installing and compiling protobuf by myself. I installed protobuf by conda before. The version is 3.5 if I don't remember wrong.