Hi there,
I’m currently installing ROOT 6.24.02 on a Raspberry Pi 4 running Raspbian 10.10. I’ve seen this ROOT forum post addressing the problems with atomic_fetch_add_8
, however I am still having problems. Here are the steps I’ve taken with the install:
-
Install required dependencies:
sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev python libssl-dev
-
Install optional dependencies:
sudo apt-get install gfortran libpcre3-dev xlibmesa-glu-dev libglew1.5-dev libftgl-dev libmariadb-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev
-
After unpacking the source code, I execute in the build directory:
cmake -DCMAKE_INSTALL_PREFIX=…/install …/src -DCMAKE_SHARED_LINKER_FLAGS=’-latomic’
-
And then build:
cmake --build . --target install -j4
Everything goes OK until this point, where I still get errors with atomic:
[ 76%] Linking CXX executable src/rootcling_stage1
c++: error: ’-latomic’: No such file or directory
make[2]: *** [core/metacling/src/CMakeFiles/Cling.dir/build.make:195: lib/libCling.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:26860: core/metacling/src/CMakeFiles/Cling.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 76%] Built target BaseTROOT
/usr/bin/ld: …/foundation/CMakeFiles/Foundation_Stage1.dir/src/RLogger.cxx.o: in function ROOT::Experimental::RLogManager::Emit(ROOT::Experimental::RLogEntry const&)': RLogger.cxx:(.text+0x978): undefined reference to
__atomic_fetch_add_8’
/usr/bin/ld: RLogger.cxx:(.text+0x9ac): undefined reference to __atomic_fetch_add_8' /usr/bin/ld: RLogger.cxx:(.text+0x9d4): undefined reference to
__atomic_fetch_add_8’
/usr/bin/ld: RLogger.cxx:(.text+0x9f4): undefined reference to __atomic_fetch_add_8' /usr/bin/ld: RLogger.cxx:(.text+0xa14): undefined reference to
__atomic_fetch_add_8’
/usr/bin/ld: …/foundation/CMakeFiles/Foundation_Stage1.dir/src/RLogger.cxx.o:RLogger.cxx:(.text+0xa54): more undefined references to `__atomic_fetch_add_8’ follow
collect2: error: ld returned 1 exit status
make[2]: *** [core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/build.make:228: core/rootcling_stage1/src/rootcling_stage1] Error 1
make[1]: *** [CMakeFiles/Makefile2:27859: core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
I must be missing something obvious – is there something else to install? Any help would be greatly appreciated! Hopefully with the solution, this post can serve as a more verbose guide for future users.
ROOT Version: 6.24.02
Platform: Raspbian 10.10
Compiler: GNU 8.3