Problem building 6.22.00 on OSX 10.14 with clang 11

ROOT Version: 6.22.00
Platform: OSX 10.14.6
Compiler: clang 11.0.0


I am having a problem building 6.22.00 on my Mac. The CMake log and the part where the build fails are at the bottom. I can build 6.20 without problems. The distributed binary of 6.22 built for OSX 10.14 with clang 10 works for me with python2 but not python3. I would prefer not to move to Catalina yet if I can avoid it. Any help building with both python2 and python3 support would be appreciated.

Thanks

Vava

– BUILD FAILURE –

Scanning dependencies of target Base
[ 71%] Building CXX object core/base/CMakeFiles/Base.dir/src/Match.cxx.o
Scanning dependencies of target Unix
[ 71%] Building CXX object core/unix/CMakeFiles/Unix.dir/src/TUnixSystem.cxx.o
[ 71%] Building CXX object core/base/CMakeFiles/Base.dir/src/String.cxx.o
[ 71%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TIsAProxy.cxx.o
In file included from /Users/gligorov/root-6.22.00/core/base/src/String.cxx:19:
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:393:31: error: β€˜Tmpl’ does not refer to a value
auto cl = TClass::GetClass();
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:382:17: note: declared here
template TBuffer &operator>>(TBuffer &buf, Tmpl *&obj)
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:393:37: error: expected expression
auto cl = TClass::GetClass();
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:400:39: error: β€˜Tmpl’ does not refer to a value
auto cl = (obj) ? TClass::GetClass() : nullptr;
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:398:17: note: declared here
template TBuffer &operator<<(TBuffer &buf, const Tmpl *obj)
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:400:45: error: expected expression
auto cl = (obj) ? TClass::GetClass() : nullptr;
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:412:42: error: β€˜T’ does not refer to a value
auto cl = (objptr) ? TClass::GetClass() : nullptr;
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:409:17: note: declared here
template
^
/Users/gligorov/root-6.22.00/core/base/inc/TBuffer.h:412:45: error: expected expression
auto cl = (objptr) ? TClass::GetClass() : nullptr;
^
6 errors generated.
make[2]: *** [core/base/CMakeFiles/Base.dir/src/String.cxx.o] Error 1
make[1]: *** [core/base/CMakeFiles/Base.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 71%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfDataMembers.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfEnums.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfEnumsWithLock.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfFunctions.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfFunctionTemplates.cxx.o
[ 72%] Built target Unix
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TMethod.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TMethodArg.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TMethodCall.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TProtoClass.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TRealData.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TSchemaRule.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TSchemaRuleSet.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TStatusBitsChecker.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TStreamerElement.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TViewPubDataMembers.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TViewPubFunctions.cxx.o
[ 72%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TVirtualStreamerInfo.cxx.o
[ 72%] Built target Meta
[ 72%] Linking CXX static library …/…/…/…/lib/libclangCodeGen.a
[ 72%] Built target clangCodeGen
[ 72%] Linking CXX static library …/…/libLLVMX86CodeGen.a
[ 72%] Built target LLVMX86CodeGen
make: *** [all] Error 2

– CMAKE LOG –

– The C compiler identification is AppleClang 11.0.0.11000033
– The CXX compiler identification is AppleClang 11.0.0.11000033
– 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/bin/git (found version β€œ2.21.1 (Apple Git-122.3)”)
– Looking for Python
– Found Python3: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version β€œ3.8.5”) found components: Interpreter Development NumPy Development.Module Development.Embed
– Found Python2: /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (found version β€œ2.7.15”) found components: Interpreter Development NumPy Development.Module Development.Embed
– ROOT default compression algorithm: zlib
– PyROOT will be built for versions 3.8.5 (Main) and 2.7.15
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Found a Mac OS X System 10.14
– Found a 64bit system
– Found LLVM compiler collection
– Performing Test GLIBCXX_USE_CXX11_ABI
– Performing Test GLIBCXX_USE_CXX11_ABI - Failed
– ROOT Platform: macosx
– ROOT Architecture: macosx64
– Build Type: Release (flags = β€˜-O3 -DNDEBUG’)
– Compiler Flags: -O3 -DNDEBUG -std=c++11 -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++
– Looking for ZLib
– Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd (found version β€œ1.2.11”)
– Building freetype version 2.6.1 included in ROOT itself
– Looking for PCRE
– Found PCRE: /usr/local/include (found version β€œ8.42”)
– Looking for LZMA
– Looking for lzma_auto_decoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd
– Looking for lzma_auto_decoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd - found
– Looking for lzma_easy_encoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd
– Looking for lzma_easy_encoder in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd - found
– Looking for lzma_lzma_preset in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd
– Looking for lzma_lzma_preset in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/liblzma.tbd - found
– Could NOT find LibLZMA (missing: LIBLZMA_INCLUDE_DIR)
– LZMA not found. Switching on builtin_lzma option
– Building LZMA version 5.2.4 included in ROOT itself
– Looking for ZSTD
– Could NOT find ZSTD (missing: ZSTD_LIBRARIES ZSTD_INCLUDE_DIR ZSTD_VERSION)
– ZSTD not found. Switching on builtin_zstd option
– Performing Test CXX_FLAG_STD_CPLUSPLUS11
– Performing Test CXX_FLAG_STD_CPLUSPLUS11 - Success
– Performing Test C_FLAG_STD_C99
– Performing Test C_FLAG_STD_C99 - Success
– Performing Test C_FLAG_WALL
– Performing Test C_FLAG_WALL - Success
– Performing Test CXX_FLAG_WALL
– Performing Test CXX_FLAG_WALL - Success
– Performing Test C_FLAG_WEXTRA
– Performing Test C_FLAG_WEXTRA - Success
– Performing Test CXX_FLAG_WEXTRA
– Performing Test CXX_FLAG_WEXTRA - Success
– Performing Test C_FLAG_WUNDEF
– Performing Test C_FLAG_WUNDEF - Success
– Performing Test CXX_FLAG_WUNDEF
– Performing Test CXX_FLAG_WUNDEF - Success
– Performing Test C_FLAG_WSHADOW
– Performing Test C_FLAG_WSHADOW - Success
– Performing Test CXX_FLAG_WSHADOW
– Performing Test CXX_FLAG_WSHADOW - Success
– Performing Test C_FLAG_WCAST_ALIGN
– Performing Test C_FLAG_WCAST_ALIGN - Success
– Performing Test CXX_FLAG_WCAST_ALIGN
– Performing Test CXX_FLAG_WCAST_ALIGN - Success
– Performing Test C_FLAG_WCAST_QUAL
– Performing Test C_FLAG_WCAST_QUAL - Success
– Performing Test CXX_FLAG_WCAST_QUAL
– Performing Test CXX_FLAG_WCAST_QUAL - Success
– Performing Test C_FLAG_WSTRICT_PROTOTYPES
– Performing Test C_FLAG_WSTRICT_PROTOTYPES - Success
– Looking for xxHash
– Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
– xxHash not found. Switching on builtin_xxhash option
– Looking for LZ4
– Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR)
– LZ4 not found. Switching on builtin_lz4 option
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
– Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
– Looking for AfterImage
– Could NOT find AfterImage (missing: AFTERIMAGE_INCLUDE_DIR AFTERIMAGE_LIBRARIES)
– AfterImage not found. Switching on builtin_afterimage option
– Building AfterImage library included in ROOT itself
– Looking for GSL
– Found PkgConfig: /usr/local/bin/pkg-config (found version β€œ0.29.2”)
– Found GSL: /usr/local/Cellar/gsl/2.5/include (found suitable version β€œ2.5”, minimum required is β€œ1.10”)
– Looking for OpenGL
– Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework
– 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: /usr/lib/libxml2.dylib (found version β€œ2.9.4”)
– Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
– OpenSSL not found, switching ON β€˜builtin_openssl’ option.
– Found OpenSSL: /Users/gligorov/root-6.22.00/build/builtins/openssl/OPENSSL-prefix/include (found version β€œ1.1.1g”)
– Looking for MySQL
– Could NOT find MySQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
– MySQL not found. Switching off mysql option
– Looking for Oracle
– Oracle not found.
– Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
– currently found includes:
– Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
– currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
– Oracle not found. Switching off oracle option
– Looking for PostgreSQL
– Could NOT find PostgreSQL (missing: PostgreSQL_INCLUDE_DIR)
– PostgreSQL not found. Switching off pgsql option
– Looking for SQLite
– Found Sqlite: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/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
– FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation
– Alternatively, you can also enable the option β€˜builtin_fftw3’ to build FFTW3 internally’
– For the time being switching OFF β€˜fftw3’ option
– 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
– XROOTD not found, enabling β€˜builtin_xrootd’ option
– Downloading and building XROOTD version
– Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY)
– 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’
– 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/MacOSX10.15.sdk/usr/include
– Davix dependencies not found, switching OFF β€˜davix’ option.
– 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 dgemm_
– Looking for dgemm_ - found
– Found BLAS: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Accelerate.framework
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
– Building LLVM in β€˜Release’ mode.
– The ASM compiler identification is Clang
– Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
– Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
– 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/MacOSX10.15.sdk/usr/include
– Native target architecture is X86
– Threads disabled.
– Doxygen disabled.
– Go bindings disabled.
– Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
– LLVM host triple: x86_64-apple-darwin18.7.0
– LLVM default target triple: x86_64-apple-darwin18.7.0
– Building with -fPIC
– Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version β€œ3.8.5”)
– Constructing LLVMBuild project information
– SysLibs: curses;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd
– Targeting X86
– Targeting NVPTX
– Clang version: 5.0.0
– Cling version (from VERSION file): ROOT_0.7~dev
– Cling will look for C++ headers in β€˜/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1’ at runtime.
– And if not found, will invoke: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ ’ for them.
– Performing Test __result
– Performing Test __result - Failed
– Performing Test CXX_HAS_fno_rtti
– Performing Test CXX_HAS_fno_rtti - Success
– Performing Test CXX_HAS_Wno_conditional_uninitialized
– Performing Test CXX_HAS_Wno_conditional_uninitialized - 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
– 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 - 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
Running /Users/gligorov/root-6.22.00/build/unix/compiledata.sh
Making /Users/gligorov/root-6.22.00/build/ginclude/compiledata.h
– Enabled support for: asimage builtin_afterimage builtin_clang builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_lzma builtin_openssl builtin_tbb builtin_xrootd builtin_xxhash builtin_zstd clad cocoa dataframe exceptions gdml http imt libcxx mathmore mlp opengl pyroot roofit runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd
– Configuring done
– Generating done
– Build files have been written to: /Users/gligorov/root-6.22.00/build

Hi @gligorov,
and welcome to the ROOT forum!

Somehow it seems that your sources are missing part of the code? Can you compare with root/core/base/inc/TBuffer.h at master Β· root-project/root Β· GitHub ?

From this error message it looks like you are missing the template arguments?

Cheers,
Enrico

Hi @eguiraud and thanks for the welcome!

I downloaded the source from the tarball at

https://root.cern/download/root_v6.22.00.source.tar.gz

I have now diffed with what you pointed me to and the output is

30d29
< #include < string >

adding this line to my instance of TBuffer does not fix the problem (perhaps unsurprisingly but I thought I’d try…)

Thanks

Vava

Uhm could it be that you have a different ROOT installation already set up (e.g. a source thisroot.sh in your .bashrc) that interferes with the build?

The source code in the tar archive looks ok: I β€œmanually” reviewed TBuffer.h at lines 383 and following in the archive you downloaded, I don’t see anything that could trigger that compilation error.

Alternatively, could it be that the build actually errors out at some place before the point you reported, and that error you reported is just a consequence of a previous error?

Cheers,
Enrico

Apologies I didn’t have permission to upload the full make logfile in the first post, you can find it attached.

I now tried rebuilding in a shell where I explicitly did not run thisroot.csh or set ROOT environment variables and the build fails in exactly the same way.

MakeLogfile.txt (656.5 KB)

Uhm, I’m stumped. That code definitely compiles on our mac nodes. I’ll ask around whether someone has an idea of what might be causing this.

Also what is the version of your xcode installation?

Cheers,
Enrico

I have Xcode 11.3.1

I guess you saw it in the original post but 6.20 compiles fine, which has as far as I can tell a pretty much identical TBuffer.h file. Which probably points to the fact that it is not this file as such but something else going wrong? Anyway thanks a lot for following up on this!

@eguiraud in case it helps I redid the compilation (clean shell, no previous ROOT versions invoked) without -j8 i.e. in single core mode and now the failure is quite different?

MakeLogfile_SingleCore.txt (516.8 KB)

Alright, you do have a system installation of ROOT in /usr/local that interferes with the build! :smiley:

/Users/gligorov/root-6.22.00/build/include/module.modulemap:3:8: error: redefinition of module 'ROOT_Foundation_C'
module ROOT_Foundation_C  {
       ^
/usr/local/include/module.modulemap:3:8: note: previously defined here
module ROOT_Foundation_C  {
       ^

Also see the discussion here.

OK cleaning that up worked thanks a lot!

1 Like

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