当前位置:网站首页>交叉编译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 交叉编译
边栏推荐
- 达梦数据库的物理备份和还原简解
- Merge K ascending linked lists
- Hard disk monitoring and analysis tool: smartctl
- Read the paper glodyne global topology preserving dynamic network embedding
- Flutter network and data storage framework construction-b1
- Free hand account sharing in September - [cream Nebula]
- Understanding of database architecture
- Flume learning notes
- Web Security (VII) specific process of authentication with session cookie scheme
- Ego planner code parsing Bspline_ Optimizer section (2)
猜你喜欢

Buuctf's different flags and simplerev
![[leetcode weekly race] game 300 - 6110 Number of incremental paths in the grid graph - difficult](/img/8d/0e515af6c17971ddf461e3f3b87c30.png)
[leetcode weekly race] game 300 - 6110 Number of incremental paths in the grid graph - difficult
![235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]](/img/f5/f2d244e7f19e9ddeebf070a1d06dce.png)
235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]

This Chinese numpy quick look-up table is too easy!
![[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD](/img/51/209e35e0b94a51b3b406a184459475.png)
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD

第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数

PyTorch中在反向传播前为什么要手动将梯度清零?

Basic principle of LSM tree

Verilog HDL continuous assignment statement, process assignment statement, process continuous assignment statement

BUUCTF
随机推荐
A green plug-in that allows you to stay focused, live and work hard
Sentinel source code analysis part II - sentinel dashboard console startup and configuration
01. Preparation for automated office (free guidance, only three steps)
Next spread
2020 intermediate financial management (escort class)
Bad mentality leads to different results
【光学】基于matlab介电常数计算【含Matlab源码 1926期】
Ego planner code parsing Bspline_ Optimizer section (2)
【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
达梦数据库的物理备份和还原简解
Simple solution of physical backup and restore of Damon database
EGO Planner代码解析bspline_optimizer部分(1)
235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]
QT -- qfile file read / write operation
math_泰勒公式
Day18 - basis of interface testing
Max of PHP FPM_ Some misunderstandings of children
Pecan — Overview
[wallpaper] (commercially available) 70 wallpaper HD free
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数