Building ROOT on Raspberry Pi 4

Hello there,

I’ve been trying to install ROOT 6.22.0 on a Raspberry Pi but always get an issue with the latomic library. I’ve seen this issue being addressed in

but the solution didn’t work for me (namely cmake -DCMAKE_SHARED_LINKER_FLAGS=’-latomic’ -DCMAKE_INSTALL_PREFIX=~/Software/ROOT/build ../root_src/). And other guides I have found only seem to function for ROOT 5 (such as https://www.mattialopresti.com/how-to-install-cerns-root-on-a-raspberry-pi/)

I keep getting this error:

[ 74%] Linking CXX shared library ../../../lib/libCling.so
[ 74%] Built target rootcling_stage1
c++: error: ’-latomic’: No such file or directory
make[2]: *** [core/metacling/src/CMakeFiles/Cling.dir/build.make:191: lib/libCling.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:19128: core/metacling/src/CMakeFiles/Cling.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 74%] Built target G__Core
make: *** [Makefile:152: all] Error 2

The latomic libary is however installed apt install libatomic-ops-dev returns libatomic-ops-dev is already the newest version (7.6.6-2).

Does anyone have an idea for a solution ?

_ROOT Version: 6.22.0
_Platform: Raspberry Pi 4 Raspbian 10
_Compiler: cmake

I might be wrong, but it looks like the quotes are not the right ones:

-DCMAKE_SHARED_LINKER_FLAGS=’-latomic’

should be

-DCMAKE_SHARED_LINKER_FLAGS='-latomic'

Right you are, I just copy pasted the solution without checking the quotes. Thanks a lot !

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.