ROOT freezes on startup

Thanks. What does xcode-select -p say?

Background

ROOT (or rather its interpreter cling) checks at startup where to find the C++ headers. For that it invokes the compiler, piping in #include <new> and checking its -v output which mentions the include paths.

For you, for some reason, that hangs: cling never returns from parsing / waiting for the output. We need to figure out why and what happens.

Additionally, and maybe connected, ROOT (or rather cling) needs Xcode, not just the command line tools. So seeing this output above makes me wonder whether these issues are connected.

Axel.

It gave me :

/Library/Developer/CommandLineTools

Oh I see… Do you understand why it works while offline ?

Have you tried to:

use “Software Update” to install updates

Yes I used “Software Update”

Please check that in your Xcode preferences, “Locations” tab, the correct version of the command line tools is selected?

When I launched Xcode, it reinstalled command line tools…! And after, in Locations nothing was selected…

05

I selected it but root still doesnt boot

Progress. So what does echo '#include <vector>' | clang -x c++ -fsyntax-only -v - print now?

Ok here it is :slight_smile: :

Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 351.8 -v -dwarf-column-info -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0 -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/ablanche -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.13.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -x c++ -
clang -cc1 version 9.1.0 (clang-902.0.39.1) default target x86_64-apple-darwin17.5.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.

Hi, I’m coming back to ask if you have any clue of the problem now ?

Sorry for the delay. What does

which awk
which grep

say?

This seems to be your own build of ROOT, correct? If so, edit the file interpreter/cling/lib/Interpreter/CIFactory.cpp and replace

    if (Verbose)
      cling::log() << "Looking for C++ headers with:\n  " << CppInclQuery << "\n";

with

    //if (Verbose)
      cling::log() << "Looking for C++ headers with:\n  " << CppInclQuery << "\n";

Then build (just the target Cling is good enough, so make Cling or ninja Cling), start ROOT. It’s now telling you the exact line it invokes and that hangs. Run that from your terminal - does that work?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

FYI, the current master of ROOT now works with command line tools, even without full Xcode!

Enjoy!

1 Like