Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.

opencv cmake command error: fatal error: linux/videodev.h: No such file or directory

0 votes
I follow jevois/INSTALL instruction for installing OpenCV 3.3.0.

My cmake command failed with Fatal error: linux/videodev.h: No such file or directory. What possible missing component?

The file does not exist in /usr/include/linux directory, but there is /usr/include/libv4l1-videadev.h. Here is the console output for cmake:

-- Detected version of GNU GCC: 54 (504)
-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
asked Dec 27, 2017 in Programmer Questions by hay (120 points)

1 Answer

0 votes
looks like maybe you are missing libv4l2-dev or similar.

Our recommendation to compile everything from source is 1) do you really need it? That would be only if you are going to change the Linux kernel of JeVois or its operating system, and 2) start by installing the Ubuntu packages from jevois.usc.edu, which will pull all the required dependencies (hopefully). Then proceed as explained in INSTALL. As part of installing the DEB packages from jevois.usc.edu, you will already get the pre-compiled and pre-installed OpenCV 3.3 for JeVois. On host, it is in /usr/share/jevois-opencv-3.3.0 and on platform it is in buildroot and will be flashed to microSD automatically by jevois-flash-card
answered Dec 27, 2017 by JeVois (46,580 points)
...