# Error with Cmake while compiling

**URL:** <https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296>\
**Category:** ROOT\
**Tags:** cmake, root\
**Created:** [April 4, 2025, 11:30am UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296 "2025-04-04T11:30:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abeda](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/abeda/32/31216_2.png) [@Abeda](https://root-forum.cern.ch/u/Abeda)\
**Post date:** [April 4, 2025, 11:30am UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/1 "2025-04-04T11:30:14Z")

</div>

Hi everyone,  
I’m trying to install ROOT from source but I’m getting this error while compiling with cmake

```auto
[1%] Built target gitinfotxt
[1%] Built target move_header_core_imt
CMake Error at /Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-Release.cmake:49 (message):
  Command failed: 1

   '/Applications/CMake.app/Contents/bin/cmake' '-DCMAKE_INSTALL_PREFIX:PATH=/Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix' '-DCMAKE_PREFIX_PATH:STRING=' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-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_OSX_SYSROOT=' '-DCMAKE_OSX_DEPLOYMENT_TARGET=' '-DENABLE_PYTHON=OFF' '-DENABLE_CEPH=OFF' '-DXRDCL_LIB_ONLY=ON' '-DWITH_OPENSSL3=TRUE' '-DCMAKE_INSTALL_RPATH:STRING=/Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/lib' '-DOPENSSL_ROOT_DIR=' '-GUnix Makefiles' '-S' '/Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD' '-B' '/Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-build'

  See also

    /Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log

gmake[2]: *** [builtins/xrootd/CMakeFiles/XROOTD.dir/build.make:92: builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:12589: builtins/xrootd/CMakeFiles/XROOTD.dir/all] Error 2
-- DAVIX build command succeeded. See also /Users/abedaaljarrah/root_build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-*.log
[1%] Performing install step for 'DAVIX'
-- DAVIX install command succeeded. See also /Users/abedaaljarrah/root_build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-install-*.log
[1%] Completed 'DAVIX'
[1%] Built target DAVIX
gmake: *** [Makefile:156: all] Error 2
abedaaljarrah@Abedas-MacBook-Pro root_build % cat /Users/abedaaljarrah/root_build/VDT-prefix/src/VDT-stamp/VDT-configure-*.log
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!
abedaaljarrah@Abedas-MacBook-Pro root_build % cat /Users/abedaaljarrah/root_build/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log
CMake Error at CMakeLists.txt:4 (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!

```

I checked the version of cmake and I have the lateset updated version

```auto
abedaaljarrah@Abedas-MacBook-Pro ~ % cmake --version                                                                                         

cmake version 4.0.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

```

this is what I did to install ROOT:  
1- git clone --branch latest-stable --depth=1 [GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically](https://github.com/root-project/root.git) root\_src  
2- mkdir root\_build root\_install  
cd root\_build  
3- cmake -DCMAKE\_INSTALL\_PREFIX=…/root\_install -Dbuiltin\_glew=ON -DCMAKE\_POLICY\_VERSION\_MINIMUM=3.5 …/root\_src  
4- cmake --build . – install -j$(sysctl -n hw.ncpu)

\_ROOT Version: last release  
\_Platform: macOS Sequoia 15.3  
_Compiler:_ Not Provided

* * *

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [April 4, 2025, 11:44am UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/2 "2025-04-04T11:44:54Z")

</div>

Can you retry with master branch instead of latest-stable?

---

<div class="post-metadata">

**Author:** ![Abeda](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/abeda/32/31216_2.png) [@Abeda](https://root-forum.cern.ch/u/Abeda)\
**Post date:** [April 4, 2025, 12:32pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/4 "2025-04-04T12:32:06Z")

</div>

still the same issue

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [April 4, 2025, 12:44pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/5 "2025-04-04T12:44:09Z")

</div>

If you configure with -Dxrootd=OFF, do you see more failures?

---

<div class="post-metadata">

**Author:** ![Abeda](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/abeda/32/31216_2.png) [@Abeda](https://root-forum.cern.ch/u/Abeda)\
**Post date:** [April 4, 2025, 12:48pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/6 "2025-04-04T12:48:15Z")

</div>

@ferhue yes

---

<div class="post-metadata">

**Author:** ![devajith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/devajith/32/37165_2.png) [@devajith](https://root-forum.cern.ch/u/devajith)\
**Post date:** [April 5, 2025, 12:20am UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/7 "2025-04-05T00:20:53Z")

</div>

This is possibly due to CMake 4.0 deprecating some features. You might be able to get it building by trying to use the previous version of CMake

---

<div class="post-metadata">

**Author:** ![Abeda](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/abeda/32/31216_2.png) [@Abeda](https://root-forum.cern.ch/u/Abeda)\
**Post date:** [April 6, 2025, 2:11pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/8 "2025-04-06T14:11:12Z")

</div>

I installed it with MacPorts, and it worked fine

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 20, 2025, 2:12pm UTC](https://root-forum.cern.ch/t/error-with-cmake-while-compiling/63296/9 "2025-04-20T14:12:05Z")

</div>

Closed on April 20, 2025, 2:12pm UTC

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