当前位置:网站首页>交叉编译Opencv带Contrib
交叉编译Opencv带Contrib
2022-07-03 19:17:00 【偏安一隅,占山为王】
常见错误:
1.无法解决 R_AARCH64_ADR_PREL_PG_HI21 重定向于符号 “[email protected]@GLIBCXX_3.4.21” 有冲突
2.../../lib/libopencv_core.so:对‘pthread_mutexattr_destroy’未定义的引用
../../lib/libopencv_core.so:对‘pthread_key_create’未定义的引用
../../lib/libopencv_core.so:对‘pthread_getspecific’未定义的引用
../../lib/libopencv_core.so:对‘dlopen’未定义的引用
../../lib/libopencv_core.so:对‘pthread_mutex_trylock’未定义的引用
../../lib/libopencv_core.so:对‘pthread_key_delete’未定义的引用
../../lib/libopencv_core.so:对‘dlclose’未定义的引用
../../lib/libopencv_core.so:对‘dlsym’未定义的引用
../../lib/libopencv_core.so:对‘pthread_mutexattr_settype’未定义的引用
../../lib/libopencv_core.so:对‘pthread_setspecific’未定义的引用
../../lib/libopencv_core.so:对‘pthread_mutexattr_init’未定义的引用
collect2: error: ld returned 1 exit status
apps/version/CMakeFiles/opencv_version.dir/build.make:95: recipe for target 'bin/opencv_version' failed
make[2]: *** [bin/opencv_version] Error 1
CMakeFiles/Makefile2:8366: recipe for target 'apps/version/CMakeFiles/opencv_version.dir/all' failed
make[1]: *** [apps/version/CMakeFiles/opencv_version.dir/all] Error 2
此问题就是因为没有设置CMAKE_EXE_LINKER_FLAGS项造成的,所以首先我们要修改编译目录下面的CMakeCache.txt的文件,在文件中找到CMAKE_EXE_LINKER_FLAGS 这一项,改为
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=-pthread -ldl -lrt
3.出现错误 “ libopencv_imgcodecs.so:对‘png_init_filter_functions_neon’未定义的引用 ”
根据 https://sourceforge.net/p/libpng/bugs/230/ 所发的补丁文件进行文件的修改并重新make就可以解决。注意补丁中有两个文件,只需要修改pngpriv.h 就可以,所以可以删除掉文件中关于configure.ac的部分。
具体如何使用patch,网上资料很多可以自行查看
也可以手动修改。
打开/opencv-4.1.2/3rdparty/libpng/pngpriv.h
将130行起的
# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
131 defined(PNG_ALIGNED_MEMORY_SUPPORTED)
改为
# if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
defined(PNG_ALIGNED_MEMORY_SUPPORTED)
4.
/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:653:37: fatal error: boostdesc_bgm.i: No such file or directory
#include "boostdesc_bgm.i"
^
compilation terminated.
modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/build.make:91: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.obj' failed
make[2]: *** [modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.obj] Error 1
这是因为缺失的文件下载失败或者缺失,可以将一系列库文件复制到opencv_contrib/modules/xfeatures2d/src 中,即可解决,下载地址可以自行查找或在下载频道我有上传
https://download.csdn.net/download/qq_34533248/11804560
参考链接:
使用海思的交叉编译器编译opencv的过程中遇到的问题_他们叫我高老师的博客-CSDN博客
Linux OpenCV交叉编译20220322_songlixiangaibin的博客-CSDN博客_linux opencv 交叉编译
边栏推荐
- 【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
- Flume learning notes
- The way to treat feelings
- 【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
- Octopus online ecological chain tour Atocha protocol received near grant worth $50000
- [optics] dielectric constant calculation based on MATLAB [including Matlab source code 1926]
- 【LeetCode】【SQL】刷题笔记
- Random numbers in a long range, is that right- Random number in long range, is this the way?
- Sentinel source code analysis part II - sentinel dashboard console startup and configuration
- Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
猜你喜欢
[free sharing] kotalog diary2022 plan electronic manual ledger
The installation path cannot be selected when installing MySQL 8.0.23
东数西算拉动千亿产业,敢啃“硬骨头”的存储厂商才更有机会
【光学】基于matlab涡旋光产生【含Matlab源码 1927期】
我們做了一個智能零售結算平臺
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
【光学】基于matlab介电常数计算【含Matlab源码 1926期】
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
DriveSeg:动态驾驶场景分割数据集
为什么要做特征的归一化/标准化?
随机推荐
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
DriveSeg:动态驾驶场景分割数据集
01. Preparation for automated office (free guidance, only three steps)
Summary of composition materials for 2020 high-frequency examination center of educational resources
2022.2.14 Li Kou - daily question - single element in an ordered array
Record the errors reported when running fluent in the simulator
Zhang Fei hardware 90 day learning notes - personal records on day 4, please see my personal profile / homepage for the complete
What does a really excellent CTO look like in my eyes
What is the content of game modeling
Random numbers in a long range, is that right- Random number in long range, is this the way?
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
In addition to the prickles that pierce your skin, there are poems and distant places that originally haunt you in plain life
EGO Planner代码解析bspline_optimizer部分(3)
Free hand account sharing in September - [cream Nebula]
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
Bad mentality leads to different results
__ Weak and__ The difference between blocks
C enum contains value - C enum contains value
The earliest record