gpt4 book ai didi

python - OpenPose:体系结构x86_64的 undefined symbol :libcaffeproto.a(caffe.pb.cc.o)

转载 作者:行者123 更新时间:2023-12-02 17:27:11 27 4
gpt4 key购买 nike

在openpose安装期间,将安装依赖项。
使用-make -j nproc进行构建时

我收到以下错误:

[  3%] Built target caffeproto
[ 3%] Linking CXX shared library ../../lib/libcaffe.dylib
Undefined symbols for architecture x86_64:
"google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))", referenced from:
protobuf_caffe_2eproto::AddDescriptorsImpl() in libcaffeproto.a(caffe.pb.cc.o)
"google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)", referenced from:
protobuf_caffe_2eproto::protobuf_RegisterTypes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) 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::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)", referenced from:
protobuf_caffe_2eproto::protobuf_AssignDescriptors() 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[5]: *** [lib/libcaffe.1.0.0.dylib] Error 1
make[4]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [caffe/src/openpose_lib-stamp/openpose_lib-build] Error 2
make[1]: *** [CMakeFiles/openpose_lib.dir/all] Error 2
make: *** [all] Error 2 ```

最佳答案

[解决]

这基本上是由于CmakeList.txt和可用的protobuf编译器版本不同而引起的。

如果您遇到此问题,请尝试删除过时的问题。

即使它不起作用,也可以使用

protoc src/caffe/proto/caffe.proto --cpp_out=.
mkdir include/caffe/proto
mv src/caffe/proto/caffe.pb.h include/caffe/proto

关于python - OpenPose:体系结构x86_64的 undefined symbol :libcaffeproto.a(caffe.pb.cc.o),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58467461/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com