Wulingtian / yolov5_tensorrt_int8

TensorRT int8 量化部署 yolov5s 模型,实测3.3ms一帧!
166 stars 26 forks source link

make 编译报错,用的是提供的opencv-3.4.2 #4

Open Aruen24 opened 3 years ago

Aruen24 commented 3 years ago

[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o In file included from /usr/local/opencv-3.4.2/include/opencv2/calib3d.hpp:48:0, from /usr/local/opencv-3.4.2/include/opencv2/opencv.hpp:56, from /home/wangyuanwen/tensorrt_test/yolov5_tensorrt_int8/yolov5s_infer.cc:6: /usr/local/opencv-3.4.2/include/opencv2/features2d.hpp:50:10: fatal error: opencv2/flann/miniflann.hpp: No such file or directory

include "opencv2/flann/miniflann.hpp"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. CMakeFiles/YoloV5sEngine.dir/build.make:62: recipe for target 'CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o' failed make[2]: [CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed make[1]: [CMakeFiles/YoloV5sEngine.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Wulingtian commented 3 years ago

你的OpenCV放到/usr/local目录下吗?

Wulingtian commented 3 years ago

[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o In file included from /usr/local/opencv-3.4.2/include/opencv2/calib3d.hpp:48:0, from /usr/local/opencv-3.4.2/include/opencv2/opencv.hpp:56, from /home/wangyuanwen/tensorrt_test/yolov5_tensorrt_int8/yolov5s_infer.cc:6: /usr/local/opencv-3.4.2/include/opencv2/features2d.hpp:50:10: fatal error: opencv2/flann/miniflann.hpp: No such file or directory

include "opencv2/flann/miniflann.hpp"

^~~~~~~~~ compilation terminated. CMakeFiles/YoloV5sEngine.dir/build.make:62: recipe for target 'CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o' failed make[2]: [CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed make[1]: [CMakeFiles/YoloV5sEngine.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

你把opencv放到你的用户目录下试试

Wulingtian commented 3 years ago

trt721 这是我的库截图,你看看你的库有没有链接上

Aruen24 commented 3 years ago

原来系统是ubuntu16.04 不支持GLIBC_2.27,系统换成18.04可以正常编译了!

juzigithub commented 3 years ago

@wang911205我遇到了跟你一样的问题,请问还有其他解决方案吗?