Ask Your Question
0

Failled at compiling OpenCV 4.0 - 99%

asked 2019-02-03 17:08:41 -0600

geohd gravatar image

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/tu... I followed everytime except the make command, which I used "make" instead of make -j7. I also allocated swap space on my device.

edit retag flag offensive close merge delete

Comments

it seems to me, you ran out of disc space, could you check ?

cmake -DENABLE_PRECOMMPILED_HEADERS=OFF would make it use much less (trading in disc space for compile time)

berak gravatar imageberak ( 2019-02-04 06:21:14 -0600 )edit

@geohd . This is wrong link you're posting. The link is for merely pc only not ARM. Your board conatined quad-core meaning from one to four. So you used make -j4( or from 1 to 4) not -j7. The allocated swap must be 2048. I used both links from pyimsearch and learnopencv. What is your OS system are you using...linux, android, IoT, ubuntu, etc. I used rapsberry pi 3B/3B+, using linux.

supra56 gravatar imagesupra56 ( 2019-02-04 07:49:10 -0600 )edit
1

@berak I'm definately not running out of disk space, I am compiling on a 64GB SD Card. Heres my df after reaching 99% and crashing. (last entry in df) http://prntscr.com/mgpu99

@supra56 I tried following many different tutorials, including this one specifically for my board. https://www.96boards.org/blog/part-2-... Note that I used OpenCV 4.0.1 instead of the old version. I have 1024 swap memory, and it seems to work fine using "make" and not "make -j4". If I run make -j4, i run out of memory, so I just leave it at one thread. I don't know how to increase swap, I just followed that tutorial linked above. I also tried the link at pyimsearch, all to crash at 99% or 100% with the same file crashing. I'm using Debian Buster, the latest release for my board.

geohd gravatar imagegeohd ( 2019-02-04 19:54:58 -0600 )edit

please do not post answerd here, if you have a question or a comment, thank you

berak gravatar imageberak ( 2020-07-22 04:38:08 -0600 )edit

0 answers

Sort by ยป oldest newest most voted
-1

answered 2020-07-22 03:33:28 -0600

Did you figure it out? Got the same problem

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-02-03 17:08:41 -0600

Seen: 3,947 times

Last updated: Feb 03 '19