Building ROOT failed with atomic and mysql


I build ROOT 5.34.36 with gcc-4.7 (because of others requirements)

./configure --prefix=$INSTALL_BLD --enable-builtin-freetype --etcdir=$INSTALL_BLD/etc_root --enable-fitsio --with-cfitsio-incdir=$INSTALL_BLD/include --with-cfitsio-libdir=$INSTALL_BLD/lib --enable-fftw3 --with-fftw3-incdir=$INSTALL_BLD/include --with-fftw3-libdir=$INSTALL_BLD/lib --enable-gsl-shared --with-gsl-incdir=$INSTALL_BLD/include --with-gsl-libdir=$INSTALL_BLD/lib --enable-python

but make returned:

g++ -shared -Wl,-soname, -m64 -O2 -Wl,--no-undefined -Wl,--as-needed -o lib/ sql/mysql/src/TMySQLServer.o sql/mysql/src/TMySQLStatement.o sql/mysql/src/TMySQLResult.o sql/mysql/src/TMySQLRow.o sql/mysql/src/G__MySQL.o -Llib -lCore -lCint -ldl -Llib -lNet -lRIO -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -latomic -ldl
/usr/bin/ld : ne peut trouver -latomic
collect2: erreur: ld a retourné 1 code d'état d'exécution
/home/nicolas/UTS/INSTALL/src/root_v5.34.36/sql/mysql/ : la recette pour la cible « lib/ » a échouée
make: *** [lib/] Erreur 1

Can you help me to solve this ?


The atomic library was not included by default with the release of GCC 4.7. Please visit for more information.

Your options are basically either to upgrade to a more recent compiler, or to download a separate library from the page above and compile it to use with GCC 4.7.


Hi all,

just to add something to the very complete answer of Guilherme: I would recommend to move to ROOT 6.10/02. This would give you several new features, bug fixes and a seamless support for multithreading.
Can we help you migrating to ROOT6?


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