Teddy2S6
Posts: 1
Joined: Sun Mar 11, 2018 6:05 pm

Raspberry Camera Installation

Mon Mar 12, 2018 8:10 pm

I recently bought a camera and was trying to make a home surveillance system. I was on the final step of downloading OpenCV 3 for my Raspberry Pi 3 Model B until I get this error message half way through 19%. This is what it said:

[ 19%] Generating opencv_test_xfeatures2d_pch_dephelp.cxx
[ 19%] Linking CXX static library ../../lib/libopencv_test_tracking_pch_dephelp.a
[ 19%] Built target opencv_test_tracking_pch_dephelp
Scanning dependencies of target opencv_test_xfeatures2d_pch_dephelp
[ 19%] Generating opencv_perf_ximgproc_pch_dephelp.cxx
[ 19%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/opencv_test_xfeatures2d_pch_dephelp.cxx.o
Scanning dependencies of target opencv_perf_ximgproc_pch_dephelp
[ 19%] Building CXX object modules/ximgproc/CMakeFiles/opencv_perf_ximgproc_pch_dephelp.dir/opencv_perf_ximgproc_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_perf_xfeatures2d_pch_dephelp.a
[ 19%] Built target opencv_perf_xfeatures2d_pch_dephelp
[ 19%] Generating opencv_ximgproc_pch_dephelp.cxx
Scanning dependencies of target opencv_ximgproc_pch_dephelp
[ 19%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc_pch_dephelp.dir/opencv_ximgproc_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_xfeatures2d_pch_dephelp.a
[ 19%] Built target opencv_xfeatures2d_pch_dephelp
[ 19%] Generating opencv_test_ximgproc_pch_dephelp.cxx
Scanning dependencies of target opencv_test_ximgproc_pch_dephelp
[ 19%] Building CXX object modules/ximgproc/CMakeFiles/opencv_test_ximgproc_pch_dephelp.dir/opencv_test_ximgproc_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_ximgproc_pch_dephelp.a
[ 19%] Linking CXX static library ../../lib/libopencv_test_xfeatures2d_pch_dephelp.a
[ 19%] Built target opencv_ximgproc_pch_dephelp
[ 19%] Linking CXX static library ../../lib/libopencv_perf_ximgproc_pch_dephelp.a
[ 19%] Generating opencv_aruco_pch_dephelp.cxx
[ 19%] Built target opencv_test_xfeatures2d_pch_dephelp
[ 19%] Generating opencv_test_aruco_pch_dephelp.cxx
[ 19%] Built target opencv_perf_ximgproc_pch_dephelp
[ 19%] Generating opencv_optflow_pch_dephelp.cxx
Scanning dependencies of target opencv_aruco_pch_dephelp
[ 19%] Building CXX object modules/aruco/CMakeFiles/opencv_aruco_pch_dephelp.dir/opencv_aruco_pch_dephelp.cxx.o
Scanning dependencies of target opencv_test_aruco_pch_dephelp
Scanning dependencies of target opencv_optflow_pch_dephelp
[ 19%] Building CXX object modules/aruco/CMakeFiles/opencv_test_aruco_pch_dephelp.dir/opencv_test_aruco_pch_dephelp.cxx.o
[ 19%] Building CXX object modules/optflow/CMakeFiles/opencv_optflow_pch_dephelp.dir/opencv_optflow_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_test_ximgproc_pch_dephelp.a
[ 19%] Linking CXX static library ../../lib/libopencv_aruco_pch_dephelp.a
[ 19%] Built target opencv_test_ximgproc_pch_dephelp
[ 19%] Generating opencv_test_optflow_pch_dephelp.cxx
[ 19%] Built target opencv_aruco_pch_dephelp
[ 19%] Generating opencv_stitching_pch_dephelp.cxx
Scanning dependencies of target opencv_test_optflow_pch_dephelp
[ 19%] Building CXX object modules/optflow/CMakeFiles/opencv_test_optflow_pch_dephelp.dir/opencv_test_optflow_pch_dephelp.cxx.o
Scanning dependencies of target opencv_stitching_pch_dephelp
[ 19%] Linking CXX static library ../../lib/libopencv_optflow_pch_dephelp.a
[ 19%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/opencv_stitching_pch_dephelp.cxx.o
[ 19%] Built target opencv_optflow_pch_dephelp
[ 19%] Generating opencv_test_stitching_pch_dephelp.cxx
Scanning dependencies of target opencv_test_stitching_pch_dephelp
[ 19%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching_pch_dephelp.dir/opencv_test_stitching_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_test_aruco_pch_dephelp.a
[ 19%] Built target opencv_test_aruco_pch_dephelp
[ 19%] Generating opencv_perf_stitching_pch_dephelp.cxx
Scanning dependencies of target opencv_perf_stitching_pch_dephelp
[ 19%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching_pch_dephelp.dir/opencv_perf_stitching_pch_dephelp.cxx.o
[ 19%] Linking CXX static library ../../lib/libopencv_test_optflow_pch_dephelp.a
[ 19%] Built target opencv_test_optflow_pch_dephelp
[ 19%] Built target pch_Generate_opencv_videoio
[ 19%] Linking CXX static library ../../lib/libopencv_stitching_pch_dephelp.a
[ 19%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
[ 19%] Built target opencv_stitching_pch_dephelp
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
[ 19%] Generating precomp.hpp.gch/opencv_imgproc_RELEASE.gch
[ 19%] Linking CXX static library ../../lib/libopencv_test_stitching_pch_dephelp.a
[ 19%] Built target opencv_test_stitching_pch_dephelp
[ 19%] Linking CXX static library ../../lib/libopencv_perf_stitching_pch_dephelp.a
[ 19%] Built target opencv_perf_stitching_pch_dephelp
[ 19%] Built target pch_Generate_opencv_imgproc
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Any advice or tips that may help me?
PS: My CPU was running at 100% when the download was in progress

KnarfB
Posts: 194
Joined: Wed Dec 14, 2016 10:47 am
Location: Germany

Re: Raspberry Camera Installation

Tue Mar 13, 2018 10:33 pm

The log shown OpenCV compilation (make) which comes after cmake which comes after downloading. The error sounds like you are missing a library which is needed for compilation.
Here is a decent tutorial: https://www.pyimagesearch.com/2017/09/0 ... pberry-pi/
OpenCV compilation takes along time (can be several hours) and uses the CPU cores alot. Make sure that you have a strong power supply otherwise you may experience sponaneous reboots.

Return to “Graphics, sound and multimedia”