Caffe Installation: Stuck on "make all"

311 views
Skip to first unread message

samuel....@gmail.com

unread,
May 4, 2017, 5:47:24 PM5/4/17
to Caffe Users
I've been following the installation instructions for Caffe for Ubuntu 16.04, Cuda 8.0, Python 2.7, but when I reach "make all", I get this error:

CXX/LD -o .build_release/tools/convert_imageset.bin
/usr/bin/ld: warning: libprotobuf.so.9, needed by .build_release/lib/libcaffe.so, may conflict with libprotobuf.so.13
.build_release/tools/convert_imageset.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
convert_imageset.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.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 to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::New()'
.build_release/lib/libcaffe.so: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::empty_string_'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
Makefile:626: recipe for target '.build_release/tools/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1

I have leveldb, protobuf, opencv installed, so I'm not quite sure what the error is and how to fix it. Any guidance would be greatly appreciated.

Regards,
Sam

Christopher Heiny

unread,
May 9, 2017, 8:29:08 PM5/9/17
to Caffe Users


On Thursday, May 4, 2017 at 2:47:24 PM UTC-7, samuel....@gmail.com wrote:
I've been following the installation instructions for Caffe for Ubuntu 16.04, Cuda 8.0, Python 2.7, but when I reach "make all", I get this error:

CXX/LD -o .build_release/tools/convert_imageset.bin
/usr/bin/ld: warning: libprotobuf.so.9, needed by .build_release/lib/libcaffe.so, may conflict with libprotobuf.so.13
.build_release/tools/convert_imageset.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
convert_imageset.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::string*)'

[snip]

I'm struggling with this issue as well. on Fedora 24.  Have you gotten any further?

Googling around the webternet indicates that this may be because protobuf (and in your case opencv) libraries are compiled with an incompatible version of GCC (probably 6.x) than the one compiling caffe (I'm using 5.3.1).  There's a number of suggestions relating to various flags that can be tweaked, but so far none have helped.  I'm still working through the possibilities, but it's starting to look like I might need to compile my own version of protobuf and link to that.

Cheers,
Chris
Reply all
Reply to author
Forward
0 new messages