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

ld not found when linking caffe/opencv_dnn #8

Open
DelightRun opened this issue Apr 24, 2016 · 1 comment
Open

ld not found when linking caffe/opencv_dnn #8

DelightRun opened this issue Apr 24, 2016 · 1 comment

Comments

@DelightRun
Copy link

I got this when I run conda build conda/:

  "google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)", referenced from:
      caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in caffe.pb.cc.o
  "google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)", referenced from:
      caffe::NetParameter::NetParameter() in caffe.pb.cc.o
      caffe::NetParameter::NetParameter(caffe::NetParameter const&) in caffe.pb.cc.o
      caffe::NetParameter::~NetParameter() in caffe.pb.cc.o
      caffe::SolverParameter::SolverParameter() in caffe.pb.cc.o
      caffe::SolverParameter::SolverParameter(caffe::SolverParameter const&) in caffe.pb.cc.o
      caffe::SolverParameter::~SolverParameter() in caffe.pb.cc.o
      caffe::NetState::NetState() in caffe.pb.cc.o
      ...
  "google::protobuf::DescriptorPool::FindFileByName(std::string const&) const", referenced from:
      caffe::protobuf_AssignDesc_caffe_2eproto() in 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)

I checked my protobuf lib using otool -L /usr/local/lib/libprotobuf.dylib, the output is:

/usr/local/lib/libprotobuf.dylib:
    /usr/local/opt/protobuf/lib/libprotobuf.9.dylib (compatibility version 10.0.0, current version 10.1.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

My OS is Mac OS X 10.11.4. So what's the problem? Is some lib linked to libstdc++? How to solve this?

@patricksnape
Copy link
Contributor

At the moment my builds try to support back to 10.7. By default, this means that OSX links to libstdc++ since libc++ wasn't shipped on 10.7 until the XCode 4.2 release. Just did a little reading and it seems that I may be OK to rebuild using libc++, just need to pass the requisite flags.

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