ROOT 6.02/04 compilation

Hello, I am not able to compile ROOT 6.02/04 on CentOs 6.6 64-bits. Here is the compilation I get

[quote]bin/rmkdepend -R -fcore/base/src/TRegexp.d -Y -w 1000 – -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -std=c++11 -Wno-deprecated-declarations -pthread -D__cplusplus – /home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx
g++ -g -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -std=c++11 -Wno-deprecated-declarations -pthread -o core/base/src/TRegexp.o -c /home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx
/home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx: In member function ‘const char* TRegexp::MakeWildcard(const char*)’:
/home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx:146:4: error: ‘thread_local’ was not declared in this scope
/home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx:146:17: error: expected ‘;’ before ‘char’
/home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx:147:14: error: ‘buf’ was not declared in this scope
/home/pamputt/Téléchargements/root-6.02.04/core/base/src/TRegexp.cxx:201:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [core/base/src/TRegexp.o] Erreur 1[/quote]
Do you have any idea how to fix that?

What is the version of the compiler? ROOT 6 requires g++ 4.8 or later.

That is the reason. My compiler is g++ 4.7.2. I will try with gcc 4.8.
Could you add a check in configure to verify the compiler version.

So, I upgraded my gcc version. I use for now the 4.8.2 version
and I get a new error message

[quote]make
*** Building interpreter/llvm/inst/lib/libclangSema.a…
make[1]: entrant dans le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj »
llvm[1]: Constructing LLVMBuild project information.
/usr/bin/python /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/utils/llvm-build/llvm-build \
–native-target “x86_64” \
–enable-targets "X86 " \
–enable-optional-components “” \
–write-library-table /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/tools/llvm-config/LibraryDependencies.inc \
–write-make-fragment /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/Makefile.llvmbuild \
–write-cmake-fragment /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/LLVMBuild.cmake \
–write-cmake-exports-fragment /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/cmake/modules/LLVMBuildExports.cmake
make[1]: quittant le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj »
make[1]: entrant dans le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj »
for dir in lib/Support lib/TableGen utils lib/IR lib tools/llvm-config tools cmake; do \
if ([ ! -f $dir/Makefile ] || \
command test $dir/Makefile -ot /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/$dir/Makefile ); then \
/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/autoconf/mkinstalldirs $dir; \
/bin/cp /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/$dir/Makefile $dir/Makefile; \
fi; \
(make -C $dir all ) || exit 1; \
done
make[2]: entrant dans le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support »
/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/autoconf/mkinstalldirs /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release > /dev/null
/bin/date > /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/.dir
/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/autoconf/mkinstalldirs /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/./ > /dev/null
/bin/date > /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/.//.dir
llvm[2]: Compiling APFloat.cpp for Release build
if g++ -I/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/include -I/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support -I/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/include -I/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/lib/Support -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11 -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -ffunction-sections -fdata-sections -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-maybe-uninitialized -Wno-missing-field-initializers -c -MMD -MP -MF “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.d.tmp” -MT “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.o” -MT “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.d” /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/src/lib/Support/APFloat.cpp -o /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.o ;
then /bin/mv -f “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.d.tmp” “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.d”; else /bin/rm “/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.d.tmp”; exit 1; fi
/tmp/ccdSsYdm.s: Assembler messages:
/tmp/ccdSsYdm.s:284: Error: expecting string instruction after rep' /tmp/ccdSsYdm.s:288: Error: expecting string instruction afterrep’
/tmp/ccdSsYdm.s:640: Error: expecting string instruction after rep' /tmp/ccdSsYdm.s:1420: Error: expecting string instruction afterrep’
/tmp/ccdSsYdm.s:1432: Error: expecting string instruction after rep' /tmp/ccdSsYdm.s:1436: Error: expecting string instruction afterrep’
make[2]: *** [/home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support/Release/APFloat.o] Erreur 1
make[2]: quittant le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj/lib/Support »
make[1]: *** [all] Erreur 1
make[1]: quittant le répertoire « /home/pamputt/Téléchargements/root-6.02.04/interpreter/llvm/obj »
make: *** [interpreter/llvm/inst/lib/libclangSema.a] Erreur 2[/quote]
And here is what I get with “gcc --version”

[quote]gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright © 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.[/quote]

Hi,

Your binutils is too old for your GCC - the assembler and GCC do not understand one another.

Cheers, Axel.

Indeed, updating binutils solves the issue. It works for now. Thank you.
Just think to add acheck on the gcc version to avoid my first problem :smiley: