protoc正确安装
protoc --version
libprotoc 3.5.1
但是编译tools失败
$ make
[ 92%] Built target ncnn
[ 92%] Built target ncnn2mem
[ 92%] Linking CXX executable caffe2ncnn
Undefined symbols for architecture x86_64:
"google::protobuf::GoogleOnceInitImpl(long, google::protobuf::Closure)", referenced from:
protobuf_caffe_2eproto::InitDefaultsBlobShape() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProto() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoVectorImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoVector() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsDatum() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsFillerParameter() in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::SkipFallback(int, int)", referenced from:
bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline
bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline
caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::TransformationParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::ResizeParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::YoloDetectionOutputParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)", referenced from:
caffe::BlobShape::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProtoVector::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::FillerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from:
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::FillerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverState::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::ReadVarint64Fallback()", referenced from:
caffe::BlobShape::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline
caffe::Datum::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
...
"google::protobuf::io::CodedInputStream::default_recursion_limit_", referenced from:
_main in caffe2ncnn.cpp.o
"google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntFallback()", referenced from:
caffe::BlobShape::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProtoVector::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::DecrementRecursionDepthAndPopLimit(int)", referenced from:
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProtoVector::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverState::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BiasParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::IncrementRecursionDepthAndPushLimit(int)", referenced from:
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProtoVector::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::SolverState::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BiasParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::io::CodedInputStream::~CodedInputStream()", referenced from:
_main in caffe2ncnn.cpp.o
"google::protobuf::io::CodedOutputStream::WriteVarint32SlowPath(unsigned int)", referenced from:
caffe::BlobShape::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::BlobProto::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::io::CodedOutputStream::WriteVarint64SlowPath(unsigned long long)", referenced from:
caffe::BlobShape::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__1::basic_string
caffe::Datum::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::FillerParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::NetParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::SolverParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::SolverState::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::NetState::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::NetStateRule::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
...
"google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(google::protobuf::io::CodedInputStream, unsigned int, bool ()(int), google::protobuf::UnknownFieldSet, google::protobuf::RepeatedField
caffe::ResizeParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::V1LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::UInt32Size(google::protobuf::RepeatedField
caffe::ConvolutionParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::CropParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::Yolov3DetectionOutputParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::DummyDataParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::PermuteParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::SliceParameter::ByteSizeLong() const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteFloatArray(float const
caffe::BlobProto::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteDoubleArray(double const, int, google::protobuf::io::CodedOutputStream)", referenced from:
caffe::BlobProto::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__1::basic_string
caffe::Datum::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__1::basic_string
caffe::FillerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::SolverParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::SolverState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::ParamSpec::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::TransformationParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
...
"google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField
caffe::NetParameter::ByteSizeLong() const in caffe.pb.cc.o
caffe::SolverParameter::ByteSizeLong() const in caffe.pb.cc.o
"google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const
protobuf_caffe_2eproto::protobuf_RegisterTypes(std::__1::basic_string
"google::protobuf::internal::AssignDescriptors(std::__1::basic_string
protobuf_caffe_2eproto::protobuf_AssignDescriptors() in caffe.pb.cc.o
"google::protobuf::internal::InitProtobufDefaults()", referenced from:
protobuf_caffe_2eproto::InitDefaultsBlobShapeImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoVectorImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsDatumImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsFillerParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsNetParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsSolverParameterImpl() in caffe.pb.cc.o
...
"google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)", referenced from:
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
...
"google::protobuf::internal::OnShutdownDestroyString(std::__1::basic_string
protobuf_caffe_2eproto::InitDefaultsFillerParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsSolverParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsWindowDataParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsV0LayerParameterImpl() in caffe.pb.cc.o
"google::protobuf::internal::OnShutdownDestroyMessage(void const)", referenced from:
protobuf_caffe_2eproto::InitDefaultsBlobShapeImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsBlobProtoVectorImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsDatumImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsFillerParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsNetParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsSolverParameterImpl() in caffe.pb.cc.o
...
"google::protobuf::internal::fixed_address_empty_string", referenced from:
protobuf_caffe_2eproto::InitDefaultsDatumImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsNetParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsSolverParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsSolverStateImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsParamSpecImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsLayerParameterImpl() in caffe.pb.cc.o
protobuf_caffe_2eproto::InitDefaultsTransformationParameterImpl() in caffe.pb.cc.o
...
"google::protobuf::internal::ArenaImpl::AddCleanup(void, void ()(void))", referenced from:
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
void google::protobuf::Arena::Own
...
"google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned long)", referenced from:
google::protobuf::RepeatedField
google::protobuf::RepeatedField
google::protobuf::RepeatedField
google::protobuf::RepeatedField
google::protobuf::RepeatedField
google::protobuf::RepeatedField
"google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void ()(void))", referenced from:
google::protobuf::RepeatedPtrField
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream
...
"google::protobuf::io::CodedInputStream::BytesUntilLimit() const", referenced from:
caffe::BlobShape::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
"google::protobuf::io::CodedInputStream::BytesUntilTotalBytesLimit() const", referenced from:
caffe::BlobProto::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline
"google::protobuf::Arena::OnArenaAllocation(std::type_info const, unsigned long) const", referenced from:
google::protobuf::RepeatedPtrField
caffe::NetParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
google::protobuf::RepeatedPtrField
caffe::SolverParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream
...
"google::protobuf::Message::SpaceUsedLong() const", referenced from:
vtable for caffe::BlobShape in caffe.pb.cc.o
vtable for caffe::BlobProto in caffe.pb.cc.o
vtable for caffe::BlobProtoVector in caffe.pb.cc.o
vtable for caffe::Datum in caffe.pb.cc.o
vtable for caffe::FillerParameter in caffe.pb.cc.o
vtable for caffe::NetParameter in caffe.pb.cc.o
vtable for caffe::SolverParameter 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)
make[2]: * [tools/caffe/caffe2ncnn] Error 1
make[1]: [tools/caffe/CMakeFiles/caffe2ncnn.dir/all] Error 2
make: ** [all] Error 2
我这边也出现了类似的情况
protoc --version: libprotoc 3.6.1
[ 87%] Built target ncnn2mem
[ 89%] Building CXX object tools/caffe/CMakeFiles/caffe2ncnn.dir/caffe.pb.cc.o
[ 90%] Linking CXX executable caffe2ncnn
Undefined symbols for architecture x86_64:
"google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::__cxx11::basic_string
protobuf_caffe_2eproto::AddDescriptorsImpl() in caffe.pb.cc.o
"google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string
caffe::FillerParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::ParamSpec::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::DataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::HDF5DataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::HDF5OutputParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::ImageDataParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
caffe::InfogainLossParameter::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const in caffe.pb.cc.o
...
"google::protobuf::io::IstreamInputStream::IstreamInputStream(std::basic_istream
_main in caffe2ncnn.cpp.o
"google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string
caffe::NetState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::NetStateRule::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::V1LayerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::SolverParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string
caffe::Datum::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
"google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string
caffe::HDF5OutputParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::InfogainLossParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::PythonParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::SolverState::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::FillerParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::ParamSpec::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
caffe::NetParameter::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in caffe.pb.cc.o
...
"google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream, std::__cxx11::basic_string
caffe::FillerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::ParamSpec::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::DataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::HDF5DataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::HDF5OutputParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::ImageDataParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
caffe::InfogainLossParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in caffe.pb.cc.o
...
"google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string
protobuf_caffe_2eproto::protobuf_AssignDescriptors() in caffe.pb.cc.o
"google::protobuf::internal::fixed_address_empty_string[abi:cxx11]", referenced from:
google::protobuf::internal::ArenaStringPtr::DestroyNoArena(std::__cxx11::basic_string
google::protobuf::internal::ArenaStringPtr::SetNoArena(std::__cxx11::basic_string
caffe::Datum::SharedCtor() in caffe.pb.cc.o
caffe::Datum::SharedDtor() in caffe.pb.cc.o
caffe::NetParameter::SharedCtor() in caffe.pb.cc.o
caffe::SolverParameter::SharedCtor() in caffe.pb.cc.o
caffe::SolverState::SharedCtor() in caffe.pb.cc.o
...
"google::protobuf::Message::GetTypeNameabi:cxx11 const", referenced from:
vtable for caffe::BlobShape in caffe.pb.cc.o
vtable for caffe::BlobProto in caffe.pb.cc.o
vtable for caffe::BlobProtoVector in caffe.pb.cc.o
vtable for caffe::Datum in caffe.pb.cc.o
vtable for caffe::FillerParameter in caffe.pb.cc.o
vtable for caffe::NetParameter in caffe.pb.cc.o
vtable for caffe::SolverParameter in caffe.pb.cc.o
...
"google::protobuf::Message::InitializationErrorStringabi:cxx11 const", referenced from:
vtable for caffe::BlobShape in caffe.pb.cc.o
vtable for caffe::BlobProto in caffe.pb.cc.o
vtable for caffe::BlobProtoVector in caffe.pb.cc.o
vtable for caffe::Datum in caffe.pb.cc.o
vtable for caffe::FillerParameter in caffe.pb.cc.o
vtable for caffe::NetParameter in caffe.pb.cc.o
vtable for caffe::SolverParameter in caffe.pb.cc.o
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[5]:
make[4]: [tools/caffe/CMakeFiles/caffe2ncnn.dir/all] Error 2
make[3]: [all] Error 2
make[2]: [ncnn/src/ncnn-stamp/ncnn-build] Error 2
make[1]: [CMakeFiles/ncnn.dir/all] Error 2
make: * [all] Error 2
我的问题已经解决了
由于mac的Xcode不支持openmp, 因此需要将该编译选项关闭, 在根目录下的 CMakeLists.txt 文件中 关闭 openmp 如下:
option(NCNN_OPENMP "openmp support" OFF)
楼主你可以看看这个方法对你有没有用
https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-macosx
protobuf 用 homebrew install protobuf 安装
Most helpful comment
我的问题已经解决了
由于mac的Xcode不支持openmp, 因此需要将该编译选项关闭, 在根目录下的 CMakeLists.txt 文件中 关闭 openmp 如下:
option(NCNN_OPENMP "openmp support" OFF)
楼主你可以看看这个方法对你有没有用