I’ve been trying to build root from source through git without success, mainly because there’s a problem on home-brew formula related with the fonts. I’ve try several root6 versions and I get always the same error in the build.
Do anyone may know what might be the problem?
Thank you:
_ROOT Version: 6.32.08
_Platform: mac os x sonoma 14.5 M2
_Compiler: AppleClang 16.0.0.16000026
/Users/jorge/root_src/core/base/inc/TString.h:152:50: error: no member named 'IsSignedNumeral' in namespace 'ROOT::TypeTraits'
152 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:152:66: error: 'T' does not refer to a value
152 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:151:16: note: declared here
151 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:152:75: error: expected member name or ';' after declaration specifiers
152 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:155:50: error: no member named 'IsUnsignedNumeral' in namespace 'ROOT::TypeTraits'
155 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:155:68: error: 'T' does not refer to a value
155 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:154:16: note: declared here
154 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:155:77: error: expected member name or ';' after declaration specifiers
155 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:158:50: error: no member named 'IsFloatNumeral' in namespace 'ROOT::TypeTraits'
158 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:158:65: error: 'T' does not refer to a value
158 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:157:16: note: declared here
157 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:158:74: error: expected member name or ';' after declaration specifiers
158 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:161:50: error: no member named 'IsSignedNumeral' in namespace 'ROOT::TypeTraits'
161 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:161:66: error: 'T' does not refer to a value
161 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:160:16: note: declared here
160 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:161:75: error: expected member name or ';' after declaration specifiers
161 | friend typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:164:50: error: no member named 'IsUnsignedNumeral' in namespace 'ROOT::TypeTraits'
164 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:164:68: error: 'T' does not refer to a value
164 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:163:16: note: declared here
163 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:164:77: error: expected member name or ';' after declaration specifiers
164 | friend typename std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:167:50: error: no member named 'IsFloatNumeral' in namespace 'ROOT::TypeTraits'
167 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
/Users/jorge/root_src/core/base/inc/TString.h:167:65: error: 'T' does not refer to a value
167 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ^
/Users/jorge/root_src/core/base/inc/TString.h:166:16: note: declared here
166 | template<class T>
| ^
/Users/jorge/root_src/core/base/inc/TString.h:167:74: error: expected member name or ';' after declaration specifiers
167 | friend typename std::enable_if<ROOT::TypeTraits::IsFloatNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
[ 40%] Copying /Users/jorge/root_src/tutorials/graphics/pstable.C
/Users/jorge/root_src/core/base/inc/TString.h:331:46: error: no member named 'IsSignedNumeral' in namespace 'ROOT::TypeTraits'
331 | typename std::enable_if<ROOT::TypeTraits::IsSignedNumeral<T>::value,TString>::type
| ~~~~~~~~~~~~~~~~~~^
Sorry to read ROOT did not work out of the box on your system. This looks like some kind of misconfiguration on your side: we currently have macOS 14.5 builds, which do not show any issue.
Is the CMake configuration showing some useful hints? Is it possible for you to somehow cleanup pre-existing extrenals installations (you mentioned brew, for example).
Thanks for your reply. Indeed, that was my impression and I really thought that I had removed all traces of previous installations. Yet, I found that I had many header files in a folder in my PATH, from a previous installation from source in /usr/local/include, that was interfering with the compilation. Now that is solved. However, I’m now having the following problem:
[ 76%] Linking CXX shared library ../lib/libCore.so
ld: warning: ignoring file '/opt/local/lib/libxxhash.0.8.3.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
"_XXH64", referenced from:
_R__zipLZ4 in ZipLZ4.cxx.o
_R__unzipLZ4 in ZipLZ4.cxx.o
"_XXH64_canonicalFromHash", referenced from:
_R__zipLZ4 in ZipLZ4.cxx.o
"_XXH64_hashFromCanonical", referenced from:
_R__unzipLZ4 in ZipLZ4.cxx.o
ld: symbol(s) not found for architecture x86_64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libCore.so] Error 1
make[1]: *** [core/CMakeFiles/Core.dir/all] Error 2
make: *** [all] Error 2
I have installed xxhash through brew, yet I’m getting the same error. Do you know what might be wrong? Thanks
There seems to be a mismatch in the architecture for which libxxhash is installed. The linker seems to expect x86_64 but the binary is for ARM. In your case you are on Apple Silicon M2, so ARM should be the right one. Did you perhaps install these packages on your previous Intel macbook and restored them with a backup? Can you check your CMake configuration output to see whether any message is printed that could lead to a residual misconfiguration?
Yup, that is it, thanks… I’m trying to remove everything I had installed yet cmake still sees it as x86_64, it fails at some point.
I’ve tried -DCMAKE_OSX_ARCHITECTURES=arm64 but it fails also at some point due to arm_neon.h
Thanks for you support:
CMake Deprecation Warning at CMakeLists.txt:36 (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: /usr/local/bin/git (found version "2.48.1")
-- Building ROOT version 6.32.08
-- Checking internet connectivity
-- Checking internet connectivity - found
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- 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 14.5
-- Found an x86_64 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.2.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Looking for nlohmann/json.hpp
-- Found nlohmann/json.hpp in /opt/local/include;/opt/local/include (found version 3.11.3)
-- Building freetype version 2.12.1 included in ROOT itself
-- Looking for PCRE
-- Found PCRE2: /usr/local/include (found version "10.44")
-- Looking for LZMA
-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib
-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib - found
-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib
-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib - found
-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib
-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib - found
-- Found LibLZMA: /usr/local/lib/liblzma.dylib (found version "5.6.4")
-- Looking for xxHash
-- Found xxHash: /usr/local/lib/libxxhash.dylib (found suitable version "0.8.3", minimum required is "0.8")
-- Looking for ZSTD
-- Found ZSTD: /opt/local/lib/libzstd.dylib
-- Looking for LZ4
-- Found LZ4: /usr/local/lib/liblz4.dylib (found version "1.10.0")
-- Found GIF: /usr/local/lib/libgif.dylib (found version "5.2.2")
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.7.0")
-- Found PNG: /usr/X11R6/lib/libpng.dylib (found version "1.6.39")
-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "80")
-- Building AfterImage library included in ROOT itself
-- Looking for Python
-- Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found suitable version "3.13.1", minimum required is "3.8")
-- Looking for OpenGL
-- Found OpenGL: /usr/X11R6/lib/libGL.dylib
-- Looking for gl2ps
-- Found gl2ps: /opt/local/lib/libgl2ps.dylib
-- Looking for LibXml2
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.13.5")
-- Found OpenSSL: /usr/local/Cellar/openssl@3/3.4.0/lib/libcrypto.dylib (found version "3.4.0")
-- 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/local/bin/pkg-config (found version "0.29.2")
-- Found Sqlite: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.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
-- Found XRootD: /opt/local/lib/cmake/XRootD/XRootDConfig.cmake (found version "5.7.2")
-- Found FTGL: /usr/local/include
-- Checking for module 'davix>=0.6.4'
-- Found davix, version 0.8.8
-- Looking for TBB
-- Found TBB: /usr/local (found suitable version "2022.0", minimum required is "2020")
-- Looking for VDT
-- Found Vdt: /opt/local/include (found suitable version "0.4", minimum required is "0.4")
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- 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.2.sdk/System/Library/Frameworks/Accelerate.framework
-- TMVA: Numpy or Python development package not found for python /opt/local/bin/python3.13. Switching off tmva-pymva option
-- PyROOT: development package found. Building for version 3.13.1
-- 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: /opt/local/bin/python3.13 (found suitable version "3.13.1", minimum required is "3.0") found components: Interpreter
-- Found LibEdit: /opt/local/include (found version "2.11")
-- Found Terminfo: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.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.2.sdk/usr/include
-- Native target architecture is X86
-- 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.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-apple-darwin23.5.0
-- LLVM default target triple: x86_64-apple-darwin23.5.0
-- Building with -fPIC
-- Linker detection: unknown
-- Targeting X86
-- Targeting NVPTX
Thank you for your support. Finally I’ve managed to build it. The problem was the backup from my previous intel system. I had many libraries that have been get trough homebrew, yet and also the homebrew was getting packages for x86_64 and Cmake has been one of them. After removing everything and getting all the dependencies with the right architecture, all went smoothly. Thanks once again.