I am trying to install ROOT v6.22 from source on my Mac - I can get it wokring without ROOT7 but I want to use some of the development features so I tried this:
it seems OK (no error) then when I attempt to make I am seeing this error:
[ 75%] Built target Cling
[ 75%] Generating G__Core.cxx, ../lib/Core.pcm
In file included from input_line_10:101:
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:142:55: error: no member named 'make_unique' in namespace 'std'
explicit RResultBase(RError &&error) : fError(std::make_unique<RError...
~~~~~^
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:142:67: error: 'RError' does not refer to a value
explicit RResultBase(RError &&error) : fError(std::make_unique<RError...
^
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:76:7: note: declared here
class RError {
^
Error: /Users/user/NewROOT/root_build/core/rootcling_stage1/src/rootcling_stage1: compilation failure (/Users/user/NewROOT/root_build/lib/libCoreb85654445f_dictUmbrella.h)
make[2]: *** [core/G__Core.cxx] Error 1
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
make: *** [all] Error 2
[ 75%] Built target Cling
[ 75%] Generating G__Core.cxx, ../lib/Core.pcm
In file included from input_line_10:101:
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:142:55: error: no member named 'make_unique' in namespace 'std'
explicit RResultBase(RError &&error) : fError(std::make_unique<RError...
~~~~~^
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:142:67: error: 'RError' does not refer to a value
explicit RResultBase(RError &&error) : fError(std::make_unique<RError...
^
/Users/user/NewROOT/root_build/include/ROOT/RError.hxx:76:7: note: declared here
class RError {
^
Error: /Users/user/NewROOT/root_build/core/rootcling_stage1/src/rootcling_stage1: compilation failure (/Users/user/NewROOT/root_build/lib/libCoreb85654445f_dictUmbrella.h)
make[2]: *** [core/G__Core.cxx] Error 1
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
make: *** [all] Error 2
Any ideas what the issue might be - I have the latest gcc and clang installed so it should have access to c++17
Hm, std::make_unique should be part of the memory header, which is included. Could you try if it helps to #include <ROOT/RMakeUnique.hxx> and, if that doesn’t help, to replace in RError.hxx line 142
"
– Detected ROOT_VERSION 6.22.99
– Looking for Python
– ROOT default compression algorithm: zlib
– PyROOT will be built for versions 3.7.7 (Main) and 2.7.16
– Found a Mac OS X System 10.14
– Found a 64bit system
– Found LLVM compiler collection
– ROOT Platform: macosx
– ROOT Architecture: macosx64
– Build Type: Release (flags = ‘-O3 -DNDEBUG’)
– Compiler Flags: -O3 -DNDEBUG -std=c++1z -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
– Building freetype version 2.6.1 included in ROOT itself
– Looking for LZMA
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
– Building AfterImage library included in ROOT itself
– Looking for GSL
– Looking for OpenGL
– Looking for LibXml2
– Looking for SQLite
– Downloading and building XROOTD version
– Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
– Looking for BLAS for optional parts of TMVA
– Building LLVM in ‘Release’ mode.
– Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
– 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
– Constructing LLVMBuild project information
– SysLibs: curses;/usr/lib/libz.dylib
– 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 found_stdstringview
– Performing Test found_stdstringview - Success
– Performing Test found_stod_stringview
– Performing Test found_stod_stringview - Failed
– Performing Test found_stdapply
– Performing Test found_stdapply - Success
– Performing Test found_stdinvoke
– Performing Test found_stdinvoke - Success
– Performing Test found_stdindexsequence
– Performing Test found_stdindexsequence - Success
Running /Users/user/NewROOT/root_src/build/unix/compiledata.sh
Changing /Users/user/NewROOT/root_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_openssl builtin_pcre builtin_tbb builtin_vdt builtin_xrootd builtin_xxhash builtin_zstd clad cocoa dataframe exceptions gdml http imt libcxx mathmore mlp opengl pyroot roofit root7 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/user/NewROOT/root_build
How did you guys get 10.0.1 (@jblomer) and 11.0.0 (@smd) on your 10.14.6? I have the same osx version and clang 10.0.0 and can’t find a way to update it
Alja has osx-15 and clang 11.0.3 there.
Is it possible some headers from osx-14 interfere with clang-11?
OK let’s see. @smd could you upload the file CMakeCache.txt? What does cmake --version say?
It’s strange that CMake sets -std=c++1z, I would have expected -std=c++17.
std::make_unique exists since C++14, so indeed, rootcling isn’t built with the proper C++ standard. Is this on an existing build directory? Can you do make -j4 clean; rm CMakeCache.txt; cmake -DCMAKE_INSTALL_PREFIX=../root_install/ ../root_src/ -DCMAKE_CXX_STANDARD=17 -Dhttp=ON -Droot7=ON; make -j 12 - does that help?