Compilation problem on Mac 10.13, Xcode 9.2

The root (5.xxx) on my Mac stopped working after I upgraded to 10.13 (Xcode 9.2, 9C40b). I downloaded different pre-compiled versions, they didn’t work. Then I try to install from source, but the compilation stopped at about 34%. Any suggestion? I just need a working root. Thanks a lot!

Hereafter is what I tried just now:

$ git pull
warning: redirecting to GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
remote: Counting objects: 452, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 452 (delta 267), reused 277 (delta 264), pack-reused 163
Receiving objects: 100% (452/452), 121.66 KiB | 12.17 MiB/s, done.
Resolving deltas: 100% (311/311), completed with 81 local objects.
From GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
2a3066141e…2355f2b81e master → origin/master
31ded19fde…3ddc8cebd2 v6-12-00-patches → origin/v6-12-00-patches

  • [new tag] v6-12-02 → v6-12-02
    Updating 2a3066141e…2355f2b81e
    Fast-forward
    README/CREDITS | 6 +++
    README/ReleaseNotes/v612/index.md | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++±-------
    cmake/modules/RootConfiguration.cmake | 3 ±
    core/base/inc/CommandLineOptionsHelp.h | 80 +++++++++++++++++++++++++++++++++++++++
    core/base/inc/TDirectory.h | 24 +++++++±—
    core/base/src/TApplication.cxx | 56 +±------------------------
    core/base/src/TDirectory.cxx | 50 ++++++++++++++++++++±—
    core/base/src/TROOT.cxx | 2 ±
    documentation/doxygen/Makefile | 6 ±-
    geom/gdml/inc/TGDMLWrite.h | 5 +++
    geom/gdml/src/TGDMLParse.cxx | 120 ++++++++++++++++++++++++++++++++++++++++++++±------------
    geom/gdml/src/TGDMLWrite.cxx | 60 +++++++++++++++++++++++±----
    geom/geocad/inc/TGeoToStep.h | 8 ++±
    geom/geocad/inc/TOCCToStep.h | 10 +++±
    geom/geocad/src/TGeoToStep.cxx | 49 ++++++++++++++++++++±–
    geom/geocad/src/TOCCToStep.cxx | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++±----
    graf2d/gpad/v7/src/TDrawingOptsBase.cxx | 69 ----------------------------------
    roofit/roofitcore/inc/RooProdPdf.h | 2 ±
    rootx/src/rootx.cxx | 21 +±--------
    tmva/tmva/inc/TMVA/DataSetFactory.h | 17 ++++±—
    tmva/tmva/src/DataSetFactory.cxx | 2 ±
    tutorials/multicore/imt001_parBranchProcessing.C | 10 ++±-
    tutorials/multicore/mp103_processSelector.C | 3 ±
    tutorials/multicore/mp104_processH1.C | 2 ±
    tutorials/multicore/mp_H1_lambdas.C | 28 ++++++±------
    tutorials/multicore/mt304_fillHistos.C | 4 ±
    26 files changed, 749 insertions(+), 265 deletions(-)
    create mode 100644 core/base/inc/CommandLineOptionsHelp.h

$ cd …/root_v6

cmake ../root -- Found a Mac OS X System 10.13 -- Found a 64bit system -- Found LLVM compiler collection -- ROOT Platform: macosx -- ROOT Architecture: macosx64 -- Build Type: RelWithDebInfo -- Compiler Flags: -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 -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++11 -stdlib=libc++ -O2 -g -DNDEBUG -- Looking for ZLib -- Building freetype version 2.6.1 included in ROOT itself -- Building pcre version 8.37 included in ROOT itself -- Building LZMA version 5.2.1 included in ROOT itself -- Building LZ4 version v1.7.5 included in ROOT itself -- 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) -- Building AfterImage library included in ROOT itself -- Looking for Python -- Found Python interpreter version 2.7 -- Looking for OpenGL -- Looking for LibXml2 -- Looking for SQLite -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Looking for FFTW3 -- Looking for BLAS for optional parts of TMVA -- A library with BLAS API found. -- Enabled support for: asimage astiff builtin_afterimage builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lzma builtin_lz4 builtin_pcre builtin_tbb builtin_unuran cling cocoa cxx11 exceptions explicitlink fftw3 gdml genvector http imt libcxx opengl pch python roofit shared sqlite thread tmva xml -- 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 -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- LLVM host triple: x86_64-apple-darwin17.2.0 -- LLVM default target triple: x86_64-apple-darwin17.2.0 -- Building with -fPIC -- Constructing LLVMBuild project information -- SysLibs: curses;/usr/lib/libz.dylib -- Targeting X86 -- Could NOT find Z3 (missing: Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5") -- Clang version: 5.0.0 -- Cling version (from VERSION file): ROOT_0.6~dev -- Cling will look for C++ headers in '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1' at runtime. -- And if not found, will invoke: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ ' for them. Running /Users/he/software/root/build/unix/compiledata.sh Changing /Users/he/software/root_v6/include/compiledata.h -- Configuring done -- Generating done -- Build files have been written to: /Users/he/software/root_v6 make -j2
[ 0%] Built target move_header_html
[ 1%] Built target move_header_math_genvector
[ 1%] Built target move_header_math_genetic
[ 1%] Built target move_header_math_fftw
[ 1%] Built target move_header_hist_histpainter
[ 2%] Built target move_header_hist_hist
[ 2%] Built target move_header_core_clingutils
[ 2%] Built target move_header_core_cont
[ 2%] Built target move_header_core_foundation
[ 3%] Built target move_header_core_meta
[ 3%] Built target move_header_core_rint
[ 3%] Built target move_header_core_multiproc
[ 3%] Built target move_header_core_thread
[ 3%] Built target move_header_core_textinput
[ 3%] Built target move_header_core_imt
[ 3%] Built target move_header_core_zip
[ 3%] Built target move_header_core_lz4
[ 3%] Built target move_header_core_lzma
[ 3%] Built target move_header_core_newdelete
[ 3%] Built target move_header_core_unix
[ 3%] Built target move_header_core_macosx
[ 3%] Copying header /Users/he/software/root/core/base/inc/CommandLineOptionsHelp.h to /Users/he/software/root_v6/include
[ 3%] Copying header /Users/he/software/root/core/base/inc/TDirectory.h to /Users/he/software/root_v6/include
[ 3%] Built target move_header_core_clib
[ 5%] Built target move_header_core_base
[ 5%] Built target move_header_montecarlo_eg
[ 5%] Built target move_header_montecarlo_vmc
[ 6%] Built target move_header_geom_geom
[ 6%] Built target move_header_geom_geombuilder
[ 6%] Built target move_header_geom_geompainter
[ 6%] Copying header /Users/he/software/root/geom/gdml/inc/TGDMLWrite.h to /Users/he/software/root_v6/include
[ 8%] Built target move_header_math_mathcore
[ 8%] Built target move_header_geom_gdml
[ 8%] Built target move_header_math_matrix
[ 8%] Built target move_header_math_minuit
[ 8%] Built target move_header_math_fumili
[ 10%] Built target move_header_math_physics
[ 10%] Built target move_header_math_mlp
[ 10%] Built target move_header_math_quadp
[ 10%] Built target move_header_math_smatrix
[ 10%] Built target move_header_math_foam
[ 10%] Built target move_header_math_splot
[ 10%] Built target move_header_bindings_pyroot
[ 10%] Built target move_header_sql_sqlite
[ 10%] Copying header /Users/he/software/root/tmva/tmva/inc/TMVA/DataSetFactory.h to /Users/he/software/root_v6/include
[ 12%] Built target move_header_tmva_tmva
[ 12%] Built target move_header_tmva_tmvagui
[ 12%] Built target move_header_tmva_pymva
[ 12%] Copying header /Users/he/software/root/roofit/roofitcore/inc/RooProdPdf.h to /Users/he/software/root_v6/include
[ 13%] Built target move_header_roofit_roofit
[ 16%] Built target move_header_roofit_roofitcore
[ 16%] Built target move_header_roofit_histfactory
[ 17%] Built target move_header_roofit_roostats
[ 17%] Built target move_header_hist_spectrumpainter
[ 17%] Built target move_header_hist_spectrum
[ 17%] Built target move_header_hist_unfold
[ 18%] Built target move_header_tree_tree
[ 20%] Built target move_header_tree_treeviewer
[ 20%] Built target move_header_tree_treeplayer
[ 21%] Built target move_header_io_sql
[ 21%] Built target move_header_io_io
[ 21%] Built target move_header_io_xmlparser
[ 21%] Built target move_header_io_xml
[ 21%] Built target move_header_net_auth
[ 21%] Built target move_header_net_net
[ 21%] Built target move_header_graf2d_gpad
[ 22%] Built target move_header_net_http
[ 23%] Built target move_header_graf2d_graf
[ 23%] Built target move_header_graf2d_postscript
[ 23%] Built target move_header_graf2d_quartz
[ 23%] Built target move_header_graf2d_asimage
[ 25%] Built target move_header_graf3d_g3d
[ 25%] Built target move_header_graf2d_cocoa
[ 27%] Built target move_header_graf3d_gl
[ 27%] Built target move_header_graf3d_eve
[ 27%] Built target move_header_graf3d_glew
[ 27%] Built target move_header_graf3d_ftgl
[ 27%] Built target move_header_graf3d_gviz3d
[ 30%] Built target move_header_gui_gui
[ 30%] Built target move_header_gui_fitpanel
[ 30%] Built target move_header_gui_ged
[ 30%] Built target move_header_gui_guibuilder
[ 30%] Built target move_header_gui_guihtml
[ 30%] Built target move_header_gui_recorder
[ 30%] Built target move_header_gui_sessionviewer
[ 30%] Built target move_header_proof_proof
[ 30%] Built target move_header_proof_proofplayer
[ 31%] Built target move_header_proof_proofbench
[ 31%] Built target obj.clang-tblgen
[ 31%] Built target LLVMDemangle
[ 31%] Built target LLVMTableGen
[ 33%] Built target LLVMSupport
[ 33%] Built target LLVMBinaryFormat
[ 33%] Built target obj.llvm-tblgen
[ 33%] Built target llvm_vcsrevision_h
[ 33%] Built target LLVMMCParser
[ 34%] Built target LLVMMC
[ 34%] Built target LLVMMCDisassembler
[ 34%] Built target LLVMOption
[ 34%] Built target LLVMDebugInfoMSF
[ 34%] Performing configure step for ‘PCRE’
[ 34%] Built target LLVMDebugInfoCodeView
Scanning dependencies of target copymodulemap
[ 34%] Generating include/module.modulemap
[ 34%] Built target copymodulemap
[ 34%] Performing configure step for ‘LZMA’
CMake Error at /Users/he/software/root_v6/PCRE-prefix/src/PCRE-stamp/PCRE-configure-RelWithDebInfo.cmake:16 (message):
Command failed: 1

‘./configure’ ‘–prefix’ ‘/Users/he/software/root_v6’ ‘–with-pic’ ‘–disable-shared’ ‘CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc’ ‘CFLAGS=-O’

See also

/Users/he/software/root_v6/PCRE-prefix/src/PCRE-stamp/PCRE-configure-*.log

CMake Error at /Users/he/software/root_v6/LZMA-prefix/src/LZMA-stamp/LZMA-configure-RelWithDebInfo.cmake:16 (message):
Command failed: 1

‘/Users/he/software/root_v6/LZMA-prefix/src/LZMA/configure’ ‘–prefix’ ‘/Users/he/software/root_v6’ ‘–libdir’ ‘/Users/he/software/root_v6/lib’ ‘–with-pic’ ‘–disable-shared’ ‘–quiet’ ‘CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc’ ‘CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++’ ‘CFLAGS=-Wno-format-nonliteral’ ‘LDFLAGS=-Qunused-arguments’

See also

/Users/he/software/root_v6/LZMA-prefix/src/LZMA-stamp/LZMA-configure-*.log

make[2]: *** [LZMA-prefix/src/LZMA-stamp/LZMA-configure] Error 1
make[2]: *** [PCRE-prefix/src/PCRE-stamp/PCRE-configure] Error 1
make[1]: *** [CMakeFiles/LZMA.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
make[1]: *** [CMakeFiles/PCRE.dir/all] Error 2
make: *** [all] Error 2

Wow, that shouldn’t be so complicated! ROOT 6 should just build out of the box! Which ROOT version are we talking about here?

If I understood correctly, this should be the root6 master? I didn’t specify the version or switch to any branch.

It seems that the builtin LZMA failed to build. Could you please paste the output from the file above so that we can diagnose the cause? Thanks!

Yes, hereafter is the LZMA-configure-err.log file content:

configure: error: in /Users/he/software/root_v6/LZMA-prefix/src/LZMA': configure: error: cannot run C compiled programs. If you meant to cross compile, use –host’.
See `config.log’ for more details

and this is the LZMA-configure-out.log:

XZ Utils 5.2.1

System type:

Configure options:

Initializing Automake:

I guess the real error message is still inside the config.log file. Could you paste that as well? Looks like some configuration problem with the compiler. Maybe you just need to run xcode-select --install. Have you used XCode before, or are you using it for the first time to compile ROOT?

Thanks! I vaguely remember I did xcode-select --install some weeks ago, and I got some other problem.
Anyway, I just did it again. Now it went much further, then stopped with two errors (too long to paste).
And this is the master version of root6:

The full log file is attached, the error is something like:

[ 70%] Built target ClingUtils
[ 70%] Built target Dictgen
Scanning dependencies of target MetaCling
[ 70%] Built target LLVMRES
[ 70%] Built target rootcling_stage1
Scanning dependencies of target G__Core
[ 70%] Generating G__Core.cxx, …/…/lib/libCore.rootmap
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TCling.cxx.o
In file included from input_line_5:1:
In file included from /Users/he/software/root_v6/include/Rtypes.h:26:
In file included from /Users/he/software/root_v6/include/snprintf.h:14:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:89:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
unsigned char *_base;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:89:16: note: insert ‘_Nullable’ if the pointer may be null
unsigned char *_base;
^
_Nullable
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:89:16: note: insert ‘_Nonnull’ if the pointer should never be null
unsigned char _base;
^
_Nonnull
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:134:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int (
_Nullable _read) (void *, char , int);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:134:32: note: insert ‘_Nullable’ if the pointer may be null
int (
_Nullable _read) (void *, char , int);
^
_Nullable
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdio.h:134:32: note: insert ‘_Nonnull’ if the pointer should never be null
int (
_Nullable _read) (void *, char *, int);

In file included from /Users/he/software/root_v6/include/TString.h:26:
/Users/he/software/root_v6/include/TMathBase.h:144:18: error: expected unqualified-id
{ return std::signbit(a); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:184:5: note: expanded from macro ‘signbit’
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
^
In file included from input_line_9:12:
In file included from /Users/he/software/root_v6/include/TApplication.h:30:
In file included from /Users/he/software/root_v6/include/TQObject.h:41:
In file included from /Users/he/software/root_v6/include/TList.h:25:
In file included from /Users/he/software/root_v6/include/TSeqCollection.h:25:
In file included from /Users/he/software/root_v6/include/TCollection.h:29:
In file included from /Users/he/software/root_v6/include/TString.h:26:
/Users/he/software/root_v6/include/TMathBase.h:147:18: error: expected unqualified-id
{ return std::signbit(a); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:184:5: note: expanded from macro ‘signbit’
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
^
Error: /Users/he/software/root_v6/core/rootcling_stage1/src/rootcling_stage1: compilation failure (/Users/he/software/root_v6/lib/libCore3e36424c88_dictUmbrella.h)
make[2]: *** [core/base/G__Core.cxx] Error 1
make[1]: *** [core/base/CMakeFiles/G__Core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingBaseClassInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingCallFunc.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingCallbacks.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingClassInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingDataMemberInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingMethodArgInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingMethodInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingTypeInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingTypedefInfo.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingValue.cxx.o
[ 70%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/rootclingTCling.cxx.o
[ 70%] Built target MetaCling
make: *** [all] Error 2

root6-master-err.txt (165.6 KB)

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

Picking this up again - do you still have this issue? It’s strange because we build with macOS 10.13 and Xcode 9.2 on a daily basis, without any problems… So something is different and we need to figure out what that is.

Did you start from a fresh build directory after xcode-select --install? Cmake might not pick up the new compiler.

Cheers, Axel.

Following Axel’s suggestion, I removed CMakeCache.txt and the build directory, now it is working!

@Axel Thank you very much!

1 Like