I am beginning my research in Particle Physics and I was downloading ROOT from the website by cloning the latest version from Git as guided by the website. The commands were:-
# You may update your local copy by issuing a `git pull` command from within `root_src/`.
$ 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 -j4 # if you have 4 cores available for compilation
$ source ../root_install/bin/thisroot.sh # or thisroot.{fish,csh}
When I was running the following command:-
cmake --build . -- install -j4
There was an error at the end of compilation :-
xRooNode.cxx:47:25: error: function-like macro 'ROOT_VERSION' is not defined
along with a repetitive warning:-
warning: non-portable path to file '"Rversion.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
I am not sure how to resolve these issue for my installation.
Thanks for the post and welcome to the ROOT Forum.
This looks like a misconfiguration on your system.
Could you please share the output of the CMake configuration output?
When I run the command :- cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
The output of the terminal is as follows:-
CMake Deprecation Warning at CMakeLists.txt:35 (cmake_policy):
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Building ROOT version 6.32.06
-- Checking internet connectivity
-- Checking internet connectivity - found
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOT FOUND
-- The default C++ standard in use by the detected compiler (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found a macOS system 15.0
-- Found an AArch64 system
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Failed
-- ROOT default compression algorithm: zlib
-- Cannot enable cudnn without enabling cuda or tmva-gpu: cudnn is disabled.
-- Looking for ZLib
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Looking for nlohmann/json.hpp
-- nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option
-- Building freetype version 2.12.1 included in ROOT itself
-- Looking for PCRE
-- Found PCRE2: /opt/homebrew/include (found version "10.44")
-- Looking for LZMA
-- Looking for lzma_auto_decoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd
-- Looking for lzma_auto_decoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd - found
-- Looking for lzma_easy_encoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd
-- Looking for lzma_easy_encoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd - found
-- Looking for lzma_lzma_preset in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd
-- Looking for lzma_lzma_preset in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd - found
-- Found LibLZMA: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/liblzma.tbd (found version "5.6.2")
-- Looking for xxHash
-- Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR) (Required is at least version "0.8")
-- xxHash not found. Switching on builtin_xxhash option
-- Looking for ZSTD
-- Found ZSTD: /opt/homebrew/lib/libzstd.dylib
-- Looking for LZ4
-- Found LZ4: /opt/homebrew/lib/liblz4.dylib (found version "1.10.0")
-- Found GIF: /opt/homebrew/lib/libgif.dylib (found version "5.2.2")
-- Found TIFF: /opt/homebrew/lib/libtiff.dylib (found version "4.7.0")
-- Found PNG: /opt/homebrew/lib/libpng.dylib (found version "1.6.44")
-- Found JPEG: /opt/homebrew/lib/libjpeg.dylib (found version "80")
-- Building AfterImage library included in ROOT itself
-- Looking for Python
-- Found Python3: /usr/local/bin/python3.11 (found suitable version "3.11.4", minimum required is "3.8") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Looking for OpenGL
-- Found OpenGL: /usr/X11R6/lib/libGL.dylib
-- Looking for GLEW
-- Found GLEW: /opt/homebrew/lib/cmake/glew/glew-config.cmake
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:599 (message):
Please enable builtin Glew due bug in latest CMake (use cmake option
-Dbuiltin_glew=ON).
Call Stack (most recent call first):
CMakeLists.txt:297 (include)
After this, I edit my command to cmake -Dbuiltin_glew=ON -DCMAKE_INSTALL_PREFIX=../root_install ../root_src.
After running this command, the output of the terminal is as follows:-
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Building ROOT version 6.32.06
-- Checking internet connectivity
-- Checking internet connectivity - found
-- The default C++ standard in use by the detected compiler (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.
-- Performing Test HAS_LIBCXX11
-- Performing Test HAS_LIBCXX11 - Success
-- Found a macOS system 15.0
-- Found an AArch64 system
-- ROOT default compression algorithm: zlib
-- Cannot enable cudnn without enabling cuda or tmva-gpu: cudnn is disabled.
-- Looking for ZLib
-- Building freetype version 2.12.1 included in ROOT itself
-- Looking for PCRE
-- Looking for LZMA
-- Looking for ZSTD
-- Looking for LZ4
-- Building AfterImage library included in ROOT itself
-- Looking for Python
-- Looking for OpenGL
-- Looking for gl2ps
-- Could NOT find gl2ps (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Found OpenSSL: /opt/homebrew/Cellar/openssl@3/3.3.2/lib/libcrypto.dylib (found version "3.3.2")
-- Looking for MySQL
-- Could NOT find MySQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
-- MySQL not found. Switching off mysql option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Found Sqlite: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
-- For the time being switching off 'fitsio' option
-- Looking for XROOTD
CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
By not providing "FindXRootD.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "XRootD", but
CMake did not find one.
Could not find a package configuration file provided by "XRootD" with any
of the following names:
XRootDConfig.cmake
xrootd-config.cmake
Add the installation prefix of "XRootD" to CMAKE_PREFIX_PATH or set
"XRootD_DIR" to a directory containing one of the above files. If "XRootD"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/modules/SearchInstalledSoftware.cmake:900 (find_package)
CMakeLists.txt:297 (include)
-- XROOTD not found, enabling 'builtin_xrootd' option
-- Downloading and building XROOTD version 5.5.2
-- Could NOT find FTGL (missing: FTGL_INCLUDE_DIR FTGL_LIBRARY)
-- ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation
-- For the time being switching ON 'builtin_ftgl' option
-- Checking for module 'davix>=0.6.4'
-- No package 'davix' found
-- Looking for uuid_generate_random in uuid
-- Looking for uuid_generate_random in uuid - not found
-- Found libuuid: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include
-- Davix not found, switching ON 'builtin_davix' option.
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for TBB
-- Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) (Required is at least version "2020")
-- TBB not found, enabling 'builtin_tbb' option
-- Looking for VDT
-- Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY) (Required is at least version "0.4")
-- VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
-- Switching ON 'builtin_vdt' option
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- Found BLAS: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Accelerate.framework
-- PyROOT: development package found. Building for version 3.11.4
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Building LLVM in 'Release' mode.
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
The OLD behavior for policy CMP0114 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Found Python3: /usr/local/bin/python3.11 (found suitable version "3.11.4", minimum required is "3.0") found components: Interpreter
-- Found LibEdit: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include (found version "2.11")
-- Found Terminfo: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libcurses.tbd
-- The xar file format has been deprecated: LLVM_HAVE_LIBXAR might be removed in the future.
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include
-- Native target architecture is AArch64
-- Threads disabled.
-- Doxygen disabled.
-- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Found Python module pygments
-- Found Python module pygments.lexers.c_cpp
-- Found Python module yaml
-- LLVM host triple: arm64-apple-darwin24.0.0
-- LLVM default target triple: arm64-apple-darwin24.0.0
-- Building with -fPIC
-- Linker detection: unknown
-- Targeting AArch64
-- Targeting NVPTX
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
The OLD behavior for policy CMP0114 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
interpreter/llvm-project/clang/CMakeLists.txt:6 (include)
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
interpreter/llvm-project/clang/CMakeLists.txt:6 (include)
-- Clang version: 16.0.6
-- Host linker version: 1115.7.3
-- Building Cling as part of ROOT
-- Cling version (from VERSION file): ROOT_1.1~dev
-- Cling will look for C++ headers in '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1' at runtime.
-- And if not found, will invoke: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -isysroot;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk' for them.
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test found_arc4
-- Performing Test found_arc4 - Success
-- Found arc4random_buf in stdlib.h
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Failed
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Looking for m
-- Looking for m - not found
CMake Warning at net/http/CMakeLists.txt:90 (MESSAGE):
Not able to recognize SSL version 3.3.2, disable SSL
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG - Failed
-- Distributed RDataFrame enabled
-- RapidYAML not found, only compiling RooFit with nlohmann-json parser
-- Found CHROME executable /Applications/Google Chrome.app/Contents/MacOS/Google Chrome major version 129
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Failed
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
-- Performing Test has_found_attribute_noinline
-- Performing Test has_found_attribute_noinline - Success
-- Performing Test found_hardware_interference_size
-- Performing Test found_hardware_interference_size - Failed
Running /Users/shiva/root_src/build/unix/compiledata.sh
Making /Users/shiva/root_build/ginclude/compiledata.h
-- ROOT Configuration
System: Darwin-24.0.0
ROOT Platform: macosx
ROOT Architecture: macosxarm64
Processor: 8 core Apple M1 (arm64)
Build type: Release
Install path: /Users/shiva/root_install
Compiler: AppleClang 16.0.0.16000026
C++ standard: 17
Compiler flags:
- C: -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread
- C (built type specific): -O3 -DNDEBUG
- C++: -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++
- C++ (built type specific): -O3 -DNDEBUG
Linker flags:
- Executable: -mmacosx-version-min=15.0
- Module:
- Shared:
-- Enabled support for: asimage builtin_afterimage builtin_clang builtin_cling builtin_davix builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_tbb builtin_vdt builtin_xrootd builtin_xxhash clad cocoa dataframe davix gdml http imt libcxx opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd
-- Configuring done (16.3s)
-- Generating done (4.9s)
-- Build files have been written to: /Users/shiva/root_build```
The files were built in the directory and there was no error when I ran the latter command.