Ubuntu 交叉编译openCV3.2 至s5pv210环境
2017-07-22 15:55
645 查看
一、环境
1.Ubuntu16.04.2
2.openCV3.2
3.交叉编译器:arm-linux-gcc4.4.3 (经过测试,最好采用此版本交叉编译,报错的机会会少点)
二、交叉编译器问题
1.成功安装交叉编译4.4.3后,至于怎么安装交叉编译器,请百度很多这方面的教程,执行编译命令会报错,libstdc++.so.6: cannot open shared object file
解决方法:
在13.10 版本中,ia32_libs被废弃了导致没有32位的lib库
sudoapt-get install lib32stdc++6
sudoapt-get install lib32z1
三、编译问题
1./home/wzh/tools/arm/opencv-3.2.0/modules/imgproc/src/drawing.cpp:1026:error: call of overloaded 'abs(long long int&)' is ambiguous
解决方法:
修改上面对应路径的drawing.cpp,在1026行,把那一行里的所有abs换成fabs
2. ./../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_destroy'
../../lib/libopencv_imgcodecs.so: undefinedreference to `pthread_create'
../../lib/libopencv_core.so: undefinedreference to `dlopen'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutex_trylock'
../../lib/libopencv_core.so: undefinedreference to `clock_gettime'
../../lib/libopencv_core.so: undefinedreference to `dlsym'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_settype'
../../lib/libopencv_imgcodecs.so: undefinedreference to `pthread_join'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_init'
解决方法:
修改/opt/opencv3-build目录下的CMakeCache.txt
CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread –lrt
四、s5pv210上运行
1.把openCV编译好的lib库下的所有*so 拷贝进板子里根目录下的lib目录下
2.运行程序,报错:
OpenCVError: Unspecified error (The function is not implemented. Rebuild the librarywith Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian,install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) incvNamedWindow,
file/home/wzh/tools/arm/opencv-3.2.0/modules/highgui/src/window.cpp, line 565
terminatecalled after throwing an instance of 'cv::Exception'
what(): /home/wzh/tools/arm/opencv-3.2.0/modules/highgui/src/window.cpp:565:error: (-2) The function is not implemented. Rebuild the library with Windows,GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, installlibgtk2.0-dev and
pkg-config, then re-run cmake or configure script in functioncvNamedWindow
解决方法:
需要进行gtk2.0交叉编译,这里没有这样做,采用QT UI 来进行显示。如需要进行gtk2.0交叉编译,参考这个博客的方法:http://blog.csdn.net/water_cow/article/details/8727990
1.Ubuntu16.04.2
2.openCV3.2
3.交叉编译器:arm-linux-gcc4.4.3 (经过测试,最好采用此版本交叉编译,报错的机会会少点)
二、交叉编译器问题
1.成功安装交叉编译4.4.3后,至于怎么安装交叉编译器,请百度很多这方面的教程,执行编译命令会报错,libstdc++.so.6: cannot open shared object file
解决方法:
在13.10 版本中,ia32_libs被废弃了导致没有32位的lib库
sudoapt-get install lib32stdc++6
sudoapt-get install lib32z1
三、编译问题
1./home/wzh/tools/arm/opencv-3.2.0/modules/imgproc/src/drawing.cpp:1026:error: call of overloaded 'abs(long long int&)' is ambiguous
解决方法:
修改上面对应路径的drawing.cpp,在1026行,把那一行里的所有abs换成fabs
2. ./../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_destroy'
../../lib/libopencv_imgcodecs.so: undefinedreference to `pthread_create'
../../lib/libopencv_core.so: undefinedreference to `dlopen'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutex_trylock'
../../lib/libopencv_core.so: undefinedreference to `clock_gettime'
../../lib/libopencv_core.so: undefinedreference to `dlsym'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_settype'
../../lib/libopencv_imgcodecs.so: undefinedreference to `pthread_join'
../../lib/libopencv_core.so: undefinedreference to `pthread_mutexattr_init'
解决方法:
修改/opt/opencv3-build目录下的CMakeCache.txt
CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread –lrt
四、s5pv210上运行
1.把openCV编译好的lib库下的所有*so 拷贝进板子里根目录下的lib目录下
2.运行程序,报错:
OpenCVError: Unspecified error (The function is not implemented. Rebuild the librarywith Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian,install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) incvNamedWindow,
file/home/wzh/tools/arm/opencv-3.2.0/modules/highgui/src/window.cpp, line 565
terminatecalled after throwing an instance of 'cv::Exception'
what(): /home/wzh/tools/arm/opencv-3.2.0/modules/highgui/src/window.cpp:565:error: (-2) The function is not implemented. Rebuild the library with Windows,GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, installlibgtk2.0-dev and
pkg-config, then re-run cmake or configure script in functioncvNamedWindow
解决方法:
需要进行gtk2.0交叉编译,这里没有这样做,采用QT UI 来进行显示。如需要进行gtk2.0交叉编译,参考这个博客的方法:http://blog.csdn.net/water_cow/article/details/8727990
相关文章推荐
- arm-linux-gnueabihf编译器在ubuntu环境下交叉编译opencv2.4.10
- arm-linux-gnueabihf编译器在ubuntu环境下交叉编译opencv2.4.10 排版3(没有跑通例子程序)
- ubuntu下arm交叉编译环境配置
- ubuntu16.04安装编译opencv3.2
- Ubuntu14.04下嵌入式交叉编译环境arm-linux-gcc-4.3.3搭建过程
- 【教程】在Ubuntu下搭建ARM处理器 arm-linux-gcc 交叉编译环境以及OpenJTAG + openocd 烧写环境
- ubuntu14.04 /16.04 编译安装OpenCV 3.2
- opencv3.2在vs2015开发环境搭建+cmake3.8编译生成opencv x86版本库
- Ubuntu环境下OpenCV 3.2版本中CMake error the source directory does not exist
- 嵌入式Linux实战篇--交叉编译环境的建立(基于ubuntu 8.10)
- ubuntu下安装arm-linux-gcc-3.3.2,搭建交叉编译环境并设置路径
- ubuntu下交叉编译环境构建
- ubuntu编译安装opencv3到anaconda虚拟环境(virtual env同理)
- [转]ubuntu下交叉编译环境构建(arm-linux-gcc-3.4.1.tar.bz2 )
- Ubuntu下arm交叉编译环境的创建及基于s3c2410的linux2.6.22移植(一)
- Android系统编译环境搭建—Ubuntu14.04安装&root登录&Chromium root启动&安装配置交叉编译环境
- 在Ubuntu13.10上自己动手搭建交叉编译环境arm-linux-gcc-4.8.2
- Ubuntu交叉编译环境的搭建
- 在vbox虚拟机中ubuntu系统上建立arm交叉编译环境
- Ubuntu 16.04搭建交叉编译环境arm-linux-gcc遇到的问题