Cling error on macOS 26.4 (Homebrew ROOT 6.38.04): missing libc++ header __type_traits/add_lvalue_reference.h and ABI warning

Dear ROOT team,

after upgrading to macOS 26.4, I am encountering an issue when starting ROOT installed via Homebrew.

Environment

  • OS: macOS 26.4 (Apple Silicon)

  • ROOT: 6.38.04 (installed via Homebrew)

  • Compiler: Apple clang 17.0.0

  • Installation path: /opt/homebrew/Cellar/root/6.38.04

Error message

Upon starting ROOT (root -l), I get:

/opt/homebrew/Cellar/root/6.38.04/etc/root/cling/std_darwin.modulemap:73:64: error: header '__type_traits/add_lvalue_reference.h' not found
    module add_lvalue_reference { header "__type_traits/add_lvalue_reference.h" }
                                                               ^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include <new>
         ^
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: ''

ROOT still starts, but the warnings suggest a mismatch between the compiled and runtime standard library.

Observations

  • The missing header appears to belong to libc++ internal headers (__type_traits/...)

  • This suggests a possible change in the libc++ layout in macOS 26.4 / updated SDK

  • The issue looks like a mismatch between ROOT expectations (as packaged by Homebrew) and the current system SDK / Command Line Tools

Important note

If I build ROOT manually from source (outside Homebrew) on the same system, the issue does not appear, and ROOT starts without errors.

This seems to indicate that the problem might be related specifically to the Homebrew build configuration rather than ROOT itself.

Is this a known incompatibility with macOS 26.4? Could this be due to how Homebrew builds ROOT against the system SDK? Would you recommend rebuilding ROOT locally as the preferred workaround for now?

Thanks in advance for your help.

Best regards,

Anna Marini

Hi Anna,

Thanks for the report and the investigations you carried out.
We confirm that ROOT 6.38.04 works smoothly with XCode 26.4 as you could verify. I can also confirm I can reproduce the problem.

What I suspect, and here I agree with you, is that it could be that Brew did not move yet to the latest version. However, they traditionally have been very efficient with this and other kind of updates, and if what we think it’s true, it should not take long to fix.

In the mean time, I’ll open an issue to brew to see whether they have suggestions: ROOT does not work if XCode 26.4 is on the system on which the formula is installed · Issue #274363 · Homebrew/homebrew-core · GitHub

Cheers,
Danilo

PS
The compilation from sources works (thanks for mentioning it), as well as installing ROOT from CondaForge Anaconda.org