当前位置:网站首页>Cross compile opencv with contrib
Cross compile opencv with contrib
2022-07-03 19:21:00 【Pianan corner, occupy the mountain as king】
Common mistakes :
1. Unable to resolve R_AARCH64_ADR_PREL_PG_HI21 Redirect to symbol “[email protected]@GLIBCXX_3.4.21” There are conflicts
2.../../lib/libopencv_core.so: Yes ‘pthread_mutexattr_destroy’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_key_create’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_getspecific’ Undefined references
../../lib/libopencv_core.so: Yes ‘dlopen’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_mutex_trylock’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_key_delete’ Undefined references
../../lib/libopencv_core.so: Yes ‘dlclose’ Undefined references
../../lib/libopencv_core.so: Yes ‘dlsym’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_mutexattr_settype’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_setspecific’ Undefined references
../../lib/libopencv_core.so: Yes ‘pthread_mutexattr_init’ Undefined references
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
This problem is because there is no setting CMAKE_EXE_LINKER_FLAGS Caused by item , So first we need to modify the CMakeCache.txt The file of , Found in file CMAKE_EXE_LINKER_FLAGS This one , Change it to
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=-pthread -ldl -lrt
3. There is an error “ libopencv_imgcodecs.so: Yes ‘png_init_filter_functions_neon’ Undefined references ”
according to https://sourceforge.net/p/libpng/bugs/230/ The patch file issued shall be modified and re make You can solve it . Note that there are two files in the patch , It just needs to be modified pngpriv.h Can , So you can delete the file about configure.ac Part of .
How to use it patch, Many online materials can be viewed by yourself
You can also modify it manually .
open /opencv-4.1.2/3rdparty/libpng/pngpriv.h
take 130 It works
# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
131 defined(PNG_ALIGNED_MEMORY_SUPPORTED)
Change it to
# 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
This is because the missing files failed to download or are missing , You can copy a series of library files to opencv_contrib/modules/xfeatures2d/src in , Can solve , You can find the download address by yourself or upload it on the download channel
https://download.csdn.net/download/qq_34533248/11804560
Reference link :
边栏推荐
- 第一章:简化同码小数和s(d, n)
- ActiveMQ的基础
- Basic principle of LSM tree
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
- [water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
- 【疾病识别】基于matlab GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
- Pecan — @expose()
- Differential constrained SPFA
- Zhang Fei hardware 90 day learning notes - personal record on day 6. Please see my personal profile / homepage for the complete record
- Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
猜你喜欢

Help change the socket position of PCB part

Yolov3 network model building

【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】

The installation path cannot be selected when installing MySQL 8.0.23

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

SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)

我眼中真正优秀的CTO长啥样

ActiveMQ的基础
![Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext](/img/56/ea61359dd149a49589ba7ad70812a0.jpg)
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext

第一章:求n的阶乘n!
随机推荐
High concurrency Architecture - separate databases and tables
Think of new ways
2020 intermediate financial management (escort class)
Zhang Fei hardware 90 day learning notes - personal records on day 2, please see my personal profile / homepage for the complete
Buuctf's different flags and simplerev
Succession of flutter
Bad mentality leads to different results
03 -- QT OpenGL EBO draw triangle
Why should we do feature normalization / standardization?
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
Counting from the East and counting from the West will stimulate 100 billion industries. Only storage manufacturers who dare to bite the "hard bone" will have more opportunities
Pecan — @expose()
The most valuable thing
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
Scrape crawler framework
How to design a high concurrency system
Valentine's Day - make an exclusive digital collection for your lover
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]
Record: pymysql is used in pycharm to connect to the database
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0