Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve undefined symbols for architecture x86_64 error. #6417

Closed
niumeng07 opened this issue Jun 2, 2018 · 1 comment
Closed

How to solve undefined symbols for architecture x86_64 error. #6417

niumeng07 opened this issue Jun 2, 2018 · 1 comment

Comments

@niumeng07
Copy link

niumeng07 commented Jun 2, 2018

How to solve undefined symbols for architecture x86_64 error.

Undefined symbols for architecture x86_64 error occured when I install Caffe in MacOs High Sierra.

MacOs High Sierra Version 10.13.4.

Python Version: 2.7.10 [Not Anaconda].

Clang Version: Apple LLVM version 9.0.0 (clang-900.0.38)

Protobuf Version: libprotoc 3.3.2

Other dependencies required in caffe installation guide was installed also.

Undefined symbols for architecture x86_64:
  "google::protobuf::MessageLite::ParseFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      caffe::DataLayer<float>::DataLayerSetUp(std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&, std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&) in data_layer.cpp.o
      caffe::DataLayer<float>::load_batch(caffe::Batch<float>*) in data_layer.cpp.o
      caffe::DataLayer<double>::DataLayerSetUp(std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&, std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&) in data_layer.cpp.o
      caffe::DataLayer<double>::load_batch(caffe::Batch<double>*) in data_layer.cpp.o
  "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))", referenced from:
      caffe::protobuf_caffe_2eproto::(anonymous namespace)::AddDescriptorsImpl() in libcaffeproto.a(caffe.pb.cc.o)
  "google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned char*)", referenced from:
      caffe::Datum::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::FillerParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverState::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetState::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetStateRule::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const in libcaffeproto.a(caffe.pb.cc.o)
      ...
  "google::protobuf::internal::NameOfEnum(google::protobuf::EnumDescriptor const*, int)", referenced from:
      caffe::InfogainLossLayer<float>::get_normalizer(caffe::LossParameter_NormalizationMode, int) in infogain_loss_layer.cpp.o
      caffe::InfogainLossLayer<double>::get_normalizer(caffe::LossParameter_NormalizationMode, int) in infogain_loss_layer.cpp.o
      caffe::ReductionLayer<float>::Forward_cpu(std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&, std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&) in reduction_layer.cpp.o
      caffe::ReductionLayer<float>::Backward_cpu(std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&, std::__1::vector<bool, std::__1::allocator<bool> > const&, std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&) in reduction_layer.cpp.o
      caffe::ReductionLayer<double>::Forward_cpu(std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&, std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&) in reduction_layer.cpp.o
      caffe::ReductionLayer<double>::Backward_cpu(std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&, std::__1::vector<bool, std::__1::allocator<bool> > const&, std::__1::vector<caffe::Blob<double>*, std::__1::allocator<caffe::Blob<double>*> > const&) in reduction_layer.cpp.o
      caffe::SigmoidCrossEntropyLossLayer<float>::get_normalizer(caffe::LossParameter_NormalizationMode, int) in sigmoid_cross_entropy_loss_layer.cpp.o
      ...
  "google::protobuf::internal::WireFormatLite::WriteString(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetStateRule::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::V1LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
  "google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      caffe::Datum::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
  "google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
      caffe::FillerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::ParamSpec::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      caffe::TransformationParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in libcaffeproto.a(caffe.pb.cc.o)
      ...
  "google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)", referenced from:
      caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::FillerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::SolverState::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetState::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      caffe::NetStateRule::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in libcaffeproto.a(caffe.pb.cc.o)
      ...
  "google::protobuf::internal::AssignDescriptors(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::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**)", referenced from:
      caffe::protobuf_caffe_2eproto::(anonymous namespace)::protobuf_AssignDescriptors() in libcaffeproto.a(caffe.pb.cc.o)
  "google::protobuf::internal::fixed_address_empty_string", referenced from:
      caffe::LayerParameter::set_type(char const*) in infogain_loss_layer.cpp.o
      caffe::LSTMLayer<float>::FillUnrolledNet(caffe::NetParameter*) const in lstm_layer.cpp.o
      caffe::LayerParameter::set_type(char const*) in lstm_layer.cpp.o
      caffe::LayerParameter::set_name(char const*) in lstm_layer.cpp.o
      caffe::ParamSpec::set_name(char const*) in lstm_layer.cpp.o
      caffe::LSTMLayer<double>::FillUnrolledNet(caffe::NetParameter*) const in lstm_layer.cpp.o
      caffe::RecurrentLayer<float>::LayerSetUp(std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&, std::__1::vector<caffe::Blob<float>*, std::__1::allocator<caffe::Blob<float>*> > const&) in recurrent_layer.cpp.o
      ...
  "leveldb::DB::Open(leveldb::Options const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, leveldb::DB**)", referenced from:
      caffe::db::LevelDB::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, caffe::db::Mode) in db_leveldb.cpp.o
  "google::protobuf::Message::DebugString() const", referenced from:
      caffe::Net<float>::Init(caffe::NetParameter const&) in net.cpp.o
      caffe::Net<double>::Init(caffe::NetParameter const&) in net.cpp.o
      caffe::Solver<float>::Init(caffe::SolverParameter const&) in solver.cpp.o
      caffe::Solver<double>::Init(caffe::SolverParameter const&) in solver.cpp.o
  "google::protobuf::Message::GetTypeName() const", referenced from:
      vtable for caffe::BlobShape in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::BlobProto in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::BlobProtoVector in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::Datum in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::FillerParameter in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::NetParameter in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::SolverParameter in libcaffeproto.a(caffe.pb.cc.o)
      ...
  "google::protobuf::Message::SerializeToOstream(std::__1::basic_ostream<char, std::__1::char_traits<char> >*) const", referenced from:
      caffe::WriteProtoToBinaryFile(google::protobuf::Message const&, char const*) in io.cpp.o
  "google::protobuf::Message::InitializationErrorString() const", referenced from:
      vtable for caffe::BlobShape in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::BlobProto in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::BlobProtoVector in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::Datum in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::FillerParameter in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::NetParameter in libcaffeproto.a(caffe.pb.cc.o)
      vtable for caffe::SolverParameter in libcaffeproto.a(caffe.pb.cc.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libcaffe.1.0.0.dylib] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2
@shelhamer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants