Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV error in cmake #9942

Closed
ujur007 opened this issue Oct 25, 2017 · 1 comment
Closed

OpenCV error in cmake #9942

ujur007 opened this issue Oct 25, 2017 · 1 comment

Comments

@ujur007
Copy link

ujur007 commented Oct 25, 2017

I have following problem, I use the following Link to install and cmake opencV
https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/

(cv) pi@raspberrypi:~/opencv-3.1.0/build $ make -j4
[ 0%] Built target opencv_perf_core_pch_dephelp
[ 1%] Built target opencv_core_pch_dephelp
[ 3%] Built target libwebp
[ 3%] Built target opencv_imgproc_pch_dephelp
[ 3%] Built target opencv_imgcodecs_pch_dephelp
[ 3%] Built target opencv_videoio_pch_dephelp
[ 5%] Built target IlmImf
[ 5%] Built target opencv_highgui_pch_dephelp
[ 5%] Built target opencv_ts_pch_dephelp
[ 5%] Built target pch_Generate_opencv_perf_core
[ 5%] Built target opencv_test_core_pch_dephelp
[ 7%] Built target opencv_flann_pch_dephelp
[ 7%] Built target opencv_test_flann_pch_dephelp
[ 7%] Built target opencv_test_imgproc_pch_dephelp
[ 7%] Built target opencv_perf_imgproc_pch_dephelp
[ 8%] Built target opencv_ml_pch_dephelp
[ 8%] Built target opencv_test_ml_pch_dephelp
[ 9%] Built target opencv_photo_pch_dephelp
[ 9%] Built target opencv_test_photo_pch_dephelp
[ 9%] Built target opencv_reg_pch_dephelp
[ 9%] Built target opencv_perf_photo_pch_dephelp
[ 9%] Built target opencv_perf_reg_pch_dephelp
[ 9%] Built target opencv_test_reg_pch_dephelp
[ 9%] Built target opencv_surface_matching_pch_dephelp
[ 9%] Built target opencv_video_pch_dephelp
[ 9%] Built target opencv_test_video_pch_dephelp
[ 9%] Built target opencv_perf_video_pch_dephelp
[ 9%] Built target opencv_dnn_pch_dephelp
[ 9%] Built target opencv_test_dnn_pch_dephelp
[ 10%] Built target libprotobuf
[ 10%] Built target opencv_fuzzy_pch_dephelp
[ 11%] Built target opencv_test_fuzzy_pch_dephelp
[ 13%] Built target opencv_perf_imgcodecs_pch_dephelp
[ 13%] Built target opencv_test_imgcodecs_pch_dephelp
[ 14%] Built target opencv_shape_pch_dephelp
[ 14%] Built target opencv_test_shape_pch_dephelp
[ 14%] Built target opencv_test_videoio_pch_dephelp
[ 14%] Built target opencv_perf_videoio_pch_dephelp
[ 14%] Built target opencv_test_highgui_pch_dephelp
[ 14%] Built target opencv_objdetect_pch_dephelp
[ 14%] Built target opencv_test_objdetect_pch_dephelp
[ 14%] Built target opencv_plot_pch_dephelp
[ 14%] Built target opencv_perf_objdetect_pch_dephelp
[ 14%] Built target opencv_superres_pch_dephelp
[ 14%] Built target opencv_perf_superres_pch_dephelp
[ 14%] Built target opencv_test_superres_pch_dephelp
[ 14%] Built target opencv_xobjdetect_pch_dephelp
[ 15%] Built target opencv_test_xphoto_pch_dephelp
[ 15%] Built target opencv_perf_xphoto_pch_dephelp
[ 15%] Built target opencv_bgsegm_pch_dephelp
[ 15%] Built target opencv_test_bgsegm_pch_dephelp
[ 15%] Built target opencv_bioinspired_pch_dephelp
[ 15%] Built target opencv_perf_bioinspired_pch_dephelp
[ 15%] Built target opencv_test_bioinspired_pch_dephelp
[ 15%] Built target opencv_dpm_pch_dephelp
[ 15%] Built target opencv_face_pch_dephelp
[ 15%] Built target opencv_features2d_pch_dephelp
[ 15%] Built target opencv_test_features2d_pch_dephelp
[ 15%] Built target opencv_perf_features2d_pch_dephelp
[ 15%] Built target opencv_line_descriptor_pch_dephelp
[ 15%] Built target opencv_test_line_descriptor_pch_dephelp
[ 15%] Built target opencv_perf_line_descriptor_pch_dephelp
[ 15%] Built target opencv_saliency_pch_dephelp
[ 15%] Built target opencv_text_pch_dephelp
[ 15%] Built target opencv_calib3d_pch_dephelp
[ 15%] Built target opencv_test_calib3d_pch_dephelp
[ 15%] Built target opencv_perf_calib3d_pch_dephelp
[ 16%] Built target opencv_ccalib_pch_dephelp
[ 16%] Built target opencv_test_rgbd_pch_dephelp
[ 16%] Built target opencv_rgbd_pch_dephelp
[ 16%] Built target opencv_stereo_pch_dephelp
[ 16%] Built target opencv_test_stereo_pch_dephelp
[ 16%] Built target opencv_structured_light_pch_dephelp
[ 17%] Built target opencv_perf_stereo_pch_dephelp
[ 17%] Built target opencv_test_structured_light_pch_dephelp
[ 17%] Built target opencv_tracking_pch_dephelp
[ 17%] Built target opencv_perf_tracking_pch_dephelp
[ 17%] Built target opencv_test_tracking_pch_dephelp
[ 17%] Built target opencv_videostab_pch_dephelp
[ 17%] Built target opencv_perf_xfeatures2d_pch_dephelp
[ 17%] Built target opencv_xfeatures2d_pch_dephelp
[ 19%] Built target opencv_test_xfeatures2d_pch_dephelp
[ 19%] Built target opencv_perf_ximgproc_pch_dephelp
[ 19%] Built target opencv_ximgproc_pch_dephelp
[ 19%] Built target opencv_aruco_pch_dephelp
[ 19%] Built target opencv_test_ximgproc_pch_dephelp
[ 19%] Built target opencv_optflow_pch_dephelp
[ 19%] Built target opencv_test_aruco_pch_dephelp
[ 19%] Built target opencv_test_optflow_pch_dephelp
[ 19%] Built target opencv_stitching_pch_dephelp
[ 19%] Built target opencv_test_stitching_pch_dephelp
[ 19%] Built target opencv_perf_stitching_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_imgproc
Scanning dependencies of target pch_Generate_opencv_imgcodecs
[ 19%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
[ 19%] Generating precomp.hpp
[ 19%] Generating precomp.hpp
[ 19%] Built target pch_Generate_opencv_videoio
Scanning dependencies of target pch_Generate_opencv_highgui
[ 19%] Generating precomp.hpp.gch/opencv_imgproc_RELEASE.gch
[ 19%] Generating precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch
[ 19%] Generating precomp.hpp
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/base.hpp:53,
from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core.hpp:54,
from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:52,
from /home/pi/opencv-3.1.0/build/modules/core/precomp.hpp:49:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch' failed
make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1
CMakeFiles/Makefile2:2017: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 19%] Generating precomp.hpp.gch/opencv_highgui_RELEASE.gch
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/base.hpp:53,
from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core.hpp:54,
from /home/pi/opencv-3.1.0/modules/imgcodecs/include/opencv2/imgcodecs.hpp:46,
from /home/pi/opencv-3.1.0/build/modules/imgcodecs/precomp.hpp:45:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/build.make:62: recipe for target 'modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch' failed
make[2]: *** [modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch] Error 1
CMakeFiles/Makefile2:5533: recipe for target 'modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all' failed
make[1]: *** [modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all] Error 2
[ 19%] Built target pch_Generate_opencv_highgui
[ 19%] Built target pch_Generate_opencv_imgproc
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read How To Contribute.

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

System information (version)
  • OpenCV => ❔
  • Operating System / Platform => ❔
  • Compiler => ❔
Detailed description
Steps to reproduce
@alalek
Copy link
Member

alalek commented Oct 26, 2017

opencv-3.1.0

Known problem of outdated version of OpenCV and modern GCC. Try to disable precompiled headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants