Compile Caffe on Ubuntu15.10: undefined reference to google:base::CheckOpMessageBuilder

1,994 views
Skip to first unread message

rswt...@gmail.com

unread,
Dec 20, 2015, 2:34:38 AM12/20/15
to Caffe Users
make -j8 && make pycaffe:

//////////////////////////////////////////////////////////////////
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/caffe.bin
CXX/LD -o .build_release/tools/extract_features.bin
CXX/LD -o .build_release/tools/compute_image_mean.bin
CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin
CXX/LD -o .build_release/examples/mnist/convert_mnist_data.bin
.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]+0x41): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/convert_imageset.o: In function `main':
convert_imageset.cpp:(.text.startup+0x2e7): undefined reference to `google::SetUsageMessage(std::string const&)'
convert_imageset.cpp:(.text.startup+0x7ca): undefined reference to `google::protobuf::MessageLite::SerializeToString(std::string*) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
.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::Message::GetTypeName() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
.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 `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.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::MessageLite::ParseFromString(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::empty_string_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
Makefile:545: recipe for target '.build_release/tools/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1
make: *** Waiting for unfinished jobs....
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
.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::Message::GetTypeName() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageLite::SerializeToString(std::string*) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
.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 `boost::re_detail::build_releaseperl_matcher<__gnu_cxx/lib::__normal_iterator/libcaffe.so<char:  constundefined *,reference  stdto ::`googlestring>::, protobuf:std::internal:allocator::WireFormatLite<boost:::WriteStringMaybeAliased:sub_match(int<__gnu_cxx, ::std:__normal_iterator:string<char const const&,*, google std::::protobuf:string>:io >:: >CodedOutputStream*, )'boost:
.:regex_traitsbuild_release/lib/<charlibcaffe.so: , boostundefined reference::cpp_regex_traits to <char`google> >::protobuf >::::construct_initio::(boostCodedOutputStream::::WriteStringWithSizeToArraybasic_regex<char(std:, :stringboost: const:regex_traits&, <charunsigned , boostchar*)::'
cpp_regex_traits<.build_releasechar>/lib > /libcaffe.so> const: undefined&,  referenceboost: to:regex_constants `cv::_match_flags::imread)'(cv
.::Stringbuild_release/lib const&/libcaffe.so, : int)undefined '
reference .build_releaseto `/libgoogle:/libcaffe.so:protobuf: undefined::Message reference:: to DebugString(`google) ::const'protobuf:
.:internalbuild_release/::lib/WireFormatLite:libcaffe.so::ReadString undefined(google reference:: toprotobuf: `:iogoogle::::baseCodedInputStream*::, CheckOpMessageBuilder:std::NewString:string()*)'
'
.build_release.build_release/lib/lib/libcaffe.so/libcaffe.so: : undefined undefined reference reference to to `google`google::::protobuf:protobuf::internal:Message::::WireFormatLite:GetTypeName(:WriteBytesMaybeAliased) const(int,'
 std.build_release::/libstring /libcaffe.soconst&: , undefined google:reference :protobufto `::google:io::protobuf:CodedOutputStream::internal*)'::StringTypeHandlerBase
.::build_release/Delete(lib/std:libcaffe.so::string undefined*)' reference
. tobuild_release/ `lib/google:libcaffe.so::protobuf undefined::internal reference ::to StringTypeHandlerBase`boost::New::match_results()'<__gnu_cxx
.::__normal_iteratorbuild_release/lib<char /libcaffe.soconst*: , undefined std:reference :stringto `>, cv::std::imdecode(allocator<cv:boost::_InputArray:sub_match const<__gnu_cxx&, ::int)__normal_iterator<'
char .build_releaseconst*/lib, /libcaffe.sostd:: :stringundefined > >reference  >to  >`google::::maybe_assign(protobuf:boost::MessageLite:match_results::<__gnu_cxxParseFromString(::std:__normal_iterator:string<char const const&)*,'
 std.build_release::/libstring>/libcaffe.so, : std:undefined :allocatorreference <boostto ::`googlesub_match<::__gnu_cxx:protobuf::__normal_iterator:internal<char:: constempty_string_'*,
. stdbuild_release/::lib/string>libcaffe.so: > undefined > reference > to const `&)google:'
:protobuf.build_release::/libinternal:/libcaffe.so:WireFormatLite: ::undefined WriteString(reference int,to  std`google::::string protobuf:const&:MessageLite, ::google:SerializeToString:protobuf(std::::io:string*:CodedOutputStream) *)const''

..build_releasebuild_release//liblib//libcaffe.solibcaffe.so::  undefinedundefined  referencereference  toto  ``leveldbgoogle::::protobufStatus::::ToStringMessageFactory:():InternalRegisterGeneratedFile const(char'
 const.build_release*,/lib void/libcaffe.so (: *)undefined (stdreference ::to string `googleconst&::))protobuf:'
:DescriptorPool.build_release::/libFindFileByName(/libcaffe.sostd:: :stringundefined  constreference &)to  const`cv'
.::build_release/imencode(lib/cv:libcaffe.so::String undefined const reference&, to cv `::google:_InputArray :protobufconst&::, internalstd::::vectorWireFormatLite:<unsigned:ReadBytes char(google, ::std:protobuf::allocator:io<unsigned:: charCodedInputStream*> , >&std:, :stringstd:*):vector'
<int.build_release, /lib/std:libcaffe.so::allocator undefined<int reference>  to>  `const&google:)'
:protobuf.build_release::/libMessage:/libcaffe.so:InitializationErrorString: ()undefined  constreference '
to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.build_release/lib/libcaffe.so: undefined reference to `collect2: error: ld returned 1 exit status
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined referenceMakefile:545: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
 make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.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::MessageLite::ParseFromString(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::empty_string_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
Makefile:545: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1
.build_release/tools/compute_image_mean.o: In function `std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x40): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/compute_image_mean.o: In function `std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)':
compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x41): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/compute_image_mean.o: In function `main':
compute_image_mean.cpp:(.text.startup+0xee): undefined reference to `google::SetUsageMessage(std::string const&)'
compute_image_mean.cpp:(.text.startup+0x1da): undefined reference .to `google::protobuf::MessageLite::ParseFromString(std::build_releasestring const/examples&/mnist/)convert_mnist_data.o: '
In functioncompute_image_mean.cpp `convert_dataset:(char (const*,. char text.startupconst*,+ char 0x3acconst*,) std:: :string undefinedconst&) ':
referenceconvert_mnist_data.cpp:( .text+to0x4c6):  undefined `reference togoogle `leveldb::::DBprotobuf::Open:(leveldb:::Options MessageLiteconst&,: std:::string ParseFromStringconst&,( leveldb:std:DB*:*)':
convert_mnist_data.cppstring:(. text+0x975const): &undefined reference) to '`google:
:protobuf.::internalbuild_release/::empty_string_lib'
convert_mnist_data.cpp/libcaffe.so:(.:text+0x9ee ): undefinedundefined reference  to `referencegoogle:: protobuf::toMessageLite:: SerializeToString(std`::stringgoogle*) :const'
:.build_release/protobufexamples/mnist:/convert_mnist_data.o:: In internalfunction `:std:::string* WireFormatLitegoogle::MakeCheckOpString::<int,WriteStringMaybeAliased int>((int intconst&,, int  const&,std char :const*):':
stringconvert_mnist_data.cpp:( .text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKcconst[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc&]+0x40,):  undefined referencegoogle to :`google::protobuf:base:::CheckOpMessageBuilder:::NewString(io)'
:.build_release/:examples/mnistCodedOutputStream/convert_mnist_data.o:* In )function `'std::
string* .google::build_releaseMakeCheckOpString<unsigned/ int,lib int>/libcaffe.so(unsigned :int const &, undefinedint const &, referencechar const *)'to:
convert_mnist_data.cpp `:(.google:text._ZN6google17MakeCheckOpStringIjiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIjiEEPSsRKT_RKT0_PKc:protobuf]+0x40:): :undefined referenceio to `:google:::base::CodedOutputStreamCheckOpMessageBuilder:::NewString():'
.WriteStringWithSizeToArraybuild_release/examples(/mnist/stdconvert_mnist_data.o: ::In functionstring `std ::stringconst* google&::MakeCheckOpString,<unsigned  int, unsignedunsigned int >(unsignedchar int *const&,) unsigned 'int const
&, .char constbuild_release*)'/:
convert_mnist_data.cpplib/:(.libcaffe.so:text._ZN6google17MakeCheckOpStringIjjEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIjjEEPSsRKT_RKT0_PKc undefined]+0x40 ): referenceundefined reference  to to`google: :base:`:CheckOpMessageBuilder:cv:NewString(:)'
:.build_release/imreadexamples/mnist(/convert_mnist_data.o:cv In :function `:main':String
convert_mnist_data.cpp: (.text.startupconst+0xb9)&: undefined, reference  to `intgoogle::)SetUsageMessage(std'::string
 const&.)'
build_release.build_release//lib/liblibcaffe.so: /undefined referencelibcaffe.so to :`google: :protobuf:undefined:internal: reference:WireFormatLite: to:WriteStringMaybeAliased( int, `std::googlestring const:&, :google::protobufprotobuf:::io:::CodedOutputStream*)internal'
.:build_release/lib:/libcaffe.so:WireFormatLite undefined :reference to: `googleReadString::protobuf(::iogoogle::CodedOutputStream::::WriteStringWithSizeToArrayprotobuf(std:::string :const&,io unsigned :char*):'
.CodedInputStreambuild_release/lib*/libcaffe.so:, undefined  reference tostd `cv:::imread:(cv:string:String *const&,) int)'
'
..build_release/libbuild_release/libcaffe.so:/lib undefined /reference tolibcaffe.so `google:::protobuf undefined::internal ::WireFormatLitereference::ReadString (google:to:protobuf: :io:`:CodedInputStream*google, std:::string:*)'protobuf
.build_release:/lib/:libcaffe.so: Messageundefined reference: to :`google:GetTypeName:protobuf:(:Message:):GetTypeName( ) constconst'
.'
build_release/lib./libcaffe.so:build_release undefined /reference tolib `google/::protobuflibcaffe.so::internal:::StringTypeHandlerBase undefined::Delete (std:reference:string* )'
to.build_release/ lib/libcaffe.so`: undefinedgoogle reference :to `:boost::protobufmatch_results<__gnu_cxx:::__normal_iterator:<char internalconst*,: std:::string>StringTypeHandlerBase, std:::allocator:<boost:Delete:sub_match<(__gnu_cxx::std__normal_iterator<char:: const*string, std*::string)> >' > 
>::.maybe_assign(boostbuild_release::match_results/lib<__gnu_cxx:/:__normal_iterator<libcaffe.sochar const:*,  std::undefinedstring>,  std:reference:allocator< toboost:: sub_match<__gnu_cxx`::__normal_iteratorboost<char :const*,: stdmatch_results::string<> >__gnu_cxx > :> const:&)'__normal_iterator
.build_release<char/lib/ libcaffe.so: constundefined reference*, to  `google:std:protobuf:::MessageFactory:::InternalRegisterGeneratedFilestring(char >const*,, void  (*)std(std:::string: const&allocator))'<
.build_releaseboost/lib/:libcaffe.so: :undefined referencesub_match to <`cv:__gnu_cxx:imencode(:cv:::String const__normal_iterator&, <cv::char_InputArray const &, conststd::*vector<unsigned, char,  std:std:allocator<:unsigned char:> >string&, >std:: vector<int>, std ::allocator><int>  > >const&):'
.:build_release/libmaybe_assign/libcaffe.so:( undefined boostreference to: `boost:::re_detailmatch_results::perl_matcher<<__gnu_cxx:__gnu_cxx:__normal_iterator<::char const__normal_iterator*, <std::charstring>,  std:const:allocator<*boost::,sub_match<__gnu_cxx ::__normal_iteratorstd<char ::const*,string std:>:string>, >  >, stdboost:::regex_traits<char:, boostallocator::cpp_regex_traits<boost<char>: > :>::construct_initsub_match(boost:<:basic_regex<__gnu_cxxchar, :boost:::regex_traits<char__normal_iterator, boost<::cpp_regex_traitschar<char>  > const> const*&, ,boost:: regex_constants::std_match_flags)':
.build_release:/lib/stringlibcaffe.so: >undefined reference > to  `google:>:protobuf: >:Message: :DebugString(const) const&'
.)build_release/lib'/libcaffe.so:
 undefined .reference build_releaseto `/google::libprotobuf::/internal::libcaffe.soWireFormatLite:::WriteBytesMaybeAliased(int , stdundefined::string reference const& , googleto::protobuf ::io`::googleCodedOutputStream*):'
.:build_release/libprotobuf/libcaffe.so:: undefined :MessageLitereference to: `google:::protobufSerializeToString::internal(::StringTypeHandlerBasestd::New:()':
.build_releasestring/lib/*libcaffe.so: )undefined reference  toconst `cv'::imdecode
(cv:.:_InputArray build_releaseconst&,/lib int)/'
.libcaffe.sobuild_release/lib:/libcaffe.so:  undefined undefinedreference to  `googlereference::protobuf ::MessageLiteto::ParseFromString (std:`:string googleconst&):'
.:build_release/libprotobuf/libcaffe.so:: undefined :reference toMessageFactory `google:::protobuf:::internalInternalRegisterGeneratedFile::WireFormatLite(::WriteStringchar(int,  std:const:string *const&,, google: :protobuf:void:io: :CodedOutputStream*()'
*.build_release/)lib/libcaffe.so(: undefinedstd reference :to `:leveldb::stringStatus:: ToString()const const'&
.build_release)/lib/)libcaffe.so: 'undefined reference
 to .`google:build_release:protobuf:/:DescriptorPoollib::FindFileByName/libcaffe.so(std:::string  undefinedconst&)  const'reference
.build_release /lib/tolibcaffe.so:  undefined reference` to cv`google:::protobuf:::internal:imencode:WireFormatLite:(:ReadBytes(cvgoogle:::protobuf:::io::StringCodedInputStream*,  std:const:string*&)'
,.build_release/ lib/libcaffe.socv: undefined: reference :to `_InputArraygoogle:: protobuf::constMessage::&InitializationErrorString(), const' 
std::vector<unsigned char, std::allocator<unsigned collect2: error: ld returned 1 exit status
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: undefinedMakefile:550: recipe for target '.build_release/examples/mnist/convert_mnist_data.bin' failed
 referencemake: *** [.build_release/examples/mnist/convert_mnist_data.bin] Error 1
 to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.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 `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined. reference to build_release`leveldb/tools::/caffe.o:Status In :function `:std::ToStringstring* (google::)MakeCheckOpString<int , intconst>(int' const&
., intbuild_release const&/lib, char/ const*libcaffe.so)'::
caffe.cpp: (.undefinedtext._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc reference]+0x40 ): toundefined reference  to ``google:google:base:::CheckOpMessageBuilder:::NewString(protobuf)'
:.build_release/:tools/caffe.oDescriptorPool: In: function :`std:FindFileByName:string(* googlestd::MakeCheckOpString:<unsigned :long, stringint>( unsigned longconst const&&, int) const& , charconst const*')':

caffe.cpp:.(.build_releasetext._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc/lib]+0x41/): libcaffe.soundefined reference: to  `google:undefined:base: :CheckOpMessageBuilderreference::NewString ()'to
.build_release `/tools/googlecaffe.o: :In function: `mainprotobuf':
:caffe.cpp:(:.text.startup+internal0x34):: undefined :reference toWireFormatLite `google:::SetUsageMessage:(std:ReadBytes:string (const&)google'
.:build_release/:tools/caffe.oprotobuf: In: function :`std:io:string*: google:::MakeCheckOpString<CodedInputStreamint, *float>(,int const &, stdfloat const:&, :char conststring*)'*:
caffe.cpp):(.'
text._ZN6google17MakeCheckOpStringIifEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIifEEPSsRKT_RKT0_PKc.build_release]+0x45/): libundefined reference/libcaffe.so to :`google: undefined:base: :CheckOpMessageBuilder:reference:NewString( )'
to.build_release/ lib/libcaffe.so`: undefinedgoogle reference :to `:google::protobufprotobuf:::internal:::WireFormatLite::MessageWriteStringMaybeAliased(int:, std:::stringInitializationErrorString const&(), google ::protobufconst::io'::CodedOutputStream
*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArraycollect2: error: ld returned 1 exit status
(std::string const&, unsigned char*)'
.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::Message::GetTypeName() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std:Makefile:545: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make: *** [.build_release/tools/compute_image_mean.bin] Error 1
:string*)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageLite::SerializeToString(std::string*) const'
..build_release/lib/libcaffe.sobuild_release: /undefined examplesreference /cifar10to /convert_cifar_data.o`google: ::Inprotobuf function:: `MessageFactory:convert_dataset(:InternalRegisterGeneratedFilestd:(char:string const const*,&, void std (::*)string (stdconst&::, string std:const&:string)) const'
&).build_release':/lib
convert_cifar_data.cpp/libcaffe.so:(: .textundefined +0x48ereference ):to  undefined` referencecv: to:imencode `(cvgoogle::::protobufString ::const&MessageLite:, :SerializeToStringcv:(std:_InputArray:: conststring*&,)  stdconst'::
convert_cifar_data.cppvector<:(unsigned .char, textstd::+allocator<unsigned0x53a char>) >&:, std undefined:: referencevector< toint, ` stdgoogle::::protobufallocator<::int>internal: >:empty_string_ const'
&)convert_cifar_data.cpp'
:(.build_release.text/lib+0x931/libcaffe.so)::  undefinedundefined  referencereference  toto  ``leveldbgoogle::::protobufDB::::OpenMessageLite:(leveldb:SerializeToString::(stdOptions ::const&string*, ) std:const':string
convert_cifar_data.cpp const:(&,.text leveldb+0x9d9::):DB* undefined*) reference'
 to.build_release `/libgoogle:/libcaffe.so:protobuf: ::undefined internal:reference :empty_string_to '
`boost.build_release::/libre_detail:/libcaffe.so:perl_matcher: <__gnu_cxxundefined ::reference __normal_iteratorto <char`google const::*,protobuf: std:internal::::string>WireFormatLite, ::std:WriteStringMaybeAliased:allocator(int<boost, ::std:sub_match<:string__gnu_cxx: const:__normal_iterator&,<char google const::*,protobuf std::::io:string>:CodedOutputStream >*) >'
, .build_releaseboost:/lib:regex_traits/libcaffe.so<char: , undefinedboost reference:: tocpp_regex_traits< `char>google: >:protobuf >::::io:construct_init(:CodedOutputStreamboost::::basic_regexWriteStringWithSizeToArray(<charstd:, :stringboost: const:regex_traits&,<char unsigned,  charboost:*):cpp_regex_traits'
<char.build_release> /lib> /libcaffe.so> : const&undefined , reference boost:to :regex_constants`cv::::_match_flags)imread('
cv:.build_release:String/lib const/libcaffe.so&,:  intundefined )'reference 
.to `build_release/google:lib/:protobuflibcaffe.so::: undefinedMessage: reference:DebugString to() ` constgoogle:'
:protobuf.build_release::/libinternal:/libcaffe.so:WireFormatLite: ::undefined ReadString(referencegoogle to:: `protobuf:google::io:protobuf::::CodedInputStream*internal:, :WireFormatLitestd::::stringWriteBytesMaybeAliased*)(int'
, .build_releasestd:/lib:string/libcaffe.so const: &,undefined  googlereference ::to protobuf:`google:io::::protobuf:CodedOutputStream:Message*)::'
GetTypeName.()build_release/ constlib/'
libcaffe.so:.build_release undefined/lib reference/libcaffe.so to:  `undefinedgoogle reference:: toprotobuf: `:internalgoogle::::protobufStringTypeHandlerBase::::internalNew(::)'StringTypeHandlerBase
.::build_release/Delete(lib/std:libcaffe.so:string: *)undefined '
reference .build_releaseto /lib`cv/libcaffe.so::: imdecode(undefined cv:reference :_InputArrayto  const`boost&,:: intmatch_results)'<__gnu_cxx
.::build_release__normal_iterator/lib<char/libcaffe.so const: *,undefined  stdreference ::to string>`google, ::std::protobuf:allocator<:MessageLiteboost::::sub_matchParseFromString(<__gnu_cxxstd::::string__normal_iterator< constchar &)const*'
, .std:build_release/:stringlib/> libcaffe.so:>  undefined>  reference>: to:maybe_assign `(boostgoogle::::protobufmatch_results<::__gnu_cxx:internal::__normal_iterator:empty_string_<char'
 const.build_release*,/lib std/libcaffe.so::: string>undefined , reference std:to :allocator`google<boost::::protobuf:sub_match<:internal__gnu_cxx::::__normal_iteratorWireFormatLite:<char:WriteString const(int*,,  stdstd::::stringstring> const >&, > google >:: constprotobuf:&):io'
::.build_releaseCodedOutputStream*/lib)'/libcaffe.so
.: build_release/undefined lib/reference libcaffe.so:to  undefined`google reference:: toprotobuf: `:MessageFactoryleveldb::::StatusInternalRegisterGeneratedFile::(charToString( const) *,const' void
. (build_release/*)lib/(stdlibcaffe.so::: undefinedstring  referenceconst& to)) `'
google:.build_release:protobuf/lib::/libcaffe.soDescriptorPool:: :FindFileByNameundefined (stdreference ::to string `cvconst&::) imencodeconst(cv'
::.build_releaseString /libconst&/libcaffe.so, : cv:undefined :_InputArrayreference  constto &,`google std::::protobuf:vector<:internalunsigned ::char,WireFormatLite std::::ReadBytes(allocator<google:unsigned :protobufchar>:: >io:&,:CodedInputStream std*,:: stdvector<::int,string* std)'::
.allocator<build_release/int>lib/ >libcaffe.so: const undefined&) reference'
 to.build_release `/libgoogle:/libcaffe.so:protobuf: ::undefined Message:reference :InitializationErrorStringto ()`leveldb const::'
DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
.collect2: error: ld returned 1 exit status
build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost:Makefile:545: recipe for target '.build_release/tools/caffe.bin' failed
:make: *** [.build_release/tools/caffe.bin] Error 1
regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.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::MessageLite::ParseFromString(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
Makefile:550: recipe for target '.build_release/examples/cifar10/convert_cifar_data.bin' failed
make: *** [.build_release/examples/cifar10/convert_cifar_data.bin] Error 1
.build_release/tools/extract_features.o: In function `std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
extract_features.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x40): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/extract_features.o: In function `std::string* google::MakeCheckOpString<unsigned int, int>(unsigned int const&, int const&, char const*)':
extract_features.cpp:(.text._ZN6google17MakeCheckOpStringIjiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIjiEEPSsRKT_RKT0_PKc]+0x40): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/extract_features.o: In function `std::string* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)':
extract_features.cpp:(.text._ZN6google17MakeCheckOpStringImmEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPSsRKT_RKT0_PKc]+0x42): undefined reference to `google::base::CheckOpMessageBuilder::NewString()'
.build_release/tools/extract_features.o: In function `int feature_extraction_pipeline<float>(int, char**)':
extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc[_Z27feature_extraction_pipelineIfEiiPPc]+0x9af): undefined reference to `google::protobuf::internal::empty_string_'
extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc[_Z27feature_extraction_pipelineIfEiiPPc]+0xd45): undefined reference to `google::protobuf::MessageLite::SerializeToString(std::string*) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
.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::Message::GetTypeName() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
.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 `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::DebugString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.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::MessageLite::ParseFromString(std::string const&)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
.build_release/lib/libcaffe.so: undefined reference to `leveldb::Status::ToString() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
Makefile:545: recipe for target '.build_release/tools/extract_features.bin' failed
make: *** [.build_release/tools/extract_features.bin] Error 1

Tman Nen

unread,
Dec 20, 2015, 3:36:21 AM12/20/15
to Caffe Users
Have you compiled some parts with a different version of a compiler? I had problems when I compiled caffe with 4.x since I believe it uses some components that are installed by default in Ubuntu 15.10 (which are compiled with 5.x), but in some cases these aren't compatible (some String-thing was changed between the versions).
...

rswt...@gmail.com

unread,
Dec 20, 2015, 11:21:38 PM12/20/15
to Caffe Users
I tried gcc-5.2、gcc-4.7、gcc-4.8,but the String problems still remained

在 2015年12月20日星期日 UTC+8下午4:36:21,Tman Nen写道:
...

Tman Nen

unread,
Dec 21, 2015, 1:46:41 AM12/21/15
to Caffe Users
If you changed compilers after one compilation failed, I think the new compilation uses some elements from the previous compilation.

I don't remember the exact error message I got but I remember it looked very similar to yours. I fixed it by starting from scratch (reinstalled linux.. luckily I didn't have any personal settings to keep) and compiling everything with the default Ubuntu 15.10 compiler. If you can't find other solutions to your problem, you could try the same thing on a clean install on a VM
...
Reply all
Reply to author
Forward
0 new messages