当前位置:网站首页>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 :
边栏推荐
- OSPF - detailed explanation of stub area and full stub area
- Find the median of two positive arrays
- Ego planner code parsing Bspline_ Optimizer section (2)
- P1891 crazy LCM (Euler function)
- If the warehouse management communication is not in place, what problems will occur?
- EGO Planner代碼解析bspline_optimizer部分(1)
- 东数西算拉动千亿产业,敢啃“硬骨头”的存储厂商才更有机会
- 變化是永恒的主題
- Floating source code comment (38) parallel job processor
- 我们做了一个智能零售结算平台
猜你喜欢
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
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
[wallpaper] (commercially available) 70 wallpaper HD free
【LeetCode】【SQL】刷题笔记
Flutter network and data storage framework construction-b1
Free sharing | linefriends hand account inner page | horizontal grid | not for sale
Sentinel source code analysis part I sentinel overview
Php based campus lost and found platform (automatic matching push)
【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
SQL injection for Web Security (1)
随机推荐
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
We have built an intelligent retail settlement platform
Streaming media server (16) -- figure out the difference between live broadcast and on-demand
Redis master-slave synchronization, clustering, persistence
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
Dynamic planning -- expansion topics
我們做了一個智能零售結算平臺
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
Driveseg: dynamic driving scene segmentation data set
Php based campus lost and found platform (automatic matching push)
第一章:拓广同码小数和s(d, n)
Buuctf's different flags and simplerev
What does a really excellent CTO look like in my eyes
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
EGO Planner代码解析bspline_optimizer部分(3)
Using the visualization results, click to appear the corresponding sentence
EGO Planner代码解析bspline_optimizer部分(1)
Analysis of dart JSON encoder and decoder
Zhang Fei hardware 90 day learning notes - personal record on day 6. Please see my personal profile / homepage for the complete record
If the warehouse management communication is not in place, what problems will occur?