交叉编译opencv:undefined reference to `png_riffle_palette_neon

简介: 交叉编译opencv:undefined reference to `png_riffle_palette_neon
  • 错误
usr/lib/gcc-cross/aarch64-linux-gnu/8/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_imgcodecs.so.4.2.0: undefined reference to `png_riffle_palette_neon'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:89:bin/opencv_annotation] 错误 1
make[1]: *** [CMakeFiles/Makefile2:3746:apps/annotation/CMakeFiles/opencv_annotation.dir/all] 错误 2
  • 解决办法

方法一:无效

进入到3rdparty/libpng,在CMakeLists.txt顶端增加:

set(ENABLE_NEON ON)


方法二:有效

${HOME}/opencv-3.3.1/3rdparty/libpng/pngpriv.h

/*# if (defined(ARM_NEON) || defined(__ARM_NEON)) && */
if defined(PNG_ARM_NEON) && (defined(ARM_NEON) || defined(__ARM_NEON)) && \

如上所示,把上面的一行注释掉,增加下面一行。再次make即可。

目录
相关文章
|
iOS开发 MacOS
Qt 报错:Undefined symbols for architecture arm64
MacBook Pro Apple M1 使用 Qt 6.4.1 的时候碰到的报错,做了不同的尝试,最后解决了这个报错。
705 0
|
Android开发
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
463 0
【错误记录】NDK 动态库报错 ( dlopen failed: file offset for the library /lib/arm64/libwebp.so“ >= file size:0)
ORB_SLAM2_CUDA : Make failed - Compiling examples - Undefined References
ORB_SLAM2_CUDA : Make failed - Compiling examples - Undefined References
109 0
|
计算机视觉
成功解决cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: err
成功解决cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: err
|
计算机视觉
交叉编译opencv:undefined reference to `png_riffle_palette_neon
交叉编译opencv:undefined reference to `png_riffle_palette_neon
208 0
|
计算机视觉
opencv-contrib-Python编译module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
opencv-contrib-Python编译module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
183 0
png2theora.c: undefined reference to `png_sizeof
png2theora.c: undefined reference to `png_sizeof
109 0
|
计算机视觉 Python
Python安装cv2库出错及解决:Could not find a version that satisfies the requirement cv2
Python安装cv2库出错及解决:Could not find a version that satisfies the requirement cv2
662 0
关于 海思平台sample的demo中添加ffmpeg静态库(.a)报错误undefined reference toavpriv_pix_fmt_hps_avi等错误 的解决方法
关于 海思平台sample的demo中添加ffmpeg静态库(.a)报错误undefined reference toavpriv_pix_fmt_hps_avi等错误 的解决方法
关于 海思平台sample的demo中添加ffmpeg静态库(.a)报错误undefined reference toavpriv_pix_fmt_hps_avi等错误 的解决方法
Qt-QML-Charts-ChartView-编译错误-ASSERT: “!“No style available without QApplication!
昨天本来是回家想好好琢磨一下使用Chart来绘制曲线的,奈何在建立项目的时候也就卡住了,加上心情比较烦躁,也没有耐心寻找答案就草草了事。所以今天继续搞定这个。
361 0
Qt-QML-Charts-ChartView-编译错误-ASSERT: “!“No style available without QApplication!
下一篇
DataWorks