Caffe compilation error Ubuntu 16.04

128 views
Skip to first unread message

Gonzalo Benito

unread,
May 25, 2017, 6:23:12 PM5/25/17
to Caffe Users
Hello there, as many other new users, i am trying to install Caffe in Ubuntu 16.04 with Anaconda 2 and CUDA 8.0. I am new both to Ubuntu as well as Caffe, but as i am studying deep learning, i need these tools. The problem comes when i follow the steps in the Caffe CMake build (http://caffe.berkeleyvision.org/installation.html#compilation). After running make all -j4 i get this:

[ 86%] Linking CXX executable upgrade_solver_proto_text
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::DebugString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::GetTypeName[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)' sin definir
collect2: error: ld returned 1 exit status
tools/CMakeFiles/upgrade_solver_proto_text.dir/build.make:135: fallo en las instrucciones para el objetivo 'tools/upgrade_solver_proto_text'
make[2]: *** [tools/upgrade_solver_proto_text] Error 1
../lib/libcaffe.so.1.0.0: referencia a `google::protobufCMakeFiles/Makefile2:505: fallo en las instrucciones para el objetivo 'tools/CMakeFiles/upgrade_solver_proto_text.dir/all'
make[1]: *** [tools/CMakeFiles/upgrade_solver_proto_text.dir/all] Error 2
::Messagemake[1]: *** Se espera a que terminen otras tareas....
::DebugString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::GetTypeName[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)' sin definir
collect2: error: ld returned 1 exit status
tools/CMakeFiles/upgrade_net_proto_text.dir/build.make:135: fallo en las instrucciones para el objetivo 'tools/upgrade_net_proto_text'
make[2]: *** [tools/upgrade_net_proto_text] Error 1
CMakeFiles/Makefile2:581: fallo en las instrucciones para el objetivo 'tools/CMakeFiles/upgrade_net_proto_text.dir/all'
make[1]: *** [tools/CMakeFiles/upgrade_net_proto_text.dir/all] Error 2
CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: En la función `main':
compute_image_mean.cpp:(.text.startup+0x313): referencia a `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' sin definir
compute_image_mean.cpp:(.text.startup+0x4a3): referencia a `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::DebugString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::GetTypeName[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)' sin definir
collect2: error: ld returned 1 exit status
tools/CMakeFiles/compute_image_mean.dir/build.make:135: fallo en las instrucciones para el objetivo 'tools/compute_image_mean'
make[2]: *** [tools/compute_image_mean] Error 1
CMakeFiles/Makefile2:467: fallo en las instrucciones para el objetivo 'tools/CMakeFiles/compute_image_mean.dir/all'
make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2
CMakeFiles/extract_features.dir/extract_features.cpp.o: En la función `int feature_extraction_pipeline<float>(int, char**)':
extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc[_Z27feature_extraction_pipelineIfEiiPPc]+0xc60): referencia a `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]' sin definir
extract_features.cpp:(.text._Z27feature_extraction_pipelineIfEiiPPc[_Z27feature_extraction_pipelineIfEiiPPc]+0x1474): referencia a `google::protobuf::MessageLite::SerializeToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::DebugString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::GetTypeName[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const*, int)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' sin definir
../lib/libcaffe.so.1.0.0: referencia a `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)' sin definir
collect2: error: ld returned 1 exit status
tools/CMakeFiles/extract_features.dir/build.make:135: fallo en las instrucciones para el objetivo 'tools/extract_features'
make[2]: *** [tools/extract_features] Error 1
CMakeFiles/Makefile2:543: fallo en las instrucciones para el objetivo 'tools/CMakeFiles/extract_features.dir/all'
make[1]: *** [tools/CMakeFiles/extract_features.dir/all] Error 2
Makefile:127: fallo en las instrucciones para el objetivo 'all'


I have tried with reinstalling protobuf but results are the same. Any sugestion of what can be done?

Gonzalo Benito

unread,
Jun 14, 2017, 6:10:33 AM6/14/17
to Caffe Users
Have tried many recipes around the forum and now i have reached the point in "make all" instruction where i get the following error message:

LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: cannot find -lhdf5_serial_h
collect2: error: ld returned 1 exit status
Makefile:573: fallo en las instrucciones para el objetivo '.build_release/lib/libcaffe.so.1.0.0'
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1

I must say that by this moment i have already tried performing a simlink between libhdf5_serial.so.10.1.0 and libhdf5_serial.so with the following message:

ln: failed to create the simbolic link '/usr/lib/x86_64-linux-gnu/libhdf5.so': the file already exists

Please really need help on this topic as i haven't found a solution for 3 weeks already and need to have Caffe up and running for my project.

Thanks in advance

Reply all
Reply to author
Forward
0 new messages