当前位置:网站首页>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 :
边栏推荐
- Ego planner code parsing Bspline_ Optimizer section (2)
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
- QT -- qfileinfo file information reading
- 第一章:递归求n的阶乘n!
- Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
- 第一章:三位阶乘和数,图形点扫描
- The necessity of lean production and management in sheet metal industry
- Web Security (VII) specific process of authentication with session cookie scheme
- Summary of learning materials and notes of Zhang Fei's actual combat electronics 1-31
- We have built an intelligent retail settlement platform
猜你喜欢
OSPF - detailed explanation of stub area and full stub area
EGO Planner代码解析bspline_optimizer部分(2)
Driveseg: dynamic driving scene segmentation data set
【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
QT -- qfile file read / write operation
These problems should be paid attention to in the production of enterprise promotional videos
第一章:求所有阶乘和数,大奖赛现场统分程序设计,三位阶乘和数,图形点扫描,递归求n的阶乘n!,求n的阶乘n!,舍罕王失算
Valentine's Day - make an exclusive digital collection for your lover
Using the visualization results, click to appear the corresponding sentence
[free sharing] kotalog diary2022 plan electronic manual ledger
随机推荐
Summary of composition materials for 2020 high-frequency examination center of educational resources
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]
Redis master-slave synchronization, clustering, persistence
Record: solve the problem that MySQL is not an internal or external command environment variable
Latex image rotates with title
Foundation of ActiveMQ
BUUCTF
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
Bad mentality leads to different results
东数西算拉动千亿产业,敢啃“硬骨头”的存储厂商才更有机会
The space of C disk is insufficient, and the computer becomes stuck. Quickly expand the capacity of C disk to make the system more smooth
The earliest record
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
Record: MySQL changes the time zone
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
Buuctf's different flags and simplerev
This Chinese numpy quick look-up table is too easy!
FBI警告:有人利用AI换脸冒充他人身份进行远程面试
第一章:拓广同码小数和s(d, n)
Record the errors reported when running fluent in the simulator