2

I tried to install OpenCV several times but always returns the same error. I'm running Linux - Debian in Beaglebone Black.

The configuration is:

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux

Someone told me that the error is proplably in the code of OpenCV - in GitHub. The command that I used to clone openCV was:

git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git

The flags that I used in Cmake were:

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 ..

The error is:

[ 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#

The error is always in the file

opencv/modules/videoio/src/cap_libv4l.cpp

I installed all the essencial packages and followed the steps in this site : http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/

I tried to download OpenCV from diferents sources but the error is always the same.

Any idea? thanks for all

0

You must log in to answer this question.

Browse other questions tagged .