Build Raspbain Segmentation fault

asked 2019-08-19 04:08:56 -0600

paubau gravatar image

OpenCV build fails with Segmentation fault. Does anyone has an idea why?

CMake Command

cmake -D CMAKE_BUILD_TYPE=RELEASE \
 -D CMAKE_INSTALL_PREFIX=/usr/local \
 -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
 -D ENABLE_NEON=ON \
 -D ENABLE_VFPV3=ON \
 -D BUILD_TESTS=OFF \
 -D OPENCV_ENABLE_NONFREE=ON \
 -D INSTALL_PYTHON_EXAMPLES=OFF \
 -D CMAKE_CXX_FLAGS=-latomic \
 -D OPENCV_EXTRA_EXE_LINKER_FLAGS=-latomic \
 -D BUILD_EXAMPLES=OFF ..

results successful, but then make fails:

[  9%] Built target libwebp
[ 12%] Built target libjasper
[ 12%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o
during GIMPLE pass: slp
/home/pi/opencv/3rdparty/protobuf/src/google/protobuf/arena.cc: In member function 'google::protobuf::internal::ArenaImpl::Block* google::protobuf::internal::ArenaImpl::GetBlockSlow(void*, google::protobuf::internal::ArenaImpl::Block*, size_t)':
/home/pi/opencv/3rdparty/protobuf/src/google/protobuf/arena.cc:230:19: internal compiler error: Segmentation fault
 ArenaImpl::Block* ArenaImpl::GetBlockSlow(void* me, Block* my_full_block,
               ^~~~~~~~~
0x76ac511f ???
../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.
make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build.make:63: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:366: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
edit retag flag offensive close merge delete