当前位置:网站首页>交叉编译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 交叉编译
边栏推荐
- Pecan - route
- 【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
- Record: install MySQL on ubuntu18.04
- Record: pymysql is used in pycharm to connect to the database
- 我眼中真正优秀的CTO长啥样
- 【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
- Scrape crawler framework
- Bad mentality leads to different results
- Analyse du Code du planificateur ego bspline Section Optimizer (1)
- 2022.2.14 Li Kou - daily question - single element in an ordered array
猜你喜欢

为什么要做特征的归一化/标准化?
![Free hand account sharing in September - [cream Nebula]](/img/4f/fec31778a56886585e35be87885452.jpg)
Free hand account sharing in September - [cream Nebula]

东数西算拉动千亿产业,敢啃“硬骨头”的存储厂商才更有机会

【光学】基于matlab介电常数计算【含Matlab源码 1926期】
![[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]](/img/aa/9980acc9839f067202d46faabbf029.png)
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]

application

Flutter网络和数据存储框架搭建 -b1

我们做了一个智能零售结算平台

What does a really excellent CTO look like in my eyes

OSPF - detailed explanation of stub area and full stub area
随机推荐
利用可视化结果,点击出现对应的句子
Hard disk monitoring and analysis tool: smartctl
In addition to the prickles that pierce your skin, there are poems and distant places that originally haunt you in plain life
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
Day18 - basis of interface testing
Web Security (VII) specific process of authentication with session cookie scheme
Ego planner code parsing Bspline_ Optimizer section (3)
Record: writing MySQL commands
记录在模拟器中运行flutter时报的错
I didn't cancel
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
BUUCTF
Thinking about festivals
Foundation of ActiveMQ
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
math_ Taylor formula
High concurrency architecture cache
【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
Record: install MySQL on ubuntu18.04
Which do MySQL and Oracle learn?