Air-di-Mattia:~ mattia$ root
input_line_1:1:10: fatal error: file
'/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/new'
modified since it was first processed
#include <new>
^
input_line_3:38:10: fatal error: file
'/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string'
modified since it was first processed
#include <string>
^
------------------------------------------------------------
| Welcome to ROOT 6.06/00 [root.cern.ch](http://root.cern.ch) |
| (c) 1995-2014, The ROOT Team |
| Built for macosx64 |
| From tag v6-06-00, 9 December 2015 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
input_line_8:1:10: fatal error: file
'/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream'
modified since it was first processed
#include <iostream>
^
root [0]
I installed ROOT on last December and I’ve never had such a problem, how can I solve it?
Let’s take ROOT 6.06.06: root.cern.ch/content/release-60606
Now, a possibility is to go for a pre-built binary, either as tarball or as dmg. The dmg can be installed as every other osx package while the tarball just uncompressed.
For what concerns the build from sources, this is the recipe, always 6.06/06, always looking at this page root.cern.ch/content/release-60606
mkdir myROOT; cd myROOT
git clone http://root.cern.ch/git/root.git
cd root
git checkout -b v6-06-06 v6-06-06
cd ..
mkdir build
cd build
echo This takes some seconds. This is the configure step
cmake ../root
echo This takes some minutes. This is the build step. Feel free to increase the number of cores used according to the machine your are building on.
make -j 4
I’ve attempted to install ROOT v6.06.06 on a fresh install of CentOS 7 with gcc v4.8 by using the binary distributions. I’ve installed the binaries to /opt/root/root_v6.06.06 and use the following line to setup the environment.
Upon starting root I get the following messages
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^
input_line_3:38:10: fatal error: 'string' file not found
#include <string>
^
-------------------------------------------------------------------------
| Welcome to ROOT 6.06/06 http://root.cern.ch |
| (c) 1995-2016, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/v6-06-00-patches@v6-06-04-66-gb9c1d82, Jul 06 2016, 18:28:55 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
-------------------------------------------------------------------------
input_line_7:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
I’ve also seen these same messages when using the package root-6.06.06-2.el7.x86_64 from the epel repository.
Does anyone have any ideas or suggestions on how to resolve these messages? I’ve attempted to build ROOT from the source distribution, but have run into a separate issue there.
I had thought I had installed them all. I must have missed one. Any idea which is causing this?
I’ve run into the same issue trying to build from the source code. Both autoconfigure and cmake do not identify any missing dependencies, but the compilation has the following error.
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^
I’ve confirmed that I have all the required dependencies as listed on https://root.cern.ch/build-prerequisites for a CentOS 7 system. Still the error persists. Any further advice?
`root-config --cxx` --version
c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 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.
[url=https://root-forum.cern.ch/t/trouble-compiling-root-6/21722/2 building your ROOT, did you remember to keep the “source code” tree completely separate from your “build” tree (and also from the “install” tree)?[/url]
Yes I have kept them separate. Remember I also observe this issue when getting root from the yum package manager and by trying to the the binary distribution.
It took some time, but I used your script without changing anything. The output is attached, but the relevent piece is that the same compile error was given.
It was mentioned by mato in [url]Cannot install ROOT. Make problem? - #9 by ksmith that it may be related to gcc from “Developer Toolset” or “Software Collections”. How do I know if I have installed gcc from these locations? I have used the gcc-4.8.5-4.el7.x86_64 package from the CentOS 7 base repo.