open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.77k stars 636 forks source link

安装问题 #162

Closed haofanwang closed 2 years ago

haofanwang commented 2 years ago

我是参考官方指南进行安装,在最后一步出现报错。

mkdir build && cd build
cmake .. \
-DMMDEPLOY_BUILD_SDK=ON \
-DCMAKE_CXX_COMPILER=g++-7 \
-Dpplcv_DIR=/home/admin/workspace/deploy/MMDeploy/ppl.cv/cuda-build/install/lib/cmake/ppl \
-DTENSORRT_DIR=/home/admin/workspace/deploy/MMDeploy/TensorRT-7.2.3.4 \
-DCUDNN_DIR=/usr/local/cuda \
-DMMDEPLOY_TARGET_DEVICES="cuda;cpu" \
-DMMDEPLOY_TARGET_BACKENDS=trt \
-DMMDEPLOY_CODEBASES=all

这一步的结果正常,打印如下

-- CMAKE_INSTALL_PREFIX: /home/admin/workspace/deploy/MMDeploy/build/install
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-7 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build TensorRT custom ops.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "11.0")
-- The CUDA compiler identification is NVIDIA 11.0.221
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found TensorRT headers at /home/admin/workspace/deploy/MMDeploy/TensorRT-7.2.3.4
-- Found TensorRT libs at /usr/lib/libnvinfer.so;/usr/lib/libnvinfer_plugin.so
-- Found TENSORRT: /home/admin/workspace/deploy/MMDeploy/TensorRT-7.2.3.4
-- spdlog is found
-- Found OpenCV: /usr/local (found version "3.4.17")
-- Found TensorRT headers at /home/admin/workspace/deploy/MMDeploy/TensorRT-7.2.3.4
-- Found TensorRT libs at /usr/lib/libnvinfer.so;/usr/lib/libnvinfer_plugin.so
-- build codebase: mmcls
-- build codebase: mmdet
-- build codebase: mmseg
-- build codebase: mmocr
-- build codebase: mmedit
-- MMDEPLOY_STATIC_MODULES:
-- MMDEPLOY_DYNAMIC_MODULES: mmdeploy_cpu_device;mmdeploy_cuda_device;mmdeploy_graph;mmdeploy_directory_model;mmdeploy_transform;mmdeploy_cpu_transform_impl;mmdeploy_cuda_transform_impl;mmdeploy_transform_module;mmdeploy_trt_net;mmdeploy_net_module;mmdeploy_mmcls;mmdeploy_mmdet;mmdeploy_mmseg;mmdeploy_mmocr;mmdeploy_mmedit
-- MMDEPLOY_LIBS: mmdeploy_core;mmdeploy_archive;mmdeploy_classifier;mmdeploy_detector;mmdeploy_segmentor;mmdeploy_text_detector;mmdeploy_text_recognizer;mmdeploy_restorer;mmdeploy_model
-- Configuring done
-- Generating done
-- Build files have been written to: /home/admin/workspace/deploy/MMDeploy/build

但在build时出现问题,

cmake --build . -- -j$(nproc) && cmake --install .

Log如下

[  1%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/device_impl.cpp.o
[  2%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/logger.cpp.o
[  3%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/graph.cpp.o
[  5%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/kernel.cu.o
[  5%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/model.cpp.o
[  5%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/gatherNMSOutputs.cu.o
[  6%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/allClassNMS.cu.o
[  7%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/permuteData.cu.o
[  8%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/mat.cpp.o
[  8%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/sortScoresPerClass.cu.o
[ 11%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/net.cpp.o
[ 11%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/sortScoresPerImage.cu.o
[ 11%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/operator.cpp.o
[ 12%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/tensor.cpp.o
[ 13%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/trt_batched_nms.cpp.o
[ 13%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/module.cpp.o
[ 13%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/batched_nms/trt_batched_nms_kernel.cpp.o
[ 14%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/status_code.cpp.o
[ 15%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/utils/device_utils.cpp.o
[ 18%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/utils/formatter.cpp.o
[ 19%] Building CXX object csrc/core/CMakeFiles/mmdeploy_core.dir/utils/stacktrace.cpp.o
[ 18%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/bicubic_interpolate/trt_bicubic_interpolate.cpp.o
[ 19%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/bicubic_interpolate/trt_bicubic_interpolate_kernel.cu.o
[ 20%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/grid_sampler/trt_grid_sampler_kernel.cu.o
[ 21%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/grid_sampler/trt_grid_sampler.cpp.o
[ 22%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/common_impl/trt_cuda_helper.cu.o
[ 24%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/modulated_deform_conv/trt_modulated_deform_conv_kernel.cu.o
[ 24%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/modulated_deform_conv/trt_modulated_deform_conv.cpp.o
[ 24%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/instance_norm/trt_instance_norm.cpp.o
[ 25%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/multi_level_roi_align/trt_multi_level_roi_align.cpp.o
[ 26%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/multi_level_roi_align/trt_multi_level_roi_align_kernel.cu.o
[ 27%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/roi_align/trt_roi_align_kernel.cu.o
[ 28%] Building CUDA object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/scatternd/trt_scatternd_kernel.cu.o
[ 29%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/scatternd/trt_scatternd.cpp.o
[ 29%] Building CXX object csrc/backend_ops/tensorrt/CMakeFiles/mmdeploy_tensorrt_ops_obj.dir/roi_align/trt_roi_align.cpp.o
[ 30%] Linking CXX shared library ../../lib/libmmdeploy_core.so
[ 30%] Built target mmdeploy_core
[ 30%] Building CXX object csrc/device/cuda/CMakeFiles/mmdeploy_cuda_device.dir/cuda_device.cpp.o
[ 31%] Building CUDA object csrc/device/cuda/CMakeFiles/mmdeploy_cuda_device.dir/cuda_builtin_kernels.cu.o
[ 31%] Building CXX object csrc/device/cpu/CMakeFiles/mmdeploy_cpu_device.dir/cpu_device.cpp.o
[ 32%] Building CXX object csrc/model/CMakeFiles/mmdeploy_directory_model.dir/directory_model_impl.cpp.o
[ 33%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/inference.cpp.o
[ 34%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/collect.cpp.o
[ 35%] Building CXX object csrc/preprocess/CMakeFiles/mmdeploy_transform_module.dir/transform_module.cpp.o
[ 36%] Building CXX object csrc/codebase/mmseg/CMakeFiles/mmdeploy_mmseg.dir/mmseg.cpp.o
[ 37%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/common.cpp.o
[ 38%] Building CXX object csrc/net/CMakeFiles/mmdeploy_net_module.dir/net_module.cpp.o
[ 39%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/crop.cpp.o
[ 39%] Building CXX object csrc/codebase/mmseg/CMakeFiles/mmdeploy_mmseg.dir/segment.cpp.o
[ 40%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/collect_impl.cpp.o
[ 44%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/compose.cpp.o
[ 44%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/pipeline.cpp.o
[ 44%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/image2tensor_impl.cpp.o
[ 44%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/task.cpp.o
[ 46%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/load.cpp.o
[ 46%] Building CXX object csrc/codebase/mmcls/CMakeFiles/mmdeploy_mmcls.dir/mmcls.cpp.o
[ 46%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/flatten.cpp.o
[ 48%] Building CXX object csrc/graph/CMakeFiles/mmdeploy_graph.dir/unflatten.cpp.o
[ 48%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/image2tensor.cpp.o
[ 49%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/image2tensor_impl.cpp.o
[ 51%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/load_impl.cpp.o
[ 51%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/normalize.cpp.o
[ 52%] Building CXX object csrc/codebase/mmdet/CMakeFiles/mmdeploy_mmdet.dir/instance_segmentation.cpp.o
[ 52%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_detector.dir/detector.cpp.o
[ 55%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/crop_impl.cpp.o
[ 55%] Building CXX object csrc/codebase/mmedit/CMakeFiles/mmdeploy_mmedit.dir/restorer.cpp.o
[ 55%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/normalize_impl.cpp.o
[ 56%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/pad.cpp.o
[ 56%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/normalize_impl.cpp.o
[ 58%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/resize.cpp.o
[ 57%] Building CXX object csrc/codebase/mmedit/CMakeFiles/mmdeploy_mmedit.dir/mmedit.cpp.o
[ 58%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/load_impl.cpp.o
[ 59%] Building CXX object csrc/preprocess/transform/CMakeFiles/mmdeploy_transform.dir/transform.cpp.o
[ 60%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/crop_impl.cpp.o
[ 60%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_model.dir/model.cpp.o
[ 60%] Building CXX object csrc/codebase/mmdet/CMakeFiles/mmdeploy_mmdet.dir/object_detection.cpp.o
[ 61%] Building CXX object csrc/codebase/mmdet/CMakeFiles/mmdeploy_mmdet.dir/mmdet.cpp.o
[ 68%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/resize_impl.cpp.o
[ 68%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/crnn.cpp.o
[ 69%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_segmentor.dir/segmentor.cpp.o
[ 69%] Building CUDA object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/cast.cu.o
[ 69%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/resize_impl.cpp.o
[ 72%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/pad_impl.cpp.o
[ 68%] Building CUDA object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/normalize.cu.o
[ 72%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_classifier.dir/classifier.cpp.o
[ 72%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/warp.cpp.o
[ 72%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_text_detector.dir/text_detector.cpp.o
[ 72%] Building CXX object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/pad_impl.cpp.o
[ 72%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_restorer.dir/restorer.cpp.o
[ 72%] Building CXX object csrc/apis/c/CMakeFiles/mmdeploy_text_recognizer.dir/text_recognizer.cpp.o
[ 72%] Building CXX object csrc/preprocess/cpu/CMakeFiles/mmdeploy_cpu_transform_impl.dir/opencv_utils.cpp.o
[ 79%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/resize_ocr.cpp.o
[ 79%] Building CXX object csrc/codebase/mmcls/CMakeFiles/mmdeploy_mmcls.dir/linear_cls.cpp.o
[ 79%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/__/__/__/third_party/clipper/clipper.cpp.o
[ 79%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/dbnet.cpp.o
[ 79%] Building CUDA object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/crop.cu.o
[ 79%] Building CUDA object csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/transpose.cu.o
[ 79%] Building CXX object csrc/codebase/mmocr/CMakeFiles/mmdeploy_mmocr.dir/mmocr.cpp.o
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/resize_impl.cpp: In member function ‘ppl::common::RetCode mmdeploy::cuda::ResizeImpl::DispatchImpl(Args&& ...)’:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/resize_impl.cpp:48:51: error: ‘INTERPOLATION_TYPE_LINEAR’ is not a member of ‘ppl::cv’
                                          ppl::cv::INTERPOLATION_TYPE_LINEAR);
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/resize_impl.cpp:48:51: note: suggested alternative: ‘INTERPOLATION_LINEAR’
                                          ppl::cv::INTERPOLATION_TYPE_LINEAR);
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                   INTERPOLATION_LINEAR
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/resize_impl.cpp:52:51: error: ‘INTERPOLATION_TYPE_NEAREST_POINT’ is not a member of ‘ppl::cv’
                                          ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/resize_impl.cpp:52:51: note: suggested alternative: ‘INTERPOLATION_NEAREST_POINT’
                                          ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                   INTERPOLATION_NEAREST_POINT
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp: In constructor ‘mmdeploy::cuda::PadImpl::PadImpl(const mmdeploy::Value&)’:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:17:71: error: ‘BORDER_TYPE_CONSTANT’ is not a member of ‘ppl::cv’
     map<string, ppl::cv::BorderType> border_map{{"constant", ppl::cv::BORDER_TYPE_CONSTANT},
                                                                       ^~~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:17:71: note: suggested alternative: ‘BORDER_CONSTANT’
     map<string, ppl::cv::BorderType> border_map{{"constant", ppl::cv::BORDER_TYPE_CONSTANT},
                                                                       ^~~~~~~~~~~~~~~~~~~~
                                                                       BORDER_CONSTANT
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:18:67: error: ‘BORDER_TYPE_REPLICATE’ is not a member of ‘ppl::cv’
                                                 {"edge", ppl::cv::BORDER_TYPE_REPLICATE},
                                                                   ^~~~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:18:67: note: suggested alternative: ‘BORDER_REPLICATE’
                                                 {"edge", ppl::cv::BORDER_TYPE_REPLICATE},
                                                                   ^~~~~~~~~~~~~~~~~~~~~
                                                                   BORDER_REPLICATE
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:19:70: error: ‘BORDER_TYPE_REFLECT_101’ is not a member of ‘ppl::cv’
                                                 {"reflect", ppl::cv::BORDER_TYPE_REFLECT_101},
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:19:70: note: suggested alternative: ‘BORDER_REFLECT_101’
                                                 {"reflect", ppl::cv::BORDER_TYPE_REFLECT_101},
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~
                                                                      BORDER_REFLECT_101
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:72: error: ‘BORDER_TYPE_REFLECT’ is not a member of ‘ppl::cv’
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                        ^~~~~~~~~~~~~~~~~~~
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:72: note: suggested alternative: ‘BORDER_REFLECT’
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                        ^~~~~~~~~~~~~~~~~~~
                                                                        BORDER_REFLECT
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:92: error: no matching function for call to ‘std::map<std::__cxx11::basic_string<char>, ppl::cv::BorderType>::map(<brace-enclosed initializer list>)’
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                                            ^
In file included from /usr/include/c++/7/map:61:0,
                 from /usr/include/spdlog/sinks/ansicolor_sink.h:13,
                 from /usr/include/spdlog/details/spdlog_impl.h:22,
                 from /usr/include/spdlog/spdlog.h:192,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/logger.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/utils/formatter.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:4:
/usr/include/c++/7/bits/stl_map.h:282:2: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)
  map(_InputIterator __first, _InputIterator __last,
  ^~~
/usr/include/c++/7/bits/stl_map.h:282:2: note:   template argument deduction/substitution failed:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:92: note:   couldn't deduce template parameter ‘_InputIterator’
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                                            ^
In file included from /usr/include/c++/7/map:61:0,
                 from /usr/include/spdlog/sinks/ansicolor_sink.h:13,
                 from /usr/include/spdlog/details/spdlog_impl.h:22,
                 from /usr/include/spdlog/spdlog.h:192,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/logger.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/utils/formatter.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:4:
/usr/include/c++/7/bits/stl_map.h:265:2: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator)
  map(_InputIterator __first, _InputIterator __last)
  ^~~
/usr/include/c++/7/bits/stl_map.h:265:2: note:   template argument deduction/substitution failed:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:92: note:   candidate expects 2 arguments, 4 provided
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                                            ^
In file included from /usr/include/c++/7/map:61:0,
                 from /usr/include/spdlog/sinks/ansicolor_sink.h:13,
                 from /usr/include/spdlog/details/spdlog_impl.h:22,
                 from /usr/include/spdlog/spdlog.h:192,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/logger.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/utils/formatter.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:4:
/usr/include/c++/7/bits/stl_map.h:248:2: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const allocator_type&)
  map(_InputIterator __first, _InputIterator __last,
  ^~~
/usr/include/c++/7/bits/stl_map.h:248:2: note:   template argument deduction/substitution failed:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:20:92: note:   candidate expects 3 arguments, 4 provided
                                                 {"symmetric", ppl::cv::BORDER_TYPE_REFLECT}};
                                                                                            ^
In file included from /usr/include/c++/7/map:61:0,
                 from /usr/include/spdlog/sinks/ansicolor_sink.h:13,
                 from /usr/include/spdlog/details/spdlog_impl.h:22,
                 from /usr/include/spdlog/spdlog.h:192,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/logger.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/core/utils/formatter.h:6,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/preprocess/cuda/pad_impl.cpp:4:
/usr/include/c++/7/bits/stl_map.h:242:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp>>, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(initializer_list<value_type> __l, const allocator_type& __a)
       ^~~
/usr/include/c++/7/bits/stl_map.h:242:7: note:   candidate expects 2 arguments, 4 provided
/usr/include/c++/7/bits/stl_map.h:236:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type =std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(map&& __m, const allocator_type& __a)
       ^~~
/usr/include/c++/7/bits/stl_map.h:236:7: note:   candidate expects 2 arguments, 4 provided
/usr/include/c++/7/bits/stl_map.h:232:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(const map& __m, const allocator_type& __a)
       ^~~
/usr/include/c++/7/bits/stl_map.h:232:7: note:   candidate expects 2 arguments, 4 provided
/usr/include/c++/7/bits/stl_map.h:228:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(const allocator_type& __a)
       ^~~
/usr/include/c++/7/bits/stl_map.h:228:7: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/7/bits/stl_map.h:220:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp>>, const _Compare&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(initializer_list<value_type> __l,
       ^~~
/usr/include/c++/7/bits/stl_map.h:220:7: note:   candidate expects 3 arguments, 4 provided
/usr/include/c++/7/bits/stl_map.h:207:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(map&&) = default;
       ^~~
/usr/include/c++/7/bits/stl_map.h:207:7: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/7/bits/stl_map.h:199:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(const map&) = default;
       ^~~
/usr/include/c++/7/bits/stl_map.h:199:7: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/7/bits/stl_map.h:186:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const _Compare&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map(const _Compare& __comp,
       ^~~
/usr/include/c++/7/bits/stl_map.h:186:7: note:   candidate expects 2 arguments, 4 provided
/usr/include/c++/7/bits/stl_map.h:177:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key = std::__cxx11::basic_string<char>;_Tp = ppl::cv::BorderType; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, ppl::cv::BorderType> >]
       map() = default;
       ^~~
/usr/include/c++/7/bits/stl_map.h:177:7: note:   candidate expects 0 arguments, 4 provided
csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/build.make:145: recipe for target 'csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/resize_impl.cpp.o' failed
make[2]: *** [csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/resize_impl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/build.make:131: recipe for target 'csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/pad_impl.cpp.o' failed
make[2]: *** [csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/pad_impl.cpp.o] Error 1
/home/admin/workspace/deploy/MMDeploy/csrc/codebase/mmocr/resize_ocr.cpp: In constructor ‘mmdeploy::ResizeOCR::ResizeOCR(const mmdeploy::Value&)’:
/home/admin/workspace/deploy/MMDeploy/csrc/codebase/mmocr/resize_ocr.cpp:143:57: warning: ‘std::unique_ptr<_Tp> mmdeploy::Transform::Instantiate(const char*, const mmdeploy::Value&, int) [with T = mmdeploy::ResizeOCRImpl]’ is deprecated [-Wdeprecated-declarations]
     impl_ = Instantiate<ResizeOCRImpl>("ResizeOCR", args);
                                                         ^
In file included from /home/admin/workspace/deploy/MMDeploy/csrc/preprocess/transform/resize.h:7:0,
                 from /home/admin/workspace/deploy/MMDeploy/csrc/codebase/mmocr/resize_ocr.cpp:12:
/home/admin/workspace/deploy/MMDeploy/csrc/preprocess/transform/transform.h:43:3: note: declared here
   Instantiate(const char* transform_type, const Value& args, int version = 0) {
   ^~~~~~~~~~~
[ 80%] Linking CXX shared library ../../../lib/libmmdeploy_model.so
[ 80%] Built target mmdeploy_model
[ 81%] Linking CXX shared library ../../lib/libmmdeploy_transform_module.so
[ 81%] Linking CXX shared library ../../../lib/libmmdeploy_restorer.so
[ 81%] Built target mmdeploy_transform_module
[ 81%] Built target mmdeploy_restorer
CMakeFiles/Makefile2:781: recipe for target 'csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/all' failed
make[1]: *** [csrc/preprocess/cuda/CMakeFiles/mmdeploy_cuda_transform_impl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Linking CXX shared library ../../../lib/libmmdeploy_cuda_device.so
[ 83%] Linking CXX shared library ../../../lib/libmmdeploy_cpu_device.so
[ 84%] Linking CXX shared library ../../../lib/libmmdeploy_segmentor.so
[ 84%] Built target mmdeploy_cuda_device
[ 84%] Built target mmdeploy_cpu_device
[ 84%] Built target mmdeploy_segmentor
[ 85%] Linking CXX shared library ../../../lib/libmmdeploy_mmcls.so
[ 85%] Built target mmdeploy_mmcls
[ 86%] Linking CXX shared library ../../../lib/libmmdeploy_detector.so
[ 86%] Linking CXX shared library ../../../lib/libmmdeploy_text_detector.so
[ 87%] Linking CXX shared library ../../../lib/libmmdeploy_text_recognizer.so
[ 87%] Built target mmdeploy_detector
[ 87%] Linking CXX shared library ../../../lib/libmmdeploy_mmedit.so
[ 87%] Built target mmdeploy_text_recognizer
[ 87%] Built target mmdeploy_text_detector
[ 88%] Linking CXX shared library ../../../lib/libmmdeploy_classifier.so
[ 88%] Built target mmdeploy_mmedit
[ 88%] Built target mmdeploy_classifier
[ 89%] Linking CXX shared library ../../../lib/libmmdeploy_cpu_transform_impl.so
[ 89%] Built target mmdeploy_cpu_transform_impl
[ 90%] Linking CXX shared library ../../../lib/libmmdeploy_transform.so
[ 91%] Linking CXX shared library ../../lib/libmmdeploy_net_module.so
[ 91%] Built target mmdeploy_transform
[ 91%] Built target mmdeploy_net_module
[ 92%] Linking CXX shared library ../../../lib/libmmdeploy_mmseg.so
[ 92%] Built target mmdeploy_mmseg
[ 93%] Linking CXX shared library ../../../lib/libmmdeploy_mmdet.so
[ 93%] Built target mmdeploy_mmdet
[ 94%] Linking CXX shared library ../../lib/libmmdeploy_graph.so
[ 94%] Built target mmdeploy_graph
[ 94%] Linking CXX shared library ../../lib/libmmdeploy_directory_model.so
[ 94%] Built target mmdeploy_directory_model
[ 95%] Linking CXX shared library ../../../lib/libmmdeploy_mmocr.so
[ 95%] Built target mmdeploy_mmocr
[ 95%] Built target mmdeploy_tensorrt_ops_obj
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2
haofanwang commented 2 years ago

已解决。

参考另一个很相似的issue

git clone git@github.com:openppl-public/ppl.cv.git
cd ppl.cv
./build.sh cuda

替换为

wget https://github.com/openppl-public/ppl.cv/archive/refs/tags/v0.6.1.zip
unzip v0.6.1.zip && mv ppl.cv-0.6.1 ppl.cv
cd ppl.cv
./build.sh cuda
RunningLeon commented 2 years ago

@haofanwang Hi, could you try to install ppl.cv== v0.6.1? Could refer to here https://github.com/open-mmlab/mmdeploy/blob/master/docs/en/build.md#dependencies

haofanwang commented 2 years ago

Thx!