I am currently trying to build my first OpenCV on my Raspberry Pi Zero and I keep getting to this point in the ‘make’ and this error occurs. Please help.
This is my build:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D ENABLE_NEON=ON
-D ENABLE_VFPV3=ON
-D BUILD_TESTS=OFF
-D INSTALL_PYTHON_EXAMPLES=OFF
-D OPENCV_ENABLE_NONFREE=ON …
[ 67%] Linking CXX shared library …/…/lib/libopencv_calib3d.so
/usr/bin/ld: CMakeFiles/opencv_calib3d.dir/src/usac/ransac_solvers.cpp.o: in function cv::usac::Ransac::run(cv::Ptr<cv::usac::RansacOutput>&)::{lambda(cv::Range const&)#3}::operator()(cv::Range const&) const::{lambda(cv::usac::Score const&, cv::Mat const&, bool)#1}::operator()(cv::usac::Score const, cv::Mat const, bool) const': ransac_solvers.cpp:(.text._ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b[_ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b]+0x44): undefined reference to
__atomic_load_8’
/usr/bin/ld: ransac_solvers.cpp:(.text._ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b[_ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b]+0x74): undefined reference to __atomic_load_8' /usr/bin/ld: ransac_solvers.cpp:(.text._ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b[_ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b]+0x400): undefined reference to
__atomic_store_8’
/usr/bin/ld: ransac_solvers.cpp:(.text._ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b[_ZZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8_ENKUlRKNS0_5ScoreERKNS_3MatEbE_clESC_SF_b]+0x420): undefined reference to __atomic_load_8' /usr/bin/ld: CMakeFiles/opencv_calib3d.dir/src/usac/ransac_solvers.cpp.o: in function
cv::usac::Ransac::run(cv::Ptrcv::usac::RansacOutput&)::{lambda(cv::Range const&)#3}::operator()(cv::Range const&) const [clone .isra.0]‘:
ransac_solvers.cpp:(.text.ZZN2cv4usac6Ransac3runERNS_3PtrINS0_12RansacOutputEEEENKUlRKNS_5RangeEE1_clES8.isra.0[ZNSt17_Function_handlerIFvRKN2cv5RangeEEZNS0_4usac6Ransac3runERNS0_3PtrINS5_12RansacOutputEEEEUlS3_E1_E9_M_invokeERKSt9_Any_dataS3]+0xfac): undefined reference to `__atomic_load_8’
collect2: error: ld returned 1 exit status
make[2]: *** [modules/calib3d/CMakeFiles/opencv_calib3d.dir/build.make:788: lib/libopencv_calib3d.so.4.8.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:2450: modules/calib3d/CMakeFiles/opencv_calib3d.dir/all] Error 2
make: *** [Makefile:182: all] Error 2