To resolve this error I tried to add extra module opencv-contrib-master from https://github.com/opencv/opencv_contrib.git I followed the steps given in the readme.md file but while running 'make' I am getting the following output:
[ 4%] Built target libwebp [ 4%] Built target opencv_core_pch_dephelp [ 4%] Built target pch_Generate_opencv_core Scanning dependencies of target opencv_core [ 4%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o Linking CXX shared library ../../lib/libopencv_core.so [ 7%] Built target opencv_core [ 7%] Built target opencv_ts_pch_dephelp [ 7%] Built target pch_Generate_opencv_ts [ 7%] Built target opencv_imgproc_pch_dephelp [ 8%] Built target pch_Generate_opencv_imgproc Linking CXX shared library ../../lib/libopencv_imgproc.so [ 11%] Built target opencv_imgproc [ 11%] Built target opencv_imgcodecs_pch_dephelp [ 11%] Built target pch_Generate_opencv_imgcodecs Linking CXX shared library ../../lib/libopencv_imgcodecs.so [ 12%] Built target opencv_imgcodecs [ 12%] Built target opencv_videoio_pch_dephelp [ 12%] Built target pch_Generate_opencv_videoio Linking CXX shared library ../../lib/libopencv_videoio.so [ 13%] Built target opencv_videoio [ 13%] Built target opencv_highgui_pch_dephelp [ 13%] Built target pch_Generate_opencv_highgui Linking CXX shared library ../../lib/libopencv_highgui.so [ 14%] Built target opencv_highgui [ 14%] Built target opencv_ts [ 14%] Built target opencv_perf_core_pch_dephelp [ 14%] Built target pch_Generate_opencv_perf_core Linking CXX executable ../../bin/opencv_perf_core [ 16%] Built target opencv_perf_core [ 16%] Built target opencv_test_core_pch_dephelp [ 16%] Generating test_precomp.hpp.gch/opencv_test_core_RELEASE.gch In file included from <command-line>:0:0: /usr/include/stdc-predef.h:1:0: fatal error: can’t create precompiled header /home/chandu/Opencv/opencv/release/modules/core/test_precomp.hpp.gch/opencv_test_core_RELEASE.gch: Permission denied /* Copyright (C) 1991-2014 Free Software Foundation, Inc. ^ compilation terminated. Preprocessed source stored into /tmp/cchn5Yvk.out file, please attach this to your bugreport. ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.9_cc1plus.1000.crash' make: *** [modules/core/test_precomp.hpp.gch/opencv_test_core_RELEASE.gch] Error 1 make: *** [modules/core/CMakeFiles/pch_Generate_opencv_test_core.dir/all] Error 2 make: *** [all] Error 2
Somewhere it was told that there may be problem in gcc version but I updated gcc version but no success. I am using gcc of version 4.9.4 and ubuntu of version 14.04.1. Before 'make' step I ran:
cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules /usr/local .. -DWITH_IPP=OFF -DWITH_OPENGL=ON -DWITH_QT=ON -DBUILD_EXAMPLES=ON
I approached many resources but no results. Any kind of help is appreciable.