opencv: Build Raspbain Segmentation fault
System information (version)
- OpenCV => Git Master
- Operating System / Platform => Raspbain Buster - 32 Bit
- Compiler => gcc 8.3.0
Detailed description
Cmake is running fine, but make fails with internal compiler error: Segmentation fault
[ 1%] Linking C static library ../lib/libquirc.a
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,
^~~~~~~~~
[ 1%] Built target quir
Steps to reproduce
cd ~
git clone https://github.com/opencv/opencv
git clone https://github.com/opencv/opencv_contrib
cd opencv
mkdir build && cd build
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 ..
make -j4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 22 (5 by maintainers)
I tried that, but it did not help. There is also enough memory left and swap is not even touched.
@paulbauriegel, You may try to cross compile the binaries with docker as a workaround: https://github.com/opencv/opencv/wiki/Intel’s-Deep-Learning-Inference-Engine-backend#raspbian-stretch (exclude Inference Engine entries if you won’t use it).
(Need some refresh with Debian Buster)