dlunion / tensorRTIntegrate

TensorRT ONNX Plugin、Inference、Compile
462 stars 114 forks source link

ubuntu make error #42

Open gentlebreeze1 opened 3 years ago

gentlebreeze1 commented 3 years ago

你好 我用protobuf3.8.0编译 error onnx_ONNX_NAMESPACE-ml.pb.cpp is not a member of ‘google::protobuf::internal::WireFormat’ 然后使用protobuf3.13.3编译 onnx_ONNX_NAMESPACE-ml.pb.h:368: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*)'好像版本太新了。 请问protobuf的版本应该是什么? 我本机编译的onnx-tensorrt7得不到src/onnx/下边所有的.h 如onnx_ONNX_NAMESPACE-ml.pb.h onnx-operators_ONNX_NAMESPACE-ml.pb @dlunion @hopef

hopef commented 3 years ago

我发布的lean文件里面应该是有protobuf的代码的,请使用protobuf == 3.11.4

------------------ 原始邮件 ------------------ 发件人: "dlunion/tensorRTIntegrate" <notifications@github.com>; 发送时间: 2020年10月28日(星期三) 中午11:35 收件人: "dlunion/tensorRTIntegrate"<tensorRTIntegrate@noreply.github.com>; 抄送: "Hope"<512690069@qq.com>;"Mention"<mention@noreply.github.com>; 主题: [dlunion/tensorRTIntegrate] ubuntu make error (#42)

你好 我用protobuf3.8.0编译 error onnx_ONNX_NAMESPACE-ml.pb.cpp is not a member of ‘google::protobuf::internal::WireFormat’ 然后使用protobuf3.13.3编译 onnx_ONNX_NAMESPACE-ml.pb.h:368: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*)'好像版本太新了。 请问protobuf的版本应该是什么? 我本机编译的onnx-tensorrt7得不到src/onnx/下边所有的.h 如onnx_ONNX_NAMESPACE-ml.pb.h onnx-operators_ONNX_NAMESPACE-ml.pb @dlunion @hopef

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gentlebreeze1 commented 3 years ago

我的系统是ubuntu16.04 使用3.11.4还是会报objs/onnx/onnx_ONNX_NAMESPACE-ml.pb.o: In function ONNX_NAMESPACE::AttributeProto::GetMetadataStatic()': /disk3/workspace/trt/tensorRTIntegrate-master/src/onnx_parser/OnnxAttrs.cpp:42: undefined reference to google::protobuf::RepeatedField::~RepeatedField()' collect2: error: ld returned 1 exit status Makefile:53: recipe for target 'workspace/trtrun' failed make: *** [workspace/trtrun] Error 1 的错误 请问你的onnx_ONNX_NAMESPACE-ml.pb和onnx-operators_ONNX_NAMESPACE-ml.pb是怎么获得的 @hopef

gentlebreeze1 commented 3 years ago

@dlunion 你好能帮我解答下我上边的疑问么 谢谢

hopef commented 3 years ago

https://github.com/dlunion/tensorRTIntegrate/blob/master/README.onnx.plugin.md https://github.com/onnx/onnx-tensorrt/tree/6.0 如果你替换了onnx-tensort,那么这两部分是生成的参考部分

gentlebreeze1 commented 3 years ago

请问你们的项目是依赖于tensorrt6的么? 我加了cmake .. -DONNX_NAMESPACE=onnx2trt_onnx编译指令但是生成的还是onnx-operators_onnx2trt_onnx-ml.pb.h没有生成onnx-operators_ONNX_NAMESPACE-ml.pb.h @hopef

hopef commented 3 years ago

operators_onnx2trt_onnx-ml.pb.h就是onnx-operators_ONNX_NAMESPACE-ml.pb.h,是同一个文件,仅仅是我生成的时候-DONNX_NAMESPACE=onnx2trt_onnx没有写造成的

hopef commented 3 years ago

项目不是依赖tensorRT6,仅仅是onnx-tensorrt部分是6.0的 但是这个项目可以使用于7.0、7.1、6.0

hopef commented 3 years ago

也就是仅仅解析器是6.0的。当初调研过最新的解析器,应该是存在很多问题,例如不兼容6.0,所以没有使用

gentlebreeze1 commented 3 years ago

谢谢你的解答 我下载onnx-tensorrt6.0在编译看看 很棒的项目能让我们快速上手编译自己的onnx plugin

gentlebreeze1 commented 3 years ago

谢谢你的帮助 已经编译成功了. @hopef