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):
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.
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.
But here’s the interesting thing. The version of root which was faulting at build (requiring the wifi disable ) 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):
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.