Datatype Error when 'make' ROOT

Hi all,

I have been using ROOT on my laptop for some time. When I tried install root with cmake on my clusters. Then I got an error from datatype.h.

Here is the cmake output:

-- Found GCC. Major version 4, minor version 1
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags:  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -DR__HAVE_CONFIG -O2 -g -DNDEBUG
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.1 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing:  GIF_LIBRARY GIF_INCLUDE_DIR) 
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Looking for GSL
-- Looking for Python
-- Found Python interpreter version 3.5
-- Looking for OpenGL
-- Looking for Kerberos 5
-- Looking for LibXml2
-- Looking for OpenSSL
-- Looking for SQLite
-- Looking for FFTW3
-- Enabled support for:  asimage astiff builtin_afterimage builtin_ftgl builtin_glew builtin_lzma builtin_llvm cxx11 cling exceptions explicitlink fftw3 fortran genvector gnuinstall krb5 ldap mathmore memstat opengl pch python shadowpw shared sqlite ssl thread tmva vdt xft xml x11
-- Target triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
CMake Warning at interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake:145 (message):
  -fPIC is not supported.
Call Stack (most recent call first):
  interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake:157 (add_flag_or_print_warning)
  interpreter/llvm/src/CMakeLists.txt:348 (include)


-- Constructing LLVMBuild project information
-- Targeting X86
-- Clang version: 3.7.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xzhan135/Applications/root-6-build

Here is the make output:

[  0%] Built target LZMA
[  0%] Building CXX object interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o
In file included from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/Support/SwapByteOrder.h:19:0,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/Support/MathExtras.h:18,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/ADT/SmallVector.h:20,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/ADT/ArrayRef.h:15,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/Support/SourceMgr.h:19,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/include/llvm/TableGen/Error.h:18,
                 from /home/xzhan135/Applications/root-6.06.06/interpreter/llvm/src/lib/TableGen/Error.cpp:15:
/home/xzhan135/Applications/root-6-build/interpreter/llvm/src/include/llvm/Support/DataTypes.h:47:2: error: #error "Compiler must provide an implementation of stdint.h"
 #error "Compiler must provide an implementation of stdint.h"
  ^
make[2]: *** [interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o] Error 1
make[1]: *** [interpreter/llvm/src/lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2
make: *** [all] Error 2

I searched online for a little while but did not see something similar about ROOT.

Thanks.

Which ROOT 6 version are you trying to build?
What is your operating system version?
Post here the output of:
g++ --version
cmake --version

g++ (GCC) 4.9.2 Copyright (C) 2014 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.

cmake version 3.4.1

Which ROOT 6 version?
Which operating system version?

There is something strange in the output that you show.
I can see there:
– Found GCC. Major version 4, minor version 1
but then you show:
g++ (GCC) 4.9.2

So, try also:
gcc --version
gfortran --version

The version of ROOT I tried to install is root-v6.06.06.
Both gcc and gfortran are 4.9.2.
The OS I am using is centos-release-5-11.el5.centos

Do your gcc/g++/gfortran come from one of the:

“old” RedHat “Developer Toolset”: linux.web.cern.ch/linux/devtoolset/
“new” RedHat “Software Collections”: linux.web.cern.ch/linux/scl/

If yes, you will not be able to build ROOT 6.

Could you explain the reason? And what does major 4 and minor 1 mean? So that I can have my engineer to fix that.
Thank you so much.

Hi,

[quote]CMake Warning at interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake:145 (message):
-fPIC is not supported.

The version of ROOT I tried to install is root-v6.06.06.
Both gcc and gfortran are 4.9.2.
The OS I am using is centos-release-5-11.el5.centos
[/quote]is very odd … all gcc on linux (on x86) that I know of are supporting -fPIC …

To me, the line:
– Found GCC. Major version 4, minor version 1
means that, at this stage, it found the CentOS 5 default gcc 4.1.2 compiler.