Make error __atomic_fetch_add_8 on RaspberryPi4
Hello,
I've been trying to compile OpenCV 4.1.1 on my RaspberryPi 4 running Rasbian Buster with Python 3.7. I use the following command for cmake running inside a build folder under opencv (as described here: https://www.pyimagesearch.com/2018/09...):
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/home/pi/share/CameraWork/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 BUILD_EXAMPLES=OFF -D ENABLE_NOISY_WARNINGS=ON -D ENABLE_PRECOMPILED_HEADERS=OFF ..
However I keep getting the following errors when make moves on to make opencv_perf_core:
/usr/bin/ld: ../../lib/libopencv_core.so.4.1.1: undefined reference to '__atomic_fetch_add_8'
/usr/bin/ld: ../../lib/libopencv_core.so.4.1.1: undefined reference to '__atomic_fetch_sub_8'
/usr/bin/ld: ../../lib/libopencv_core.so.4.1.1: undefined reference to '__atomic_store_8'
/usr/bin/ld: ../../lib/libopencv_core.so.4.1.1: undefined reference to '__atomic_load_8'
/usr/bin/ld: ../../lib/libopencv_core.so.4.1.1: undefined reference to '__atomic_compare_exchange_8'
collect2: error: ld returned 1 exit status
make[2]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/build.make:541: bin/opencv_perf_core] Error 1
make[1]: *** [CMakeFiles/Makefile2:2597: modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Has anyone come across any similar trouble? Do you have any suggestions?
Thanks in advance.
Mine is working on Raspberry pi 4B with Buster ver 10, OpenCV 4.1.0. But not with your cmake as above.
I have the same problem, using the same tutorial. Did you find a solution?
I found some hints that -latomic could help, but no idea where to add this. Thanks
could you please tell us your steps? thanks