ofUtils.cpp:(.text+0x9f0c): undefined reference to `__atomic_fetch_add_8'

#1

Hi, I am struggling to solve the problem.
I am installing openFrameworks 0.10.01 armv_6 on Raspberry pi 2, and trying to run an polygonExample.
However, I’ve got 2 Error like:


Linking bin/polygonExample for linuxarmv6l
g++ -o bin/polygonExample obj/linuxarmv6l/Release/src/ofApp.o obj/linuxarmv6l/Release/src/main.o /home/pi/openFrameworks/libs/openFrameworksCompiled/lib/linuxarmv6l/libopenFrameworks.a -Wl,-rpath=./libs:./bin/libs -Wl,–as-needed -Wl,–gc-sections -pthread -L/opt/vc/lib /home/pi/openFrameworks/libs/kiss/lib/linuxarmv6l/libkiss.a /home/pi/openFrameworks/libs/libxml2/lib/linuxarmv6l/libxml2.a /home/pi/openFrameworks/libs/svgtiny/lib/linuxarmv6l/libsvgtiny.a /home/pi/openFrameworks/libs/tess2/lib/linuxarmv6l/libtess2.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lrtaudio -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpcre -lrt -lX11 -ldl
/usr/bin/ld: /home/pi/openFrameworks/libs/openFrameworksCompiled/lib/linuxarmv6l/libopenFrameworks.a(ofUtils.o): in function ofSetTimeModeFixedRate(unsigned long long)': ofUtils.cpp:(.text+0x9f0c): undefined reference to__atomic_fetch_add_8’
collect2: error: ld returned 1 exit status
make[1]: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: bin/polygonExample] Error 1
make[1]: Leaving directory ‘/home/pi/openFrameworks/examples/graphics/polygonExample’
make: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2


I don’t know the solution.
Is anyone who know the problem?

Many Thanks.

#2

This is likely due to the updated Raspbian OS Buster. To solve this problem, you need to link the “atomic” library. You can solve this temporarily by updating your project linker flags. To do this, follow the instructions here:

1 Like
#3

It works well ! I really appreciate to you!!:joy: