Compilation problem with macOS 13.6 and clang 1403

for the first time I’m having a problem compiling Root (v6.28.6) on macOS Ventura 13.6 with XCode 14 / clang 1403., getting the following error:

57%] Building CXX object tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RCsvDS.cxx.o
In file included from /usr/local/packages/root-6.28.06/tree/dataframe/src/RCsvDS.cxx:82:
In file included from /usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RCsvDS.hxx:14:
In file included from /usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RDataFrame.hxx:21:
In file included from /usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RDF/RInterface.hxx:15:
/usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RDF/ActionHelpers.hxx:1659:26: error: no member named 'TBufferMerger' in namespace 'ROOT'
   std::unique_ptr<ROOT::TBufferMerger> fMerger; // must use a ptr because TBufferMerger is not movable
/usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RDF/ActionHelpers.hxx:1660:38: error: no member named 'TBufferMergerFile' in namespace 'ROOT'
   std::vector<std::shared_ptr<ROOT::TBufferMergerFile>> fOutputFiles;
/usr/local/packages/root-6.28.06/tree/dataframe/inc/ROOT/RDF/ActionHelpers.hxx:1788:40: error: no member named 'TBufferMerger' in namespace 'ROOT'
      fMerger = std::make_unique<ROOT::TBufferMerger>(std::unique_ptr<TFile>(out_file));
/usr/local/packages/root-6.28.06/tree/dataframe/src/RCsvDS.cxx:224:39: error: no member named 'GetFilePos' in 'ROOT::Internal::RRawFile'
   const auto second_line = fCsvFile->GetFilePos();
/usr/local/packages/root-6.28.06/tree/dataframe/src/RCsvDS.cxx:349:25: error: no member named 'GetFilePos' in 'ROOT::Internal::RRawFile'
   fDataPos = fCsvFile->GetFilePos();


_ROOT Version:_6.28.06
Platform: Darwin 22.6.0 / macOS Ventura 13.6
Compiler: clang-1403.

Hello JRR,

Thanks for posting and welcome to the forum. We do not see this behaviour in our CI: let’s debug this.
Could you start by posting your cmake command and its output?


Hello Danilo,
the cmake command is

cmake .. -DCMAKE_INSTALL_PREFIX="/usr/local/"  -Dbuiltin_glew=ON

and the output is the following:

-- The C compiler identification is AppleClang
-- The CXX compiler identification is AppleClang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/ - 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/ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /opt/local/bin/git (found version "2.42.0") 
-- Checking internet connectivity
-- Checking internet connectivity - found
-- Looking for Python
-- Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found version "3.11.5")
-- Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found version "2.7.18")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found a macOS system 13.6
-- Found an x86_64 system
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Failed
-- ROOT Platform: macosx
-- ROOT Compiler: AppleClang
-- ROOT Processor: x86_64
-- ROOT Architecture: macosx64
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags:  -std=c++14 -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++ -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- PyROOT will be built for versions 3.11.5 (Main) and 2.7.18
-- Looking for ZLib
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.3.#define ZLIB_VERSION "1.3"") 
-- 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 PCRE: /opt/local/include (found version "8.45") 
-- Looking for LZMA
-- Looking for lzma_auto_decoder in /opt/local/lib/liblzma.dylib
-- Looking for lzma_auto_decoder in /opt/local/lib/liblzma.dylib - found
-- Looking for lzma_easy_encoder in /opt/local/lib/liblzma.dylib
-- Looking for lzma_easy_encoder in /opt/local/lib/liblzma.dylib - found
-- Looking for lzma_lzma_preset in /opt/local/lib/liblzma.dylib
-- Looking for lzma_lzma_preset in /opt/local/lib/liblzma.dylib - found
-- Found LibLZMA: /opt/local/lib/liblzma.dylib (found version "5.4.4") 
-- Looking for xxHash
-- Found xxHash: /opt/local/lib/libxxhash.dylib (found version "0.8.2") 
-- Looking for ZSTD
-- Found ZSTD: /opt/local/lib/libzstd.dylib  
-- Looking for LZ4
-- Found LZ4: /opt/local/lib/liblz4.dylib (found version "1.9.4") 
-- Found GIF: /opt/local/lib/libgif.dylib (found version "4.2.3") 
-- Found TIFF: /opt/local/lib/libtiff.dylib (found version "4.5.1")  
-- Found PNG: /opt/local/lib/libpng.dylib (found version "1.6.40") 
-- Found JPEG: /opt/local/lib/libjpeg.dylib (found version "80") 
-- Looking for AfterImage
-- AfterImage not found. Switching on builtin_afterimage option
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Could NOT find GSL: Found unsuitable version "", but required is at least "1.10" (found GSL_INCLUDE_DIR-NOTFOUND)
-- GSL not found. Set variable GSL_ROOT_DIR to point to your GSL installation
--                Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'
--                For the time being switching OFF 'mathmore' option
-- Looking for OpenGL
-- Found OpenGL: /Applications/   
-- 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: /opt/local/lib/libxml2.dylib (found version "2.11.5") 
-- Found OpenSSL: /opt/local/libexec/openssl3/lib/libcrypto.dylib (found version "3.1.3")  
-- Looking for MySQL
-- MySQL not found. Switching off mysql option
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/
--    currently found includes: 
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/
-- Oracle not found. Switching off oracle 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: /opt/local/include  
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY) 
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- Found fftw3 includes at /opt/local/include
-- Found fftw3 library at /opt/local/lib/libfftw3.dylib
-- Looking for CFITSIO
-- 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 version num: 4.10.0 (setting -DROOTXRDVERS=400100000)
--              libXrdMain not found: xproofd will be a wrapper around xrootd
--              include_dirs: /usr/local/include;/usr/local/include/private
--              libraries: /usr/local/lib/libXrdUtils.dylib;/usr/local/lib/libXrdClient.dylib;/usr/local/lib/libXrdCl.dylib
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Could NOT find FTGL (missing: FTGL_INCLUDE_DIR) 
-- 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'
--   Found davix, version 0.8.4
-- Looking for TBB
-- Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR) (Required is at least version "2018")
-- TBB not found, enabling 'builtin_tbb' option
-- Performing Test CXX_HAS_mno_rtm
-- Performing Test CXX_HAS_mno_rtm - Success
-- Looking for VDT
-- Found Vdt: /usr/local/include (found suitable version "0.4", minimum required is "0.4") 
-- Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /opt/local/lib/libopenblas.dylib  
-- TMVA: Numpy or Python development package not found for python /opt/local/bin/python3.11. Switching off tmva-pymva option
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Building LLVM in 'Release' mode.
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /Applications/
-- Found libtool - /Applications/
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Applications/  
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Found ld64 - /Applications/
-- Found OCaml: /opt/local/bin/ocamlfind  
-- 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-darwin22.6.0
-- LLVM default target triple: x86_64-apple-darwin22.6.0
-- Building with -fPIC
-- Found Python3: /opt/local/bin/python3.11 (found suitable version "3.11.5", minimum required is "3.0") found components: Interpreter 
-- Linker detection: ld64
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 13.0.0
-- Host linker version: 857.1
-- Not building amdgpu-arch: hsa-runtime64 not found
-- Building Cling as part of ROOT
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/Applications/' at runtime.
-- And if not found, will invoke: '/Applications/ -isysroot;/Applications/' for them.
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- 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
-- Use SSL API VERSION 3.1 for civetweb
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG - Failed
-- Distributed RDataFrame enabled
-- Looking for RapidYAML (used by RooFit)
-- Could NOT find ryml (missing: RYML_LIBRARY RYML_INCLUDE_DIR) 
-- RapidYAML not found, only compiling RooFit with nlohmann-json parser
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Failed
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_opplusequal_stringview
-- Performing Test found_opplusequal_stringview - Success
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- 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 /usr/local/packages/root-6.28.06/build/unix/
Making /usr/local/packages/root-6.28.06/_build/ginclude/compiledata.h
-- ROOT Configuration 

System          Darwin-22.6.0
Processor       8 core Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (x86_64)
Build type      Release
Install path    /usr/local
Compiler        AppleClang
Compiler flags:
C                -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread -O3 -DNDEBUG
C++              -std=c++14 -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++ -O3 -DNDEBUG
Linker flags:
Executable       -mmacosx-version-min=13.6

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_gtest builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_tbb clad cocoa dataframe davix exceptions fftw3 gdml http imt libcxx mlp minuit2 opengl pyroot roofit rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu spectrum vdt xml xrootd
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/packages/root-6.28.06/_build

One possible issue is an older version of ROOT being partially used during this build. In v6.26/00, TBufferMerger was moved from the ROOT::Experimental namespace into the ROOT namespace.

1 Like

Indeed, the headers of the old version 6.22 still installed somewhere let to this problem. After removing the old installation, compilation and linking worked again.

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