Fatal error: sys/videoio.h: No such file or directory (RISCV opencv 4.7.0-dev cmake)

Hi,

The OpenCV version is 4.7.0-dev, My system is Ubuntu 18.04.

I am following this web: OpenCV RISC V · opencv/opencv Wiki · GitHub
when I Configure OpenCV (the cmake cmd in step 4 ), I got an error:

-- Configuring incomplete, errors occurred!
See also "/home/xxx/build/CMakeFiles/CMakeOutput.log".
See also "/home/xxx/build/CMakeFiles/CMakeError.log".

The detail in "CMakeError.log" is:
/home/xxxx/riscv64-linux-x86_64/bin/riscv64-unknown-linux-gnu-gcc   -static -march=rv64gcvxthead -mabi=lp64v -pthread -D__riscv_vector_071   -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden  -O3 -DNDEBUG  -DNDEBUG -fPIE   -o CMakeFiles/cmTC_3025d.dir/CheckIncludeFile.c.o   -c /home/xxx/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/xxx/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: sys/videoio.h: No such file or directory

Do you have any suggestions?

your system doesn’t have sys/videoio.h

you could:

  • build without V4L support (uncheck WITH_V4L cmake variable)
  • disable build of OpenCV’s videoio module entirely