ROOT build fails on Mac OS X 15.4

Hi, I am having very strange problems trying to build root.
I follow the instruction for git pulling the most recent stable version, run cmake to configure, and cmake to build, in short:

$ git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git root_src
$ mkdir root_build root_install && cd root_build
$ cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src # && check cmake configuration output for warnings or errors
$ cmake --build . -- install -j14 # if you have 4 cores available for compilation

Everything goes more or less well until the last step. There, I get errors. Here’s an example of an error (there are many, but quite similar):

[  3%] Copying header /Users/aregjan/git/root_src/math/matrix/inc/TDecompBase.h to /Users/aregjan/git/root_build/include
CMake Error at /Users/aregjan/git/root_build/VDT-prefix/src/VDT-stamp/VDT-configure-Release.cmake:49 (message):
  Command failed: 1

   '/opt/homebrew/bin/cmake' '-DSSE=OFF' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread' '-DCMAKE_CXX_FLAGS= -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ ' '-DCMAKE_INSTALL_PREFIX=/Users/aregjan/git/root_build' '-GUnix Makefiles' '-S' '/Users/aregjan/git/root_build/VDT-prefix/src/VDT' '-B' '/Users/aregjan/git/root_build/VDT-prefix/src/VDT-build'
  See also
    /Users/aregjan/git/root_build/VDT-prefix/src/VDT-stamp/VDT-configure-*.log

When I look inside the log, I find the following:

CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

These errors seem to imply that I am using an antiquated version of cmake. However doing cmake --version I find that I am using 4.0.2.

What is going on?

Areg


ROOT Version: whatever the most recent stable version is, as of today
Platform: Mac OS X 15.4
Compiler: clang 15.0.0


UPDATE: Noticing that during the build cmake downloads all kinds of code, I managed to fix the problem by – you effin’ won’t believe this – turning off my wifi!! double-facepalm

Turn off your wifi, and you can successfully build the code. Essentially I skipped over

  • VDT
  • XROOTD
  • DAVIX

and perhaps other packages as well. I am not marking this as “solved,” as there are clearly some issues with those.

Areg

Thanks for your report. I see you are using cmake 4.0.2. That’s a very recent version. We recently did some changes (I ping @bellenot because he was the main author of these changes) regarding cmake 4. I have installed version 4.0.2 on my mac. I will now test with that newer version to see if some new issues showed up with it.

Does it work if you change the branch to master instead of latest-stable ?

I have update my Mac to 15.5 and cmake 4.0.2. I did:

git clone https://github.com/root-project/root.git
mkdir build
cd build
cmake ../root
make -j8

and it works fine. ROOT builds without problems.

1 Like

Hi, thank you all for your suggestions!

Based on the suggestion from @couet , I tried the following:

git clone https://github.com/root-project/root.git
mkdir build
cd build
cmake -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk -DCMAKE_INSTALL_PREFIX=../root_install  ../root
cmake --build . -- install -j14

Root builds and works beautifully.

But here’s the interesting thing. The version of root which was faulting at build (requiring the wifi disable :slight_smile: ) is this:

00:02:04~/root/build>root --version
ROOT Version: 6.32.12
Built for macosxarm64 on May 15 2025, 04:16:21
From tags/6-32-12@6-32-12

The one produced by the above approach is this:

00:02:44~/root/build>root --version
ROOT Version: 6.37.01
Built for macosxarm64 on May 16 2025, 03:54:45
From heads/master@v6-37-01-6653-gbda0b8490a

It looks like someone fixed the bug overnight – whoever it was, thank you!!

Areg

p.s. As an additional comment, in the previous iterations I had to add the following flag to cmake (Mac OS X has multiple SDK profiles, and if you do not specify it it may use one from an older version of the OS):

-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk

The developers might want to include this in installation instructions for Mac OS X users.

Yes when you clone ROOT as I suggested you get the master branch.

1 Like

The dates you see are when you called the build command, not when this branch was released.
Between 6.32.12 (latest-stable) and master, (6.37.01), months have passed by.

1 Like

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