Failed to make OpenCV on Rasp Pi 3
I'm new to this so don't know what to do
RaspberrY Pi 3 Model B / Raspbian Stretch / OpenCV 3.3.0
When I am compiling OpenCV , it is stopping after some time.
Scanning dependencies of target carotene_objs
Scanning dependencies of target IlmImf
Scanning dependencies of target libwebp
Scanning dependencies of target libprotobuf
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/absdiff.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/alpha_dec.c.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Half/half.cpp.o
[ 0%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/buffer_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/accumulate.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/frame_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/add.cpp.o
[ 0%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arenastring.cc.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/add_weighted.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/idec_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/bitwise.cpp.o
[ 0%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set.cc.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/io_dec.c.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexBaseExc.cpp.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/blur.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/quant_dec.c.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/tree_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/canny.cpp.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexThrowErrnoExc.cpp.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/channel_extract.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/vp8_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/channels_combine.cpp.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/cmp.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/vp8l_dec.c.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/colorconvert.cpp.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/common.cpp.o
[ 0%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/dec/webp_dec.c.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmThread/IlmThread.cpp.o
[ 0%] Building CXX object 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/convert.cpp.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmThread/IlmThreadMutex.cpp.o
[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmThread/IlmThreadMutexPosix ...
cmake -DWITH_OPENEXR=OFF
or-DBUILD_opencv_dnn=OFF
cmake is already the newest version (3.7.2-1).
I'm running into error with this : `CMake Error: The source directory "/home/pi/opencv-3.3.0/build/WITH_OPENEXR=OFF" does not exist. This is what I commanded :
Please correct me where I'm wrong
\
missing after-D WITH_OPENEXR=OFF
(so it thinks, the cmdline is "over", and that this is the src location)
but i asked for
gcc --version
gcc - 6.3.0 and I added
\
and now its making, let's see how it turns out nowit will still choke on the dnn related error :\
So I should
-D BUILD_opencv_dnn=OFF
alsoprobably.
but keep a copy of the previous build log , so you can still try to analyze, why those "internal compiler errors" happened !
and really, try with more recent code !
Now, it fails like this:
/home/pi/opencv-3.3.0/3rdparty/libwebp/utils/huffman_utils.c: In function ‘BuildHuffmanTable’: /home/pi/opencv-3.3.0/3rdparty/libwebp/utils/huffman_utils.c:197:1: internal compiler error: Segmentation fault } ^ Please submit a full bug report, with preprocessed source if appropriate. See <file: usr="" share="" doc="" gcc-6="" readme.bugs=""> for instructions. 3rdparty/libwebp/CMakeFiles/libwebp.dir/build.make:2582: recipe for target '3rdparty/libwebp/CMakeFiles/libwebp.dir/utils/huffman_utils.c.o' failed make[2]: * [3rdparty/libwebp/CMakeFiles/libwebp.dir/utils/huffman_utils.c.o] Error 1 make[2]: * Waiting for unfinished jobs....
well, that compiled before, right ?
looks like your gcc install is broken, now (and it fails in random places).
but, just to make sure: do you have enough memory / swap / disk space ?
(sorry, i can only guess, now)