Skip to content

ERROR: ROOT not correctly built after the sequoia 15.4 update #217574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
yansonhuang opened this issue Apr 1, 2025 · 10 comments · Fixed by #220606
Closed
4 tasks done

ERROR: ROOT not correctly built after the sequoia 15.4 update #217574

yansonhuang opened this issue Apr 1, 2025 · 10 comments · Fixed by #220606
Labels
15-arm64 Sequoia arm64 is specifically affected 15 Sequoia is specifically affected

Comments

@yansonhuang
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

brew config
HOMEBREW_VERSION: 4.4.27
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9b1efcd944408db0bd85f82fe4724ccae04a812f
Last commit: 31 hours ago
Branch: stable
Core tap JSON: 01 Apr 15:40 UTC
Core cask tap JSON: 01 Apr 15:40 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 17.0.0 build 1700
Git: 2.39.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.4-arm64
CLT: 16.3.0.0.1.1742442376
Xcode: 16.3
Rosetta 2: false


brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

After yesterday's MacOS upgrade. I brew upgraded all my installed packages and one of the core programming tools I needed to use failed to function properly. I have tried to uninstall and install homebrew entirely but this issue is still not resolved.

What happened (include all command output)?

After all the dependencies are installed, I tried to run root in the command line, and get this error message:
/opt/homebrew/Cellar/root/6.34.06/etc/root/cling/std_darwin.modulemap:540:12: error: header 'experimental/__memory' not found
header "experimental/__memory"
^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include
^
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: ''
input_line_2:1:2: fatal error: module file '/tmp/root-20250327-18543-ll7y48/root-6.34.06/builddir/lib/_mach_port_t.pcm' not found: module file not found
#include <cling/Interpreter/RuntimeUniverse.h>
^
input_line_2:1:2: note: imported by module 'pthread' in '/opt/homebrew/Cellar/root/6.34.06/lib/root/pthread.pcm'
input_line_2:1:2: note: imported by module 'std' in '/opt/homebrew/Cellar/root/6.34.06/lib/root/std.pcm'
input_line_2:1:2: note: imported by module 'Cling_Runtime_Extra' in '/opt/homebrew/Cellar/root/6.34.06/lib/root/Cling_Runtime_Extra.pcm'
input_line_2:1:2: note: imported by module 'Cling_Runtime' in '/opt/homebrew/Cellar/root/6.34.06/lib/root/Cling_Runtime.pcm'
<<< cling interactive line includer >>>: fatal error: module file '/opt/homebrew/Cellar/root/6.34.06/lib/root/std.pcm' is out of date and needs to be rebuilt
<<< cling interactive line includer >>>: note: imported by module 'Darwin' in '/opt/homebrew/Cellar/root/6.34.06/lib/root/Darwin.pcm'
Failed to load module Darwin
[...]
Failed to load module GenVector
Failed to load module Cling_Runtime
Failed to load module RooFitCore
Failed to load module Core
Failed to load module ROOTNTupleUtil

*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCling.so] ROOT::TMetaUtils::TNormalizedCtxtImpl::keepTypedef(cling::LookupHelper const&, char const*, bool) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCling.so] ROOT::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCling.so] ROOT::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCling.so] TCling::TCling(char const*, char const*, char const* const*, void*) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCling.so] CreateInterpreter (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCore.so] TROOT::InitInterpreter() (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCore.so] ROOT::Internal::GetROOT2() (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libCore.so] TApplication::TApplication(char const*, int*, char**, void*, int) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/lib/root/libRint.so] TRint::TRint(char const*, int*, char**, void*, int, bool, bool) (no debug info)
[/opt/homebrew/Cellar/root/6.34.06/bin/root.exe] main (no debug info)
[/usr/lib/dyld] start (no debug info)

What did you expect to happen?

I expected a normal interface from the ROOT software.

Step-by-step reproduction instructions (by running brew commands)

brew install root
root
@cho-m
Copy link
Member

cho-m commented Apr 1, 2025

ROOT is tightly coupled with Xcode/LLVM version so it is likely to break when Apple changes these. This is particularly so in new Xcode 16.3 where Apple upgraded their LLVM from 17 to 19.

This will likely not be a quick fix as the CI runners need to be upgraded first, which requires a manual maintenance window.


You could try the upstream's binaries, but I would expect a similar issue as their CI isn't on macOS 15.4 / Xcode 16.3.

Only workaround for now would be source building but this will first need a workaround for CMake 4.0.

@cho-m
Copy link
Member

cho-m commented Apr 1, 2025

Only workaround for now would be source building but this will first need a workaround for CMake 4.0.

Just tried source build and looks like upstream will need to update for newer Xcode.

Specifically need support in Cling:

/private/tmp/root-20250401-53870-z6h6gd/root-6.34.06/builddir/etc/cling/std_darwin.modulemap:540:12: error: header 'experimental/__memory' not found
    header "experimental/__memory"
           ^
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: ''

i.e. https://github.com/root-project/cling/blob/master/include/cling/std_darwin.modulemap#L538-L542

  // FIXME these should be private
  module __memory {
    header "experimental/__memory"
    export *
  }

@cho-m cho-m added the upstream issue An upstream issue report is needed label Apr 1, 2025
@DominiqueDu78
Copy link

Also tried to build and older version of root, V 6.32.02, from source, after installing cmake V3.31.6 from source.
Compilation crashes at 55%.... with cryptic error message :
[ 0%] Built target FREETYPE
[ 0%] Performing build step for 'AFTERIMAGE'
CMake Error at /Users/yvon/AliBaba/Librairies_CERN/root-6.32.02-Build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-Release.cmake:49 (message):
Command failed: 2
'/Applications/Xcode.app/Contents/Developer/usr/bin/make'
See also
/Users/yvon/AliBaba/Librairies_CERN/root-6.32.02-Build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-*.log
make[2]: *** [AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build] Error 1
make[1]: *** [CMakeFiles/AFTERIMAGE.dir/all] Error 2
make: *** [all] Error 2

Best regards

@cho-m
Copy link
Member

cho-m commented Apr 4, 2025

Upstream PR to fix build in 6.34.x is

I did backport a couple of the commits in #218169 and applied some workarounds to get source build working for me.

May need more backports to fix other issues. Ideally there will be a 6.34.07 with all the fixes soon.


You still won't be able to use a bottle until CI is updated. The modulemap is selected at compile time so it needs to be compiled with Xcode 16.3 to work on macOS 15.4

@cho-m cho-m added CI-issue Failure due to temporary CI issue 15 Sequoia is specifically affected 15-arm64 Sequoia arm64 is specifically affected labels Apr 4, 2025
@dpiparo
Copy link
Contributor

dpiparo commented Apr 5, 2025

hi from ROOT. Yes, we'll provide a 6.34.08 soon, as well as a 6.32.12. Thanks for the work you did to test our patches in advance.

@dpiparo
Copy link
Contributor

dpiparo commented Apr 8, 2025

Hi again. We just released 6.34.08 and 6.32.12, compatible with Sequoia 15.4 and XCode 16.3

@cho-m cho-m removed the upstream issue An upstream issue report is needed label Apr 8, 2025
@vepadulano
Copy link

Hi, a followup on this. I have installed ROOT 6.34.08 via homebrew (thanks for picking up the patch release so quickly!). I still see the following issue

$: root
fatal error: module map file '/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/std_darwin.modulemap' not found
<<< cling interactive line includer >>>: fatal error: module file '/private/tmp/root-20250408-18619-fisguy/root-6.34.08/builddir/lib/std.pcm' not found: module file not found

I have been debugging the situation, and I have an hypothesis that needs testing. ROOT 6.34.08 is built to work with the latest SDK (16.3) for MacOS Sequoia (15.4). Due to the tight dependency on the MacOS SDK, the modulemap created in the ROOT build works for the SDK version it was built for. Now, if I build ROOT manually on my machine, I get a std_darwin.modulemap artifact, with the modulemap built for SDK 16.3. When I install ROOT from homebrew, I see a different modulemap in the install directory, namely

$: ls /opt/homebrew/Cellar/root/6.34.08/etc/root/cling/std_darwin.MacOSX15.2.sdk.modulemap
/opt/homebrew/Cellar/root/6.34.08/etc/root/cling/std_darwin.MacOSX15.2.sdk.modulemap

This filename means that the build of ROOT produced by homebrew hit this line in CMake , which in turn suggests that the AppleClang version used to build ROOT was less than the AppleClang version available on the latest MacOS+SDK version:

$: clang --version
Apple clang version 17.0.0 (clang-1700.0.13.3)

So, my hypothesis is that the MacOS machine used in the homebrew infra to build ROOT has a different MacOS/SDK/AppleClang version than the one of many of our users. I have never built a homebrew formula myself, but I could try it if you give me pointers to instructions. My guess is if I built the homebrew formula on my machine with the latest SDK, I would get the right modulemap from the build.

In any case, I wonder if there are ways in homebrew to specify which MacOS SDK version a specific formula build is targeting, this could be used in the future if available

@Bo98
Copy link
Member

Bo98 commented Apr 8, 2025

Our CI doesn't have Xcode 16.4 (which has the macOS 15.4 SDK) and won't for a few days (target was next Monday, but I can try expedite it if I find time). We usually update Xcode a week or two after release rather than immediately, to allow regressions to be addressed by projects (e.g. in this case, for ROOT 6.34.08 to be released).

Though even then we don't make any requirements on what end users use. Some might have the macOS 15.2 SDK installed, some might have the macOS 15.4 SDK installed. So I'm guessing how we build it will break one or the other party. Though we generally lean on supporting the latest of course.

@vepadulano
Copy link

Dear @Bo98 ,

Thanks for your reply! Just to be clear about the different versions I'm talking about, here is an excerpt from my system

$: system_profiler SPDeveloperToolsDataType
Developer:

    Developer Tools:

      Version: 16.3 (16E140)
      Location: /Applications/Xcode.app
      Applications:
          Xcode: 16.3 (23785)
          Instruments: 16.3 (64570.99)
      SDKs:
          DriverKit:
              24.4:
          iOS:
              18.4: (22E235)
          iOS Simulator:
              18.4: (22E235)
          macOS:
              15.4: (24E241)
          tvOS:
              18.4: (22L251)
          tvOS Simulator:
              18.4: (22L251)
          visionOS:
              2.4: (22O233)
          visionOS Simulator:
              2.4: (22O233)
          watchOS:
              11.4: (22T246)
          watchOS Simulator:
              11.4: (22T246)

So indeed it is MacOS SDK version 15.4 and XCode version 16.3(16E140), which are both at the latest version at the time of writing. I see your point and indeed you are right, this is a scenario where unfortunately we cannot make everyone happy (for the moment at least). If the homebrew policy is to lean towards the latest SDK and XCode versions, does it mean there will be a rebuild of the ROOT 6.34.08 formula once the CI will be updated? I'm just trying to understand homebrew workflows as I'm not familiar with them.

This was referenced Apr 9, 2025
@alkaloge
Copy link

I had downgraded cmake to 3.31.0 (as suggested in the ROOT forum) and then run

>brew install --build-from-source root

I still get an error

`🍺 /opt/homebrew/Cellar/pcre/8.45: 205 files, 4.7MB
==> Installing root dependency: xxhash
==> Downloading https://ghcr.io/v2/homebrew/core/xxhash/manifests/0.8.3
Already downloaded: /Users/alkaloge/Library/Caches/Homebrew/downloads/50d7a45c8aca7a38ebe38c4b8fb63fa7404dc4c360092f1e301c275fcc585cf0--xxhash-0.8.3.bottle_manifest.json
==> Pouring xxhash--0.8.3.arm64_sequoia.bottle.tar.gz
🍺 /opt/homebrew/Cellar/xxhash/0.8.3: 28 files, 544.0KB
==> Installing root
==> cmake -S . -B builddir -DCLING_CXX_PATH=clang++ -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_ELISPDIR=/opt/homebrew/Cellar/root/6.34.08/share/emacs/site-lisp/root -DPYTHON_EXECUTABLE=/opt/homebrew/opt/[email protected]/bin/python3.13 -DXROOTD_
Last 15 lines from /Users/alkaloge/Library/Logs/Homebrew/root/01.cmake:
-- Checking for module 'davix>=0.6.4'
-- Found davix, version 0.8.10
-- Looking for TBB
-- Found TBB: /opt/homebrew (found suitable version "2022.1", minimum required is "2020")
-- Looking for BLAS for optional parts of TMVA
-- Using GSL CBLAS for optional parts of TMVA
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1712 (message):
TMVA: numpy python package or Python development package not found and
tmva-pymva component required (python executable:
/opt/homebrew/bin/python3.13)
Call Stack (most recent call first):
CMakeLists.txt:272 (include)

-- Configuring incomplete, errors occurred!

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
ERROR: ROOT not correctly built after the sequoia 15.4 update https://github.com/Homebrew/homebrew-core/issues/217574`

@chenrui333 chenrui333 mentioned this issue Apr 16, 2025
6 tasks
@cho-m cho-m removed the CI-issue Failure due to temporary CI issue label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
15-arm64 Sequoia arm64 is specifically affected 15 Sequoia is specifically affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants