当前位置:网站首页>交叉编译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 GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
- Comments on flowable source code (37) asynchronous job processor
- How does if ($variable) work? [repeat] - how exactly does if ($variable) work? [duplicate]
- Streaming media server (16) -- figure out the difference between live broadcast and on-demand
- Verilog HDL continuous assignment statement, process assignment statement, process continuous assignment statement
- 2022.2.14 Li Kou - daily question - single element in an ordered array
- If the warehouse management communication is not in place, what problems will occur?
- Go home early today
- 为什么要做特征的归一化/标准化?
- Help change the socket position of PCB part
猜你喜欢

【光学】基于matlab涡旋光产生【含Matlab源码 1927期】

Dart JSON编码器和解码器剖析

【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁

Does SQL always report foreign key errors when creating tables?

Record: writing MySQL commands
![Free hand account sharing in September - [cream Nebula]](/img/4f/fec31778a56886585e35be87885452.jpg)
Free hand account sharing in September - [cream Nebula]

2022.2.14 Li Kou - daily question - single element in an ordered array

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

Record: install MySQL on ubuntu18.04

PyTorch中在反向传播前为什么要手动将梯度清零?
随机推荐
【LeetCode】【SQL】刷题笔记
Sentinel source code analysis part II - sentinel dashboard console startup and configuration
Random numbers in a long range, is that right- Random number in long range, is this the way?
SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
Pecan - route
[wallpaper] (commercially available) 70 wallpaper HD free
SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
Day_ 18 IO stream system
Free year-end report summary template Welfare Collection
P3402 persistent and searchable
Yolov3 network model building
Nous avons fait une plateforme intelligente de règlement de détail
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
Summary of composition materials for 2020 high-frequency examination center of educational resources
Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
[free sharing] kotalog diary2022 plan electronic manual ledger
Day18 - basis of interface testing
The most valuable thing
Why should we do feature normalization / standardization?