Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Failled at compiling OpenCV 4.0 - 99%

After spending 7+ hours compiling openCV for the dragonboard 410c, it fails at 99%. I already tried many times with much less success.

Here are the last few lines of the stack log:

[ 95%] Built target opencv_test_bgsegm
[ 96%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/parametersController.cpp.o
[ 96%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/rotationConverters.cpp.o
[ 96%] Built target opencv_test_face
[ 96%] Built target opencv_perf_optflow
[ 96%] Built target opencv_test_optflow
[ 96%] Linking CXX executable ../../bin/opencv_interactive-calibration
[ 97%] Built target opencv_perf_stitching
[ 98%] Built target opencv_test_stitching
[ 99%] Built target opencv_superres
[ 99%] Built target opencv_test_tracking
[ 99%] Built target opencv_perf_tracking
[100%] Built target opencv_stereo
[100%] Built target opencv_test_videostab
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[100%] Built target opencv_test_superres
[100%] Built target opencv_perf_superres
[100%] Built target opencv_test_stereo
[100%] Built target opencv_perf_stereo
[100%] Built target opencv_interactive-calibration
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles
/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:16197: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
(cv) linaro@linaro-alip:/media/linaro/WHITEHORSE/opencv/build$

Here is the cmake command I used:

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D `OPENCV_EXTRA_MODULES_PATH=/media/linaro/WHITEHORSE/opencv_contrib/modules -D PYTHON3_EXECUTABLE=~/.virtualenvs/cv/bin/python3 -D PYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.7m.so -D PYTHON_INCLUDE_DIR=/usr/include/python3.7m -D PYTHON_INCLUDE_DIR2=/usr/include/aarch64-linux-gnu/python3.7m ..`

Here is the tutorial I followed: https://docs.opencv.org/3.4/d7/d9f/tutorial_linux_install.html I followed everytime except the make command, which I used "make" instead of make -j7. I also allocated swap space on my device.