Eu tentei instalar o OpenCV várias vezes, mas sempre retorna o mesmo erro. Estou executando o Linux - Debian no Beaglebone Black.
A configuração é:
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux
Alguém me disse que o erro é propício no código do OpenCV - no GitHub. O comando que eu usei para clonar o openCV foi:
git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git
As bandeiras que usei no Cmake foram:
cd ~/opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules/ \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON ..
O erro é:
[ 54%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o
[ 54%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_libv4l.cpp.o
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:329:27: error: field 'cap' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:330:22: error: field 'inp' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:331:23: error: field 'form' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:332:21: error: field 'crop' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:333:24: error: field 'cropcap' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:334:31: error: field 'req' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:335:32: error: field 'compr' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:336:24: error: field 'control' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:338:26: error: field 'queryctrl' has incomplete type
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp: In function 'int try_init_v4l2(CvCaptureCAM_V4L*, char*)':
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:488:5: error: 'CvCaptureCAM_V4L' has no member named 'cap'
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:488:5: error: 'CvCaptureCAM_V4L' has no member named 'cap'
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:1823:24: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' was not declared in this scope
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:1824:42: error: 'VIDIOC_STREAMOFF' was not declared in this scope
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:1827:64: error: 'CvCaptureCAM_V4L' has no member named 'req'
.... a lot of lines
[ 54%] /home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp: In function 'double icvGetPropertyCAM_V4L(CvCaptureCAM_V4L*, int)':
/home/nathan/opencv/modules/videoio/src/cap_libv4l.cpp:1495:1: error: control reaches end of non-void function [-Werror=return-type]
Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/align.cpp.o
cc1plus: some warnings being treated as errors
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_libv4l.cpp.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 54%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/opencl_kernels_photo.cpp.o
Linking CXX shared library ../../lib/libopencv_photo.so
[ 54%] Built target opencv_photo
make: *** [all] Error 2
root@beaglebone:/home/nathan/opencv/build#
O erro está sempre no arquivo
opencv/modules/videoio/src/cap_libv4l.cpp
Instalei todos os pacotes essenciais e segui os passos neste site:
Eu tentei baixar o OpenCV de diferentes fontes, mas o erro é sempre o mesmo.
Alguma ideia? obrigado por todos