Caffe: Caffe compile error: undefined reference to `google::protobuf

Created on 6 Aug 2016  路  6Comments  路  Source: BVLC/caffe

I am trying to compile Caffe on my ubuntu 16.04. I have successfully installed several times before, but it failed this time for some reason returning the below error messages. I have tried every solution I found in the web corresponding to this issue, nothing worked unfortunately. Any help would be appreciated.

$ make all
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
/usr/bin/ld: warning: libprotobuf.so.9, needed by .build_release/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::string*)' .build_release/lib/libcaffe.so: undefined reference togoogle::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::io::CodedInputStream::ReadVarint64Fallback(unsigned long*)' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::io::CodedInputStream::ReadTagFallback()'
.build_release/lib/libcaffe.so: undefined reference to cv::imread(std::string const&, int)' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int_)'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const_, google::protobuf::Message const_, int const_, int, int, int, google::protobuf::DescriptorPool const_, google::protobuf::MessageFactory_, int)' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
.build_release/lib/libcaffe.so: undefined reference toleveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB*_)' .build_release/lib/libcaffe.so: undefined reference tocv::imencode(std::string const&, cv::_InputArray const&, std::vector >&, std::vector > const&)'
.build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::io::CodedOutputStream::WriteVarint32(unsigned int)'
.build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::UnknownFieldSet::UnknownFieldSet()' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::Message::~Message()'
.build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Swap(google::protobuf::internal::RepeatedPtrFieldBase_)' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::UnknownFieldSet::~UnknownFieldSet()'
.build_release/lib/libcaffe.so: undefined reference toleveldb::Status::ToString() const' .build_release/lib/libcaffe.so: undefined reference togoogle::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char_)'
collect2: error: ld returned 1 exit status
Makefile:616: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *_* [.build_release/tools/upgrade_net_proto_text.bin] Error 1

All 6 comments

I just came across absolutely the same problem and felt helpless. It's just the first time for me to install caffe.

It's the 1.58 version of boost that seems not supported by caffe so far. I am trying to compile it with the 1.55 version.

have one get the answer?

Remove protobuf-compiler
Compile protobuf 2.5 from source

From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:

_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

There is no clear answer for this question in the caffe-users list.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shiorioxy picture shiorioxy  路  3Comments

sdemyanov picture sdemyanov  路  3Comments

iamhankai picture iamhankai  路  3Comments

malreddysid picture malreddysid  路  3Comments

weather319 picture weather319  路  3Comments