ROOT error in cling::CIFactory::createCI() El Capitan with Xcode 7.3.1

Dear all,
I’m trying to install root version v6-06-04 in my mac where I have just installed the operating system El Capitan (10.11.5) and the Xcode Version 7.3.1 (7D1014), but, after the installation finishes correctly, when I lunch root I get the errors:

[code]ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
echo | LC_ALL=C clang++ -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -Wno-deprecated-declarations -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -stdlib=libc++ -DR__HAVE_CONFIG -Wno-comment -Wno-unused-parameter -Wno-conditional-uninitialized -Wno-parentheses-equality -Wno-unused-private-field -fPIC -fvisibility-inlines-hidden -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-unused-local-typedefs -O2 -DNDEBUG -xc++ -E -v - 2>&1 >/dev/null | awk ‘/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}’ | grep -E "(c|g)++"
results in
with exit code 256
input_line_1:1:10: fatal error: ‘new’ file not found
#include
^
input_line_3:38:10: fatal error: ‘string’ file not found
#include
^

| Welcome to ROOT 6.06/04 http://root.cern.ch |
| © 1995-2016, The ROOT Team |
| Built for macosx64 |
| From tag v6-06-04, 3 May 2016 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

input_line_8:1:10: fatal error: ‘iostream’ file not found
#include
^
root [0]
[/code]

I’ve tried to install root from the pre-complied version, from the source, with brew but nothing seems to solve the problem…

I think that Xcode should be installed correctly and if I digit

I get

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

The error I get seems similar to the one described in [url]Problem with root6: “include <new>” etc but I’ve no idea on how to solve it…

Thank you for your help,
Agata.

Hi,

And what about [url=https://root-forum.cern.ch/t/embedded-cling-error-with-latest-xcode/19191/1 thread[/url]?

Cheers, Bertrand.

Hi Bertrand,
yes, I’ve read it. In that case the solution was to install the full Xcode and agreeing to the new licence agreement of Xcode, but I’ve done both.
At the moment, to continue my work, I’ve installed the version v5.34.36 of ROOT and it works perfectly without any modification to the Xcode, but I suspect that in the near future I’ll need the version v6 and I’ll come again to the same problem.

Cheers,
Agata.

I have found a method to launch ROOT 6.06(maybe also with latest version) without full Xcode installed. But it needs “xcode-select --install” to install command line tools first.

Since ROOT using command “/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null” to detect a toolchain.

Create a bash file “c++” in this path(need to be created first) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

with following content

#!/bin/bash
/usr/bin/c++ $@

and then chmod +x c++ to make it executable.
And then run

sudo xcode-select -s /Library/Developer/CommandLineTools 

to fix some problems caused by this fake Xcode.app folder in /Applications