2

I've been trying to install OpenCV 2.2 on Ubuntu 11.04. As far as I can gather from here: linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04, the installation fails because video4linux is no longer in the kernel. If I follow the guide linked to in the above thread (http://tech.groups.yahoo.com/group/OpenCV/message/79758), the make-command passes the initial error described in the above thread, but fails at a later point. I get the error:

Linking CXX executable ../../bin/opencv_createsamples
../../lib/libopencv_highgui.so.2.2.0: undefined reference to `cvCreateCameraCapture_V4L(int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [modules/haartraining/CMakeFiles/opencv_createsamples.dir/all] Error 2
make: *** [all] Error 2

This error also seems related to video4linux.

Any suggestions?

Thanks a bunch, Andreas Møgelmose

Community
  • 1
  • 1
XerXes
  • 723
  • 1
  • 9
  • 17
  • possible duplicate of [linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04](http://stackoverflow.com/questions/5842235/linux-videodev-h-no-such-file-or-directory-opencv-on-ubuntu-11-04) – karlphillip May 03 '11 at 14:28
  • It is not a duplicate, this is a different error. – XerXes May 04 '11 at 11:55
  • 2
    Meanwhile, I've managed to make it compile by disabling video4linux in the CMake config. This makes it possible to install the library, but has the rather unfortunate side effect of making it impossible to use USB cameras as input devices. So that's not really what I'm after. – XerXes May 04 '11 at 11:57
  • The problem exist as a bug in the OpenCV Trac here: https://code.ros.org/trac/opencv/ticket/862 (with no solution) – XerXes May 04 '11 at 12:10
  • The most recent SVN version compiles, but cannot load video files nor use attached cameras. – XerXes May 09 '11 at 08:45
  • It is very strange... I was able to compile OpenCV 2.2 on Ubuntu 11.04 yesterday but after installed libgtk2-dev, rerun cmake and make I got the same problem. Any idea? –  May 10 '11 at 07:55
  • Latest svn version worked for me regarding video files. But I didn't test it for cameras. Hope you didn't miss libv4l-dev – Niroshan Jun 14 '11 at 16:49

1 Answers1

2

You may find this blog post useful: http://salikscodingblog.wordpress.com/2011/08/05/compiling-opencv-2-on-ubuntu/

user491880
  • 4,709
  • 4
  • 28
  • 49