Building ROOT from source: libatomic error

Dear ROOT experts and enthusiasts,

It has been a while since I installed ROOT from source… I did follow the instructions, and the prerequisites recommendations. Using SL6 (Scientific Linux release 6.8 (Carbon)), kernel 2.6.32-642.13.1.el6.x86_64. Install is pretty much clean, plus all of the prerequisites. When I get to cmake configuration portion of it (last time I did that it was still ./config script… so my last memories are ancient). Anyway, I had ironed out all the usual problems with minor version inconsistencies etc., but I can’t get past this one:

[quote]CMake Error at interpreter/llvm/src/cmake/modules/CheckAtomic.cmake:52 (message):
Host compiler appears to require libatomic, but cannot find it.[/quote]

A full log is attached. Cmake version is 3.7.2.
Did anyone get past this with flying colours? Any different version of ROOT to try?.. I am trying root-6.08.02, for no better reason than hopes for less troubles with running and recycling my old code, and not having to deal with v7, etc., also SL7 does not exist for me, as I installed it and had formatted the drive 15 minutes later with a decision in my mind that I will not do that again ever in my life (much like Ubuntu at some point became unusable)…

Anywho… any help and advice are much appreciated! :slight_smile: Thanks in advance!
cmakelog.txt (9.1 KB)

ROOT 6 require a compiler that supports C++11 standard and this for gcc is > 4.8. The native compiler for SLC6 is 4.4.

Thank you for following up with me. I switched to gcc 4.8.2 20140120. No difference whatsoever, still get:

CMake Error at interpreter/llvm/src/cmake/modules/CheckAtomic.cmake:52 (message): Host compiler appears to require libatomic, but cannot find it. Call Stack (most recent call first): interpreter/llvm/src/cmake/config-ix.cmake:317 (include) interpreter/llvm/src/CMakeLists.txt:458 (include)
Can I circumvent this somehow by directly editing that file / providing path to?
By the way, it seems that libatomic-5.2.1-2.1.1.el6.x86_64 is installed, and libatomic-ops-devel-7.2alpha6-94.1.x86_64 also… but ‘locate’ command does not locate anything…? [concerned… :slight_smile:]

Please help!

$ locate libatomic /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libatomic.a /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libatomic.so /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libatomic.a /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libatomic.so /opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-libatomic-devel-4.8.2 /opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-libatomic-devel-4.8.2/ChangeLog.bz2 /usr/lib64/libatomic.so.1 /usr/lib64/libatomic.so.1.1.0 /usr/lib64/libatomic_ops.a /usr/lib64/libatomic_ops_gpl.a

I do have it… also, got new Pythin 2.7.6…

Still now,

-- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_unuran builtin_llvm cling exceptions explicitlink fftw3 fortran gviz gdml genvector krb5 mathmore memstat mysql opengl pch python roofit shadowpw shared sqlite ssl thread tmva vdt xft xml x11 CMake Error at interpreter/llvm/src/cmake/modules/CheckAtomic.cmake:52 (message): Host compiler appears to require libatomic, but cannot find it. Call Stack (most recent call first): interpreter/llvm/src/cmake/config-ix.cmake:317 (include) interpreter/llvm/src/CMakeLists.txt:458 (include)

I forgot to mention that redhat devtoolset-2 will not work. See sft.its.cern.ch/jira/browse/ROOT-6207
You need to install proper GCC or use an installed version (do you have access to AFS?)

Thank you! Just maybe you could tell me which ‘proper’ GCC version could work?
Thank you in advance!

If you have access to AFS or CVMFS there are available compiler installations, otherwise you will need to download the compiler and build it.

devtoolset-3 seems to work, though. The following produces a working root under CentOS 6 64-bit:

scl enable devtoolset-3 python27 bash
cmake3 -DPYTHON_EXECUTABLE=/opt/rh/python27/root/usr/bin/python -DCMAKE_INSTALL_PREFIX=/some/where -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-3/root/usr/bin/gcc ..