Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Aruen24 opened this issue Feb 26, 2021 · 5 comments
Open

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

Aruen24 opened this issue Feb 26, 2021 · 5 comments

Comments

@Aruen24
Copy link

Aruen24 commented Feb 26, 2021

[ 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
Copy link
Owner

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

@Wulingtian
Copy link
Owner

Wulingtian commented Feb 26, 2021

[ 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
Copy link
Owner

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

@Aruen24
Copy link
Author

Aruen24 commented Feb 27, 2021

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

@juzigithub
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants