Problem with root6: "include <new>" etc

Hello,
I’ve been having reoccurring troubles with root6 on my Mac. I’ve tried to install it both from source and binary without success. I have a root-60416 installed which was working previously but not anymore for some reason, and the problem is

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> ^ input_line_8:1:10: fatal error: 'iostream' file not found #include <iostream>

I’m fairly sure this is due to some C++ standard library mismatches. Because when I try to reinstall root with cmake and do “cmake …/root-6.04.16/ -Droofit:string=ON” I get early on that it finds clang 7.3.0 but further down it lists 3.7.0

-- The C compiler identification is AppleClang 7.3.0.7030029
-- The CXX compiler identification is AppleClang 7.3.0.7030029
[...]
-- Found Clang. Major version Apple LLVM version 7.3.0 (clang-703.0.29), minor version Apple LLVM version 7.3.0 (clang-703.0.29)
[...]
-- Constructing LLVMBuild project information
-- Targeting X86
-- Clang version: 3.7.0
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
[...]
WARNING: Target "clang" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it.  CMake does not define behavior for this case.
WARNING: Target "clang-format" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it.  CMake does not define behavior for this case.
[...]

When I then do “cmake --build .” it starts to build, with a lot of warning about "redundant move"s, up until 34% where I get

Linking CXX executable ../../bin/rootcling_tmp [ 34%] Built target rootcling_tmp Scanning dependencies of target G__IO [ 34%] Generating G__IO.cxx, ../../lib/libRIO.rootmap input_line_1:1:10: fatal error: 'new' file not found #include <new> ^ Warning in cling::IncrementalParser::CheckABICompatibility(): Possible C++ standard library mismatch, compiled with _LIBCPP_VERSION v3700 but extraction of runtime standard library version failed. In file included from input_line_4:1: In file included from /Users/edvinsidebo/root60416-ElCapitan/etc/cling/lib/clang/3.7.0/include/assert.h:8: In file included from /usr/include/assert.h:42: /usr/include/sys/cdefs.h:81:2: warning: "Unsupported compiler detected" [-W#warnings] #warning "Unsupported compiler detected" ^ /usr/include/sys/cdefs.h:707:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from input_line_4:2: In file included from /Users/edvinsidebo/root60416-ElCapitan/etc/cling/lib/clang/3.7.0/include/stdlib.h:8: In file included from /usr/include/stdlib.h:63: In file included from /usr/include/_types.h:27: In file included from /usr/include/sys/_types.h:33: /usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported [...] .

This looks a lot like what is described here Embedded cling error with latest xcode, but I have the latest Xcode, installed after my recent upgrade to El Capitan:

edvinsidebo@eduroam-55-254:~/root60416-ElCapitan$ xcode-select -version xcode-select version 2343. edvinsidebo@eduroam-55-254:~/root60416-ElCapitan$ xcodebuild -version Xcode 7.3 Build version 7D175

Could someone hint at a solution? This is becoming annoying as I also failed to install it via homebrew, so I’m quite stuck.

Did you also install the command line tools?

xcode-select --install

Did you also open Xcode application at least once and possibly accept the license conditions?

Hi Mato,
yes I did both these things.

I am also having this problem (exactly), and have tried the suggestions. Did the original poster find a solution?

Paul

Can you provide the full output of the cmake command run on a clean area. Thanks

Can this be related: Embedded cling error with latest xcode