Hi,
I am getting following error while making build of opencv-contrib.git.
CMakeFiles/cmTryCompileExec3380356095.dir/build.make:57: recipe for target 'CMakeFiles/cmTryCompileExec3380356095.dir/CheckIncludeFile.c.o' failed
make[1]: Leaving directory '/home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp'
make[1]: ** [CMakeFiles/cmTryCompileExec3380356095.dir/CheckIncludeFile.c.o] Error 1
Makefile:118: recipe for target 'cmTryCompileExec3380356095/fast' failed
make: ** [cmTryCompileExec3380356095/fast] Error 2
Determining if the include file ffmpeg/avformat.h exists failed with the following output:
Change Dir: /home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec1258602677/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1258602677.dir/build.make CMakeFiles/cmTryCompileExec1258602677.dir/build
make[1]: Entering directory '/home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1258602677.dir/CheckIncludeFile.c.o
/usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -o CMakeFiles/cmTryCompileExec1258602677.dir/CheckIncludeFile.c.o -c /home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/ecomadmin/Documents/opencv/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:29: fatal error: ffmpeg/avformat.h: No such file or directory
#include
^
compilation terminated.
It is just a CMake configuration check. There are no any fatal errors.
Take a look on OpenCV Installation tutorials or on steps which we use to test OpenCV.
Hi,
i am following installation steps from http://docs.opencv.org/3.1.0/d7/d9f/tutorial_linux_install.html#gsc.tab=0
I got error while i am building contrib repository https://github.com/Itseez/opencv_contrib.git in opencv build folder by running following command
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/home/ecomadmin/Documents/opencv/opencv_contrib ..
I woud be thankful if you help in this.
Provided information is not very helpful. Could you add CMake stdout log?
OPENCV_EXTRA_MODULES_PATH should point to "modules" subdirectory of opencv_contrib.
Hi! I'm getting the same error myself.
What I do is the following:
git clone <full_path>opencv.git to ~/opencv (success)
git clone <full_path>opencv_contrib.git to ~/opencv_contrib (success)
mkdir /release in /opencv (success)
doing cmake config in /release as per http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html
now, if I try to run this line: cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory> BEFORE make i got the same error message as shown by ankitVarshney1988. The same happens if I append the option for OPENCV_EXTRA_MODULES_PATH to the first cmake statement.
What I did to overcome the issue it to use FULL path to the opencv_contrib modules (/home/<user>/<opencv_contrib>/modules) as argument of OPENCV_EXTRA_MODULES_PATH. I have done this in two separate steps: first cmake the opencv core package, make it, then cmake the opencv_contrib and finally make it.
I tried all of the combinations that came to my mind, and this one was the only one working.
Running cmake twice without and then with extra modules path helps. But in my case it was a 3.1.0 release from a website.
Most helpful comment
Hi! I'm getting the same error myself.
What I do is the following:
git clone <full_path>opencv.gitto ~/opencv (success)git clone <full_path>opencv_contrib.gitto ~/opencv_contrib (success)mkdir /release in /opencv (success)doing cmake config in /release as per http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html
now, if I try to run this line:
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>BEFOREmakei got the same error message as shown by ankitVarshney1988. The same happens if I append the option for OPENCV_EXTRA_MODULES_PATH to the first cmake statement.What I did to overcome the issue it to use FULL path to the opencv_contrib modules (
/home/<user>/<opencv_contrib>/modules) as argument ofOPENCV_EXTRA_MODULES_PATH. I have done this in two separate steps: first cmake the opencv core package, make it, then cmake the opencv_contrib and finally make it.I tried all of the combinations that came to my mind, and this one was the only one working.