PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
2.93k stars 456 forks source link

nvidia jetson TX2编译fastdeploy错误,求大佬解决方法 #1973

Closed 1mageLiu closed 1 year ago

1mageLiu commented 1 year ago

环境

问题日志及出现问题的操作流程,在make时编译错误

david@david-desktop:~/下载/FastDeploy/build$ make -j8

Scanning dependencies of target extern_onnxruntime Scanning dependencies of target extern_paddle2onnx Scanning dependencies of target yaml-cpp [ 1%] Creating directories for 'extern_paddle2onnx' [ 2%] Creating directories for 'extern_onnxruntime' [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/convert.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilderadapter.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/binary.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/directives.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/depthguard.cpp.o [ 4%] Performing download step (download, verify and extract) for 'extern_onnxruntime' [ 4%] Performing download step (download, verify and extract) for 'extern_paddle2onnx' -- Downloading... dst='/home/david/下载/FastDeploy/build/third_libs/paddle2onnx/src/paddle2onnx-linux-aarch64-1.0.7.tgz' timeout='none' -- Using src='https://bj.bcebos.com/fastdeploy/third_libs/paddle2onnx-linux-aarch64-1.0.7.tgz' -- Downloading... dst='/home/david/下载/FastDeploy/build/third_libs/onnxruntime/src/onnxruntime-linux-aarch64-1.12.0.tgz' timeout='none' -- Using src='https://bj.bcebos.com/paddle2onnx/libs/onnxruntime-linux-aarch64-1.12.0.tgz' -- Downloading... done -- extracting... src='/home/david/下载/FastDeploy/build/third_libs/onnxruntime/src/onnxruntime-linux-aarch64-1.12.0.tgz' dst='/home/david/下载/FastDeploy/build/third_libs/onnxruntime/src/extern_onnxruntime' -- extracting... [tar xfz] [ 5%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emit.cpp.o [ 5%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitfromevents.cpp.o [ 6%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitter.cpp.o -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 7%] No patch step for 'extern_onnxruntime' [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitterstate.cpp.o [ 7%] No update step for 'extern_onnxruntime' [ 7%] No configure step for 'extern_onnxruntime' [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o [ 8%] No build step for 'extern_onnxruntime' -- Downloading... done [ 8%] Performing install step for 'extern_onnxruntime' -- extracting... src='/home/david/下载/FastDeploy/build/third_libs/paddle2onnx/src/paddle2onnx-linux-aarch64-1.0.7.tgz' dst='/home/david/下载/FastDeploy/build/third_libs/paddle2onnx/src/extern_paddle2onnx' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 9%] No patch step for 'extern_paddle2onnx' [ 9%] Completed 'extern_onnxruntime' [ 9%] No update step for 'extern_paddle2onnx' [ 9%] Built target extern_onnxruntime [ 10%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/exceptions.cpp.o [ 10%] No configure step for 'extern_paddle2onnx' [ 11%] No build step for 'extern_paddle2onnx' [ 11%] Performing install step for 'extern_paddle2onnx' [ 11%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/exp.cpp.o [ 11%] Completed 'extern_paddle2onnx' [ 11%] Built target extern_paddle2onnx [ 11%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/memory.cpp.o [ 12%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/node.cpp.o [ 12%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/node_data.cpp.o [ 13%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/nodebuilder.cpp.o [ 13%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/nodeevents.cpp.o [ 13%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/null.cpp.o [ 14%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/ostream_wrapper.cpp.o [ 14%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parse.cpp.o [ 14%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parser.cpp.o [ 15%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/regex_yaml.cpp.o [ 15%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scanner.cpp.o [ 16%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scanscalar.cpp.o [ 16%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scantag.cpp.o [ 16%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scantoken.cpp.o [ 17%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/simplekey.cpp.o [ 17%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/singledocparser.cpp.o [ 17%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/stream.cpp.o [ 18%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/tag.cpp.o [ 18%] Linking CXX static library libyaml-cpp.a [ 18%] Built target yaml-cpp Scanning dependencies of target yaml-cpp-sandbox Scanning dependencies of target yaml-cpp-read Scanning dependencies of target fastdeploy [ 18%] Building CXX object third_party/yaml-cpp/util/CMakeFiles/yaml-cpp-sandbox.dir/sandbox.cpp.o [ 18%] Building CXX object third_party/yaml-cpp/util/CMakeFiles/yaml-cpp-read.dir/read.cpp.o Scanning dependencies of target yaml-cpp-parse [ 19%] Building CXX object third_party/yaml-cpp/util/CMakeFiles/yaml-cpp-parse.dir/parse.cpp.o [ 19%] Linking CXX executable parse [ 20%] Linking CXX executable read [ 20%] Built target yaml-cpp-parse [ 20%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/core/allocate.cc.o [ 20%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/core/fd_type.cc.o [ 21%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/cast.cc.o [ 22%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/core/fd_tensor.cc.o [ 22%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/benchmark/utils.cc.o [ 22%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/fastdeploy_model.cc.o [ 22%] Built target yaml-cpp-read [ 22%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/clip.cc.o [ 23%] Linking CXX executable sandbox [ 23%] Built target yaml-cpp-sandbox [ 24%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/concat.cc.o [ 24%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/cumprod.cc.o [ 24%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/eigen.cc.o [ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/elementwise.cc.o [ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/full.cc.o [ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/gather_scatter_along_axis.cc.o [ 26%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/gaussian_random.cc.o [ 26%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/isfinite.cc.o [ 27%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/linspace.cc.o [ 27%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/math.cc.o [ 27%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/pad.cc.o [ 28%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/quantile.cc.o [ 28%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/reduce.cc.o [ 29%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/slice.cc.o [ 29%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/softmax.cc.o [ 29%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/sort.cc.o [ 30%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/split.cc.o [ 30%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/tile.cc.o [ 30%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/function/transpose.cc.o [ 31%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/enum_variables.cc.o [ 31%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/runtime.cc.o [ 32%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/runtime_option.cc.o In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:27:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h: In instantiation of ‘void fastdeploy::FDInferDeleter::operator()(T) const [with T = nvonnxparser::IParser]’: /usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvonnxparser::IParser; _Dp = fastdeploy::FDInferDeleter]’ /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:72:52: required from here /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h:37:7: error: ‘virtual nvonnxparser::IParser::~IParser()’ is protected within this context delete obj; ^~ In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:25:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /usr/include/aarch64-linux-gnu/NvOnnxParser.h:214:13: note: declared protected here virtual ~IParser() {} ^ In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:27:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h: In instantiation of ‘void fastdeploy::FDInferDeleter::operator()(T) const [with T = nvinfer1::IBuilder]’: /usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::IBuilder; _Dp = fastdeploy::FDInferDeleter]’ /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:72:52: required from here /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h:37:7: error: ‘virtual nvinfer1::IBuilder::~IBuilder()’ is protected within this context delete obj; ^~ In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:24:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /usr/include/aarch64-linux-gnu/NvInfer.h:7098:13: note: declared protected here virtual ~IBuilder() ^ In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:27:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h: In instantiation of ‘void fastdeploy::FDInferDeleter::operator()(T*) const [with T = nvinfer1::INetworkDefinition]’: /usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::INetworkDefinition; _Dp = fastdeploy::FDInferDeleter]’ /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:72:52: required from here /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/utils.h:37:7: error: ‘virtual nvinfer1::INetworkDefinition::~INetworkDefinition()’ is protected within this context delete obj; ^~ In file included from /home/david/下载/FastDeploy/./fastdeploy/runtime/backends/tensorrt/trt_backend.h:24:0, from /home/david/下载/FastDeploy/fastdeploy/runtime/runtime.cc:25: /usr/include/aarch64-linux-gnu/NvInfer.h:5340:13: note: declared protected here virtual ~INetworkDefinition() {} ^ CMakeFiles/fastdeploy.dir/build.make:710: recipe for target 'CMakeFiles/fastdeploy.dir/fastdeploy/runtime/runtime.cc.o' failed make[2]: [CMakeFiles/fastdeploy.dir/fastdeploy/runtime/runtime.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:175: recipe for target 'CMakeFiles/fastdeploy.dir/all' failed make[1]: [CMakeFiles/fastdeploy.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: [all] Error 2

1mageLiu commented 1 year ago

已解决,tensorRT问题

Gentek36 commented 1 year ago

学长,请问怎么解决

1mageLiu commented 1 year ago

环境问题,TensorRT等库的版本

Gentek36 @.***> 于2023年7月8日周六 11:29写道:

学长,请问怎么解决

— Reply to this email directly, view it on GitHub https://github.com/PaddlePaddle/FastDeploy/issues/1973#issuecomment-1626666922, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARMGBBWGSL4L4AY6LUC5DATXPDHX5ANCNFSM6AAAAAAYKFMTIU . You are receiving this because you modified the open/close state.Message ID: @.***>