Cling fails on macOS 27


Hello Experts,

I am an undergrad working on a decay dataset, I am stuck with this problem and this is my first time using ROOT so i don’t know where to start when it come to fixing it. ROOT starts on my Mac and it does succeed after a command like ./sortIDS 14, which sorts my data file. Furthermore it compiles my analysis program (xia4ids, a C++ sorting code for XIA Pixie list-mode data). However the compiler must be unstable as after the command Run014.root (my data file) it fails outputting this error:

*/Applications/root/etc/cling/std_darwin.modulemap:80:64: error: header '\__type_traits/can_extract_key.h' not found***
**
as well as even before asking for a prompt outputting:
*
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
Warning in cling::IncrementalParser::CheckABICompatibility(): 
Possible C++ standard library mismatch, compiled with \_LIBCPP_ABI_VERSION '1' 
Extraction of runtime standard library version was: ''***
**
and:
*
root \[0\]*

*Attaching file Run014.root as \_file0...*

*\[runStaticInitializersOnce\]: Failed to materialize symbols: { (main, { $.cling-module-6.\__inits.0, \__GLOBAL__sub_I_cling_module_6, \_cling_module_6\_, \__ZN11__cling_N506_file0E, \__ZN11__cling_N5015__cling_Un1Qu30EPv, \____orc_init_func.cling-module-6 }) }*

*IncrementalExecutor::executeFunction: symbol '\_ZN5cling7runtime6gClingE' unresolved while linking \[cling interface function\]!*

*You are probably missing the definition of cling::runtime::gCling*

*Maybe you need to load the corresponding shared library?*

*root \[1\] root-config --version*

***ROOT_prompt_1:1:15: error: expected ';' after expression***

*root-config --version*

              ***^***

              *;*

***ROOT_prompt_1:1:15: error: use of undeclared id***

Setup:

  • Mac: MacBook Pro, Apple Silicon (arm64)

  • macOS 27.0.1 (build 26A434)

  • ROOT: root_v6.40.04.macos-26.6-arm64-clang210.pkg, prebuilt arm64 macOS download,
    installed in /Applications/root

My guess is that the macOS 27 SDK moved or removed headers that ROOT’s modulemap
expects.

Is macOS 27 supported yet and is there a workaround or anything i could perhaps do?

Thank you in advance.


Hi @Stanju,
Welcome to the ROOT forum and thank you for your report.
I have a similar setup (macbook pro with macOS 27.2), but use brew to install root (brew install root). The brew version matches the one your are using 6.40.04

Could you please try installing root with brew?

Here a quick smoke test you can use afterwards to check the installation works.

cat >/tmp/smoke.C <<'EOF'
void smoke() {
  TH1D h("h", "smoke test", 10, 0, 10);
  h.Fill(3.5);
  if (h.GetEntries() != 1) gSystem->Exit(1);
  std::cout << "ROOT works; histogram entries = " << h.GetEntries() << std::endl;
}
EOF

root -l -b -q /tmp/smoke.C

Best,
Lukas

I just noticed that the ROOT package you installed says macOS 26.6, which does not match your macOS 27 version