Ask Your Question

Revision history [back]

Error while building OpenCV on Raspberry PI

I'm having some problems on the OpenCV installation, I've been following this tutorial https://docs.google.com/document/d/1bgVo24hCK0huoxm9zGC9djL6K0yy0z9GldzSy6SZUQY/pub, however when I'm compiling it I receive an error message:

pi@raspberrypi ~/opencv/build $ make
    [  0%] Built target opencv_core_pch_dephelp
    [  0%] Built target pch_Generate_opencv_core
    [  2%] Built target opencv_core
    [  2%] Built target opencv_ts_pch_dephelp
    [  2%] Built target pch_Generate_opencv_ts
    [  3%] Built target opencv_flann_pch_dephelp
    [  4%] Built target pch_Generate_opencv_flann
    [  4%] Built target opencv_flann
    [  4%] Built target opencv_imgproc_pch_dephelp
    [  4%] Built target pch_Generate_opencv_imgproc
    [  7%] Built target opencv_imgproc
    [  7%] Built target opencv_highgui_pch_dephelp
    [  7%] Built target pch_Generate_opencv_highgui
    [  9%] Built target opencv_highgui
    [  9%] Built target opencv_features2d_pch_dephelp
    [  9%] Built target pch_Generate_opencv_features2d
    [ 10%] Built target opencv_features2d
    [ 11%] Built target opencv_ts
    [ 12%] Built target opencv_perf_core_pch_dephelp
    [ 12%] Built target pch_Generate_opencv_perf_core
    [ 13%] Built target opencv_perf_core
    [ 14%] Built target opencv_test_core_pch_dephelp
    [ 15%] Built target pch_Generate_opencv_test_core
    [ 16%] Built target opencv_test_core
    [ 16%] Built target opencv_test_flann_pch_dephelp
    [ 16%] Built target pch_Generate_opencv_test_flann
    [ 17%] Built target opencv_test_flann
    [ 17%] Built target opencv_perf_imgproc_pch_dephelp
    [ 17%] Built target pch_Generate_opencv_perf_imgproc
    [ 19%] Built target opencv_perf_imgproc
    [ 19%] Built target opencv_test_imgproc_pch_dephelp
    [ 19%] Built target pch_Generate_opencv_test_imgproc
    [ 21%] Built target opencv_test_imgproc
    [ 21%] Built target opencv_perf_highgui_pch_dephelp
    [ 22%] Built target pch_Generate_opencv_perf_highgui
    [ 22%] Built target opencv_perf_highgui
    [ 22%] Built target opencv_test_highgui_pch_dephelp
    [ 22%] Built target pch_Generate_opencv_test_highgui
    [ 23%] Built target opencv_test_highgui
    [ 23%] Built target opencv_perf_features2d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_perf_features2d
    [ 23%] Built target opencv_perf_features2d
    [ 23%] Built target opencv_test_features2d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_test_features2d
    [ 23%] Built target opencv_test_features2d
    [ 23%] Built target opencv_calib3d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_calib3d
    [ 24%] Built target opencv_calib3d
    [ 24%] Built target opencv_perf_calib3d_pch_dephelp
    [ 24%] Built target pch_Generate_opencv_perf_calib3d
    [ 24%] Built target opencv_perf_calib3d
    [ 24%] Built target opencv_test_calib3d_pch_dephelp
    [ 24%] Built target pch_Generate_opencv_test_calib3d
    [ 25%] Built target opencv_test_calib3d
    [ 25%] Built target opencv_ml_pch_dephelp
    [ 25%] Built target pch_Generate_opencv_ml
    [ 26%] Built target opencv_ml
    [ 27%] Built target opencv_test_ml_pch_dephelp
    [ 27%] Built target pch_Generate_opencv_test_ml
    [ 27%] Built target opencv_test_ml
    [ 27%] Built target opencv_video_pch_dephelp
    [ 27%] Built target pch_Generate_opencv_video
    [ 28%] Built target opencv_video
    [ 28%] Built target opencv_perf_video_pch_dephelp
    [ 28%] Built target pch_Generate_opencv_perf_video
    [ 28%] Built target opencv_perf_video
    [ 28%] Built target opencv_test_video_pch_dephelp
    [ 28%] Built target pch_Generate_opencv_test_video
    [ 29%] Built target opencv_test_video
    [ 29%] Built target opencv_legacy_pch_dephelp
    [ 29%] Built target pch_Generate_opencv_legacy
    [ 36%] Built target opencv_legacy
    [ 36%] Built target opencv_test_legacy_pch_dephelp
    [ 37%] Built target pch_Generate_opencv_test_legacy
    [ 38%] Built target opencv_test_legacy
    [ 38%] Built target opencv_objdetect_pch_dephelp
    [ 39%] Built target pch_Generate_opencv_objdetect
    [ 40%] Built target opencv_objdetect
    [ 40%] Built target opencv_perf_objdetect_pch_dephelp
    [ 40%] Built target pch_Generate_opencv_perf_objdetect
    [ 40%] Built target opencv_perf_objdetect
    [ 41%] Built target opencv_test_objdetect_pch_dephelp
    [ 41%] Built target pch_Generate_opencv_test_objdetect
    [ 41%] Built target opencv_test_objdetect
    [ 42%] Built target opencv_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_photo
    [ 42%] Built target opencv_photo
    [ 42%] Built target opencv_perf_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_perf_photo
    [ 42%] Built target opencv_perf_photo
    [ 42%] Built target opencv_test_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_test_photo
    [ 42%] Built target opencv_test_photo
    [ 42%] Built target opencv_gpu_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_gpu
    [ 46%] Built target opencv_gpu
    [ 46%] Built target opencv_perf_gpu_pch_dephelp
    [ 46%] Built target pch_Generate_opencv_perf_gpu
    [ 47%] Built target opencv_perf_gpu
    [ 47%] Built target opencv_test_gpu_pch_dephelp
    [ 47%] Built target pch_Generate_opencv_test_gpu
    [ 49%] Built target opencv_test_gpu
    [ 49%] Built target opencv_ocl_pch_dephelp
    [ 49%] Built target pch_Generate_opencv_ocl
    [ 53%] Built target opencv_ocl
    [ 53%] Built target opencv_perf_ocl_pch_dephelp
    [ 53%] Built target pch_Generate_opencv_perf_ocl
    [ 55%] Built target opencv_perf_ocl
    [ 55%] Built target opencv_test_ocl_pch_dephelp
    [ 55%] Built target pch_Generate_opencv_test_ocl
    [ 57%] Built target opencv_test_ocl
    [ 57%] Built target opencv_nonfree_pch_dephelp
    [ 57%] Built target pch_Generate_opencv_nonfree
    [ 58%] Built target opencv_nonfree
    [ 59%] Built target opencv_perf_nonfree_pch_dephelp
    [ 59%] Built target pch_Generate_opencv_perf_nonfree
    [ 59%] Built target opencv_perf_nonfree
    [ 59%] Built target opencv_test_nonfree_pch_dephelp
    [ 59%] Built target pch_Generate_opencv_test_nonfree
    [ 59%] Built target opencv_test_nonfree
    [ 60%] Built target opencv_contrib_pch_dephelp
    [ 60%] Built target pch_Generate_opencv_contrib
    [ 62%] Built target opencv_contrib
    [ 62%] Built target opencv_test_contrib_pch_dephelp
    [ 62%] Built target pch_Generate_opencv_test_contrib
    [ 62%] Built target opencv_test_contrib
    [ 70%] Built target opencv_java
    [ 70%] Built target opencv_test_java_properties
    [ 78%] Built target opencv_test_java
    [ 78%] Built target opencv_python
    [ 78%] Built target opencv_stitching_pch_dephelp
    [ 78%] Built target pch_Generate_opencv_stitching
    [ 79%] Built target opencv_stitching
    [ 79%] Built target opencv_perf_stitching_pch_dephelp
    [ 79%] Built target pch_Generate_opencv_perf_stitching
    [ 79%] Built target opencv_perf_stitching
    [ 80%] Built target opencv_test_stitching_pch_dephelp
    [ 80%] Built target pch_Generate_opencv_test_stitching
    [ 80%] Built target opencv_test_stitching
    [ 80%] Built target opencv_perf_superres_pch_dephelp
    [ 81%] Built target pch_Generate_opencv_perf_superres
    [ 82%] Built target opencv_superres_pch_dephelp
    [ 82%] Built target pch_Generate_opencv_superres
    [ 82%] Built target opencv_superres
    [ 83%] Built target opencv_perf_superres
    [ 83%] Built target opencv_test_superres_pch_dephelp
    [ 84%] Built target pch_Generate_opencv_test_superres
    [ 84%] Built target opencv_test_superres
    [ 84%] Built target opencv_videostab_pch_dephelp
    [ 84%] Built target pch_Generate_opencv_videostab
    [ 85%] Built target opencv_videostab
    [ 85%] Built target opencv_haartraining_engine
    [ 85%] Built target opencv_createsamples
    [ 85%] Built target opencv_haartraining
    [ 85%] Built target opencv_performance
    [ 85%] Built target opencv_traincascade
    [ 85%] Built target example_adaptiveskindetector
    [ 85%] Built target example_bgfg_codebook
    [ 85%] Built target example_blobtrack_sample
    [ 85%] Built target example_contours
    [ 85%] Built target example_convert_cascade
    [ 85%] Built target example_delaunay
    [ 85%] Built target example_facedetect
    [ 85%] Built target example_fback_c
    [ 86%] Built target example_find_obj
    [ 86%] Built target example_find_obj_calonder
    [ 86%] Built target example_find_obj_ferns
    [ 86%] Built target example_latentsvmdetect
    [ 86%] Built target example_morphology
    [ 86%] Built target example_motempl
    [ 86%] Built target example_mser_sample
    [ 86%] Built target example_mushroom
    [ 86%] Built target example_one_way_sample
    [ 86%] Built target example_polar_transforms
    [ 86%] Built target example_pyramid_segmentation
    [ 86%] Built target example_smiledetect
    [ 86%] Built target example_tree_engine
    [ 86%] Built target example_3calibration
    [ 86%] Building CXX object samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/OpenEXRimages_HDR_Retina_toneMapping.cpp.o
    In file included from /home/pi/opencv/samples/cpp/OpenEXRimages_HDR_Retina_toneMapping.cpp:13:0:
    /home/pi/opencv/include/opencv2/opencv.hpp:46:57: fatal error: /usr/local -D/share/OpenCV/samples/c/core_c.h: No such file or directory
    compilation terminated.
    make[2]: *** [samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/OpenEXRimages_HDR_Retina_toneMapping.cpp.o] Error 1
    make[1]: *** [samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/all] Error 2
make: *** [all] Error 2

Can anyone understand why I'm getting this error?

Thanks!

click to hide/show revision 2
retagged

updated 2014-06-20 06:27:55 -0600

berak gravatar image

Error while building OpenCV on Raspberry PI

I'm having some problems on the OpenCV installation, I've been following this tutorial https://docs.google.com/document/d/1bgVo24hCK0huoxm9zGC9djL6K0yy0z9GldzSy6SZUQY/pub, however when I'm compiling it I receive an error message:

pi@raspberrypi ~/opencv/build $ make
    [  0%] Built target opencv_core_pch_dephelp
    [  0%] Built target pch_Generate_opencv_core
    [  2%] Built target opencv_core
    [  2%] Built target opencv_ts_pch_dephelp
    [  2%] Built target pch_Generate_opencv_ts
    [  3%] Built target opencv_flann_pch_dephelp
    [  4%] Built target pch_Generate_opencv_flann
    [  4%] Built target opencv_flann
    [  4%] Built target opencv_imgproc_pch_dephelp
    [  4%] Built target pch_Generate_opencv_imgproc
    [  7%] Built target opencv_imgproc
    [  7%] Built target opencv_highgui_pch_dephelp
    [  7%] Built target pch_Generate_opencv_highgui
    [  9%] Built target opencv_highgui
    [  9%] Built target opencv_features2d_pch_dephelp
    [  9%] Built target pch_Generate_opencv_features2d
    [ 10%] Built target opencv_features2d
    [ 11%] Built target opencv_ts
    [ 12%] Built target opencv_perf_core_pch_dephelp
    [ 12%] Built target pch_Generate_opencv_perf_core
    [ 13%] Built target opencv_perf_core
    [ 14%] Built target opencv_test_core_pch_dephelp
    [ 15%] Built target pch_Generate_opencv_test_core
    [ 16%] Built target opencv_test_core
    [ 16%] Built target opencv_test_flann_pch_dephelp
    [ 16%] Built target pch_Generate_opencv_test_flann
    [ 17%] Built target opencv_test_flann
    [ 17%] Built target opencv_perf_imgproc_pch_dephelp
    [ 17%] Built target pch_Generate_opencv_perf_imgproc
    [ 19%] Built target opencv_perf_imgproc
    [ 19%] Built target opencv_test_imgproc_pch_dephelp
    [ 19%] Built target pch_Generate_opencv_test_imgproc
    [ 21%] Built target opencv_test_imgproc
    [ 21%] Built target opencv_perf_highgui_pch_dephelp
    [ 22%] Built target pch_Generate_opencv_perf_highgui
    [ 22%] Built target opencv_perf_highgui
    [ 22%] Built target opencv_test_highgui_pch_dephelp
    [ 22%] Built target pch_Generate_opencv_test_highgui
    [ 23%] Built target opencv_test_highgui
    [ 23%] Built target opencv_perf_features2d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_perf_features2d
    [ 23%] Built target opencv_perf_features2d
    [ 23%] Built target opencv_test_features2d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_test_features2d
    [ 23%] Built target opencv_test_features2d
    [ 23%] Built target opencv_calib3d_pch_dephelp
    [ 23%] Built target pch_Generate_opencv_calib3d
    [ 24%] Built target opencv_calib3d
    [ 24%] Built target opencv_perf_calib3d_pch_dephelp
    [ 24%] Built target pch_Generate_opencv_perf_calib3d
    [ 24%] Built target opencv_perf_calib3d
    [ 24%] Built target opencv_test_calib3d_pch_dephelp
    [ 24%] Built target pch_Generate_opencv_test_calib3d
    [ 25%] Built target opencv_test_calib3d
    [ 25%] Built target opencv_ml_pch_dephelp
    [ 25%] Built target pch_Generate_opencv_ml
    [ 26%] Built target opencv_ml
    [ 27%] Built target opencv_test_ml_pch_dephelp
    [ 27%] Built target pch_Generate_opencv_test_ml
    [ 27%] Built target opencv_test_ml
    [ 27%] Built target opencv_video_pch_dephelp
    [ 27%] Built target pch_Generate_opencv_video
    [ 28%] Built target opencv_video
    [ 28%] Built target opencv_perf_video_pch_dephelp
    [ 28%] Built target pch_Generate_opencv_perf_video
    [ 28%] Built target opencv_perf_video
    [ 28%] Built target opencv_test_video_pch_dephelp
    [ 28%] Built target pch_Generate_opencv_test_video
    [ 29%] Built target opencv_test_video
    [ 29%] Built target opencv_legacy_pch_dephelp
    [ 29%] Built target pch_Generate_opencv_legacy
    [ 36%] Built target opencv_legacy
    [ 36%] Built target opencv_test_legacy_pch_dephelp
    [ 37%] Built target pch_Generate_opencv_test_legacy
    [ 38%] Built target opencv_test_legacy
    [ 38%] Built target opencv_objdetect_pch_dephelp
    [ 39%] Built target pch_Generate_opencv_objdetect
    [ 40%] Built target opencv_objdetect
    [ 40%] Built target opencv_perf_objdetect_pch_dephelp
    [ 40%] Built target pch_Generate_opencv_perf_objdetect
    [ 40%] Built target opencv_perf_objdetect
    [ 41%] Built target opencv_test_objdetect_pch_dephelp
    [ 41%] Built target pch_Generate_opencv_test_objdetect
    [ 41%] Built target opencv_test_objdetect
    [ 42%] Built target opencv_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_photo
    [ 42%] Built target opencv_photo
    [ 42%] Built target opencv_perf_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_perf_photo
    [ 42%] Built target opencv_perf_photo
    [ 42%] Built target opencv_test_photo_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_test_photo
    [ 42%] Built target opencv_test_photo
    [ 42%] Built target opencv_gpu_pch_dephelp
    [ 42%] Built target pch_Generate_opencv_gpu
    [ 46%] Built target opencv_gpu
    [ 46%] Built target opencv_perf_gpu_pch_dephelp
    [ 46%] Built target pch_Generate_opencv_perf_gpu
    [ 47%] Built target opencv_perf_gpu
    [ 47%] Built target opencv_test_gpu_pch_dephelp
    [ 47%] Built target pch_Generate_opencv_test_gpu
    [ 49%] Built target opencv_test_gpu
    [ 49%] Built target opencv_ocl_pch_dephelp
    [ 49%] Built target pch_Generate_opencv_ocl
    [ 53%] Built target opencv_ocl
    [ 53%] Built target opencv_perf_ocl_pch_dephelp
    [ 53%] Built target pch_Generate_opencv_perf_ocl
    [ 55%] Built target opencv_perf_ocl
    [ 55%] Built target opencv_test_ocl_pch_dephelp
    [ 55%] Built target pch_Generate_opencv_test_ocl
    [ 57%] Built target opencv_test_ocl
    [ 57%] Built target opencv_nonfree_pch_dephelp
    [ 57%] Built target pch_Generate_opencv_nonfree
    [ 58%] Built target opencv_nonfree
    [ 59%] Built target opencv_perf_nonfree_pch_dephelp
    [ 59%] Built target pch_Generate_opencv_perf_nonfree
    [ 59%] Built target opencv_perf_nonfree
    [ 59%] Built target opencv_test_nonfree_pch_dephelp
    [ 59%] Built target pch_Generate_opencv_test_nonfree
    [ 59%] Built target opencv_test_nonfree
    [ 60%] Built target opencv_contrib_pch_dephelp
    [ 60%] Built target pch_Generate_opencv_contrib
    [ 62%] Built target opencv_contrib
    [ 62%] Built target opencv_test_contrib_pch_dephelp
    [ 62%] Built target pch_Generate_opencv_test_contrib
    [ 62%] Built target opencv_test_contrib
    [ 70%] Built target opencv_java
    [ 70%] Built target opencv_test_java_properties
    [ 78%] Built target opencv_test_java
    [ 78%] Built target opencv_python
    [ 78%] Built target opencv_stitching_pch_dephelp
    [ 78%] Built target pch_Generate_opencv_stitching
    [ 79%] Built target opencv_stitching
    [ 79%] Built target opencv_perf_stitching_pch_dephelp
    [ 79%] Built target pch_Generate_opencv_perf_stitching
    [ 79%] Built target opencv_perf_stitching
    [ 80%] Built target opencv_test_stitching_pch_dephelp
    [ 80%] Built target pch_Generate_opencv_test_stitching
    [ 80%] Built target opencv_test_stitching
    [ 80%] Built target opencv_perf_superres_pch_dephelp
    [ 81%] Built target pch_Generate_opencv_perf_superres
    [ 82%] Built target opencv_superres_pch_dephelp
    [ 82%] Built target pch_Generate_opencv_superres
    [ 82%] Built target opencv_superres
    [ 83%] Built target opencv_perf_superres
    [ 83%] Built target opencv_test_superres_pch_dephelp
    [ 84%] Built target pch_Generate_opencv_test_superres
    [ 84%] Built target opencv_test_superres
    [ 84%] Built target opencv_videostab_pch_dephelp
    [ 84%] Built target pch_Generate_opencv_videostab
    [ 85%] Built target opencv_videostab
    [ 85%] Built target opencv_haartraining_engine
    [ 85%] Built target opencv_createsamples
    [ 85%] Built target opencv_haartraining
    [ 85%] Built target opencv_performance
    [ 85%] Built target opencv_traincascade
    [ 85%] Built target example_adaptiveskindetector
    [ 85%] Built target example_bgfg_codebook
    [ 85%] Built target example_blobtrack_sample
    [ 85%] Built target example_contours
    [ 85%] Built target example_convert_cascade
    [ 85%] Built target example_delaunay
    [ 85%] Built target example_facedetect
    [ 85%] Built target example_fback_c
    [ 86%] Built target example_find_obj
    [ 86%] Built target example_find_obj_calonder
    [ 86%] Built target example_find_obj_ferns
    [ 86%] Built target example_latentsvmdetect
    [ 86%] Built target example_morphology
    [ 86%] Built target example_motempl
    [ 86%] Built target example_mser_sample
    [ 86%] Built target example_mushroom
    [ 86%] Built target example_one_way_sample
    [ 86%] Built target example_polar_transforms
    [ 86%] Built target example_pyramid_segmentation
    [ 86%] Built target example_smiledetect
    [ 86%] Built target example_tree_engine
    [ 86%] Built target example_3calibration
    [ 86%] Building CXX object samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/OpenEXRimages_HDR_Retina_toneMapping.cpp.o
    In file included from /home/pi/opencv/samples/cpp/OpenEXRimages_HDR_Retina_toneMapping.cpp:13:0:
    /home/pi/opencv/include/opencv2/opencv.hpp:46:57: fatal error: /usr/local -D/share/OpenCV/samples/c/core_c.h: No such file or directory
    compilation terminated.
    make[2]: *** [samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/OpenEXRimages_HDR_Retina_toneMapping.cpp.o] Error 1
    make[1]: *** [samples/cpp/CMakeFiles/example_OpenEXRimages_HDR_Retina_toneMapping.dir/all] Error 2
make: *** [all] Error 2

Can anyone understand why I'm getting this error?

Thanks!