Persistent RVersion.h Issue while building ROOT from source

_ROOT Version:6-34-00-patches
_Platform: MacOS Sequoia 15.4 (XCode 16.3)
_Compiler: Apple clang version 17.0.0 (clang-1700.0.13.3)
Target: arm64-apple-darwin24.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin


I’ve encountered a recurring issue while building ROOT (v6-34-00-patches) where the compiler fails to recognize the ROOT_VERSION macro or throws case-sensitivity warnings for RVersion.h. Despite reinstalling ROOT the problem persists, leading to incomplete installations (empty root_installed directories).

Steps to Reproduce:

Step 0

git clone --branch v6-34-00-patches --depth=1 https://github.com/root-project/root.git root-6-34-00-patches

Step 1

cmake -Dgdml=ON -Dmathmore=ON -Dbuiltin_afterimage=OFF -DCMAKE_INSTALL_PREFIX=~/root/root_install ~/root/root-6-34-00-patches
cmake --build . --target install -j 12

Error Obtained

[ 98%] Building CXX object roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooFit.cxx.o
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooFit.cxx:13:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   13 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooFit.cxx:20:25: error: function-like macro 'ROOT_VERSION' is not defined
   20 | #if ROOT_VERSION_CODE < ROOT_VERSION(6, 27, 00)
      |                         ^
[ 98%] Built target G__ROOTTMVASofie
[ 98%] Built target G__TMVAGui
[ 98%] Building CXX object roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooNLLVar.cxx.o
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNLLVar.cxx:20:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   20 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNLLVar.cxx:22:25: error: function-like macro 'ROOT_VERSION' is not defined
   22 | #if ROOT_VERSION_CODE < ROOT_VERSION(6, 27, 00)
      |                         ^
[ 98%] Built target Genetic
[ 98%] Built target TMVAUtils
[100%] Built target Eve
[100%] Built target ROOTTMVASofie
[100%] Building CXX object roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooNode.cxx.o
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNode.cxx:45:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   45 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
/Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNode.cxx:47:25: error: function-like macro 'ROOT_VERSION' is not defined
   47 | #if ROOT_VERSION_CODE < ROOT_VERSION(6, 27, 00)
      |                         ^
[100%] Built target TMVAGui
[100%] Built target G__PyMVA
[100%] Built target PyMVA
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooFit.cxx:23:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooFitResult.h:19:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooAbsArg.h:22:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedListIter.h:20:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedList.h:19:
In file included from /Users/hprasad/root/root-6-34-00-patches/core/base/inc/TObject.h:19:
/Users/hprasad/root/root-6-34-00-patches/core/base/inc/TVersionCheck.h:15:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   15 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNLLVar.cxx:26:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooFitResult.h:19:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooAbsArg.h:22:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedListIter.h:20:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedList.h:19:
In file included from /Users/hprasad/root/root-6-34-00-patches/core/base/inc/TObject.h:19:
/Users/hprasad/root/root-6-34-00-patches/core/base/inc/TVersionCheck.h:15:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   15 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooFit.cxx:23:
/Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooFitResult.h:24:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   24 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNLLVar.cxx:26:
/Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooFitResult.h:24:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   24 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNode.cxx:80:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooAbsArg.h:22:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedListIter.h:20:
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooLinkedList.h:19:
In file included from /Users/hprasad/root/root-6-34-00-patches/core/base/inc/TObject.h:19:
/Users/hprasad/root/root-6-34-00-patches/core/base/inc/TVersionCheck.h:15:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   15 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
In file included from /Users/hprasad/root/root-6-34-00-patches/roofit/xroofit/src/xRooNode.cxx:82:
/Users/hprasad/root/root-6-34-00-patches/roofit/roofitcore/inc/RooFitResult.h:24:10: warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
   24 | #include "RVersion.h"
      |          ^~~~~~~~~~~~
      |          "Rversion.h"
3 warnings and 1 error generated.
make[2]: *** [roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooFit.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
3 warnings and 1 error generated.
make[2]: *** [roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooNLLVar.cxx.o] Error 1
3 warnings and 1 error generated.
make[2]: *** [roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/src/xRooNode.cxx.o] Error 1
make[1]: *** [roofit/xroofit/CMakeFiles/RooFitXRooFit.dir/all] Error 2
make: *** [all] Error 2

I am also aware of the news posted on ROOT forum titled as
[Issue with new macOS Sequoia 15.4 and XCode 16.3]

However, as you can see, I cannot also build root from the source file.

I have tried the same steps with the master branch as well but the error persists.

The CMAKE version I use is

cmake version 3.31.5

Hello @hprasad, welcome to the ROOT forum!

It seems like your compiler is getting confused by another file that is provided by the R language bindings. I’m not sure why that is the case, as judging by your cmake commandline you shouldn’t have it enabled.
Maybe @jonas has already seen this kind of error before, let me ping him.

Hi @silverweed

Thank you for your reply.

I removed R from my system, and now I can build v6-34-08 successfully.

Thank you for being so supportive.

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