Segmentation fault after installing root with homebrew or macports

Hello, after installing root with homebrew or macports on my macbook, I try to activate the environment by calling ‘root’ on the terminal, which leads to a segmentation fault:

`
warning: no such sysroot directory: ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk’

C system headers (glibc/Xcode/Windows SDK) must be installed.

error: entry with relative path at the root level is not discoverable

{ ‘name’: ‘’, ‘type’: ‘directory’,

^~

Error in modulemap.overlay!

*** Break *** segmentation violation
`

ROOT Version: 6.26.06_1
Platform: macOS 12.6

Does anyone know what the issue could be?

Welcome to the ROOT forum.

After the installation you should have somewhere a script called thisroot.sh. You need to “source” it:

source where/the/script/is/thisroot.sh

Then you will be able to type root at the terminal prompt.

I was looking for this script but I cannot find it…shouldn’t it automatically be sourced when installing it with homebrew? There is no information about having to source it on the instructions website: root.cern/install/#homebrew

It is explained here.

Thanks, I have sourced it but the same error persists

Can you copy/paste here what you did and what you get ?

first I called
brew install root
after installing it I called (as suggested on the link you sent me)
. $(brew --prefix)/bin/thisroot.sh
finally when calling root on the terminal I obtain:

(base) Yannicks-MacBook-Air:~ yannickburkard$ root
warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
C system headers (glibc/Xcode/Windows SDK) must be installed.
error: entry with relative path at the root level is not discoverable
{ 'name': '', 'type': 'directory',
          ^~
Error in modulemap.overlay!

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] (anonymous namespace)::createCIImpl(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, cling::CompilerOptions const&, char const*, std::__1::unique_ptr<clang::ASTConsumer, std::__1::default_delete<clang::ASTConsumer> >, std::__1::vector<std::__1::shared_ptr<clang::ModuleFileExtension>, std::__1::allocator<std::__1::shared_ptr<clang::ModuleFileExtension> > > const&, bool, bool) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] cling::CIFactory::createCI(llvm::StringRef, cling::InvocationOptions const&, char const*, std::__1::unique_ptr<clang::ASTConsumer, std::__1::default_delete<clang::ASTConsumer> >, std::__1::vector<std::__1::shared_ptr<clang::ModuleFileExtension>, std::__1::allocator<std::__1::shared_ptr<clang::ModuleFileExtension> > > const&) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] cling::IncrementalParser::IncrementalParser(cling::Interpreter*, char const*, std::__1::vector<std::__1::shared_ptr<clang::ModuleFileExtension>, std::__1::allocator<std::__1::shared_ptr<clang::ModuleFileExtension> > > const&) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] cling::Interpreter::Interpreter(int, char const* const*, char const*, std::__1::vector<std::__1::shared_ptr<clang::ModuleFileExtension>, std::__1::allocator<std::__1::shared_ptr<clang::ModuleFileExtension> > > const&, bool, cling::Interpreter const*) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] TCling::TCling(char const*, char const*, char const* const*) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCling.so] CreateInterpreter (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCore.so] TROOT::InitInterpreter() (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCore.so] ROOT::Internal::GetROOT2() (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libCore.so] TApplication::TApplication(char const*, int*, char**, void*, int) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/lib/root/libRint.so] TRint::TRint(char const*, int*, char**, void*, int, bool, bool) (no debug info)
[/usr/local/Cellar/root/6.26.06_1/bin/root.exe] main (no debug info)
[/usr/lib/dyld] start (no debug info)
```

does the following command give you a message ?

. $(brew --prefix)/bin/thisroot.sh

What do you get when you type:

which root

?

it does not give me any message (seems to be working); after typing ‘which root’ I obtain:
/usr/local/Cellar/root/6.26.06_1/bin/root

have you installed Xcode ?

xcode-select --install

yes, the command line tools as well as the app itself

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