I am working on ROOT v6.06.06 on ubuntu 14.04. Everything went OK. Lately i did apt-get upgrade, and this affected the c++ compiler.
Since then, when i try to run my macros on ROOT, I have this error:
fatal error: file ‘/usr/include/c++/4.9/cmath’ modified since it was first processed
I tried then to re-compile ROOT, but it’s not working, I have this error:
[ 36%] Building CXX object interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o
…/root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp: In static member function ‘static std::string clang::driver::toolchains::Hexagon_TC::GetGnuDir(const string&, const llvm::opt::ArgList&)’:
…/root/root6/root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp:2110:42: error: ‘LLVM_PREFIX’ was not declared in this scope
std::string PrefixRelDir = std::string(LLVM_PREFIX) + “/…/gnu”;
^
make[2]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o] Error 1
make[1]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/all] Error 2
make: *** [all] Error 2
So I need either solving the c++ compiler so i can use the last compiled version of ROOT that I have, Or succeed to solve the problem while compiling ROOT.
Can you help me please? I am blocked. Thanks a lot.
[quote]So I need either solving the c++ compiler so i can use the last compiled version of ROOT that I have, Or succeed to solve the problem while compiling ROOT.[/quote]When the compiler change, the easiest solution is to restart the build from scratch (i.e. start from an empty build directory then run cmake then make).
..:/usr/include/c++$ ll
total 32
drwxr-xr-x 4 root root 4096 Nov 14 18:57 ./
drwxr-xr-x 61 root root 4096 Nov 14 18:57 ../
drwxr-xr-x 12 root root 12288 Nov 14 18:57 4.8/
lrwxrwxrwx 1 root root 3 Dec 1 2015 4.8.5 -> 4.8/
drwxr-xr-x 13 root root 12288 Nov 14 18:57 4.9/
lrwxrwxrwx 1 root root 3 Sep 5 04:02 4.9.4 -> 4.9/
Some changes are made the Nov 14 after the upgrade. the same folders where here before.
and when looking in /var/log/apt/history.log, these are the main upgrades concerning the compiler
[quote]When the compiler change, the easiest solution is to restart the build from scratch (i.e. start from an empty build directory then run cmake then make).
[/quote]
This is what I did exactly, and I still have this error while building:
[ 36%] Building CXX object interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o
.../root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp: In static member function ‘static std::string clang::driver::toolchains::Hexagon_TC::GetGnuDir(const string&, const llvm::opt::ArgList&)’:
.../root/root6/root/interpreter/llvm/src/tools/clang/lib/Driver/ToolChains.cpp:2110:42: error: ‘LLVM_PREFIX’ was not declared in this scope
std::string PrefixRelDir = std::string(LLVM_PREFIX) + "/../gnu";
^
make[2]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains.cpp.o] Error 1
make[1]: *** [interpreter/llvm/src/tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/all] Error 2
make: *** [all] Error 2
I resolved the problem adding #define LLVM_PREFIX "/usr/local" to interpreter/llvm/src/include/llvm/Config/llvm-config.h, and then I recompiled ROOT from scratch.
Everything is working fine now.