[PyRoot] import ROOT and segmentation violation with anaconda python 3.6

Hi

My problem

Can anyone help me to solve this PyRoot installation/import problem? I got the segmentation violation error when I was doing import ROOT after no-error installation. The segmentation violation error massage is attached here:

Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT 

*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/Users/juifa.tsai/anaconda3/lib/libpython3.6m.dylib] PyUnicode_InternFromString (no debug info)
[/Applications/root/obj/lib/libPyROOT.so] PyROOT::CreatePyStrings() /Applications/root/bindings/pyroot/src/PyStrings.cxx:64
[/Applications/root/obj/lib/libPyROOT.so] PyInit_libPyROOT /Applications/root/bindings/pyroot/src/RootModule.cxx:848
[/Users/juifa.tsai/anaconda3/bin/python] _PyImport_LoadDynamicModuleWithSpec (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _imp_create_dynamic (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyCFunction_Call (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyFunction_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] builtin_exec (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyCFunction_Call (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyFunction_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] builtin_exec (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyCFunction_Call (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] fast_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] call_function (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyFunction_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_FastCallDict (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyObject_CallMethodIdObjArgs (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyImport_ImportModuleLevelObject (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalFrameDefault (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] _PyEval_EvalCodeWithName (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyRun_InteractiveOneObjectEx (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyRun_InteractiveLoopFlags (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] PyRun_AnyFileExFlags (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] Py_Main (no debug info)
[/Users/juifa.tsai/anaconda3/bin/python] main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[<unknown binary>] (no debug info)

My computer’s environment is:

ROOT : v6-14-02
Python : Python 3.6.5 (Anaconda3)
Compiler : GCC 4.2.1 Compatible Clang 4.0.1
cmake : 3.13.0-rc2
OS : MacOS 10.13.6

The installation steps I have done:

  1. Download root
git clone http://github.com/root-project/root.git
cd root
git checkout -b v6-14-02 v6-14-02
mkdir obj
cd obj
  1. check package with cmake
sudo cmake .. -Dall=ON -Dpython3=ON

The log attached here seems that python is found successfully.

-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ROOT default compression algorithm is lz4
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - /usr/local/bin/gfortran
-- The Fortran compiler identification is GNU 8.2.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Check for working Fortran compiler: /usr/local/bin/gfortran
-- Check for working Fortran compiler: /usr/local/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- ROOT7 interfaces require >= cxx14 which is disabled. Switching OFF root7 option
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found a Mac OS X System 10.13
-- 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: 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++
-- Looking for ZLib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Looking for Unuran
-- Found UNURAN: /usr/local/lib/libunuran.a
-- Building freetype version 2.6.1 included in ROOT itself
-- Looking for PCRE
-- Found PCRE: /usr/local/include
-- Looking for LZMA
-- Found LZMA includes at /usr/local/include
-- Found LZMA library at /usr/local/lib/liblzma.dylib
-- 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
-- Found GIF: /usr/local/lib/libgif.dylib (found version "5.1.4")
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.0.9")
-- Found PNG: /usr/X11R6/lib/libpng.dylib (found version "1.6.26")
-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "90")
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Found GSL: /usr/local/Cellar/gsl/2.5/include (found suitable version "2.5", minimum required is "1.10")
-- Found PythonInterp: /Users/juifa.tsai/anaconda3/bin/python (found version "3.6.5")
-- Found PythonLibs: /Users/juifa.tsai/anaconda3/lib/libpython3.6m.dylib (found version "3.6.5")
-- Found NUMPY: /Users/juifa.tsai/anaconda3/lib/python3.6/site-packages/numpy/core/include (found version "1.15.3")
-- Looking for OpenGL
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Looking for gl2ps
-- Found GL2PS: /usr/local/lib/libgl2ps.dylib
-- Looking for Graphviz
-- Could NOT find GRAPHVIZ (missing: GRAPHVIZ_INCLUDE_DIR GRAPHVIZ_cdt_LIBRARY GRAPHVIZ_gvc_LIBRARY GRAPHVIZ_graph_LIBRARY GRAPHVIZ_pathplan_LIBRARY)
-- Graphviz not found. Switching off gviz option
-- Looking for Bonjour
-- Checking whether Bonjour/Avahi is supported
-- Looking for Kerberos 5
-- Found KRB5: /usr/lib/libkrb5.dylib
-- 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.
-- Looking for Castor
-- Could NOT find CASTOR (missing: CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR)
-- Castor not found. Switching off castor option
-- Looking for RFIO
-- Could NOT find CASTOR (missing: CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR)
-- Castor or DPM not found. Switching off rfio option
-- 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 ODBC
-- Could NOT find ODBC (missing: ODBC_INCLUDE_DIR)
-- ODBC not found. Switching off odbc option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing: POSTGRESQL_INCLUDE_DIR)
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found Sqlite: /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
-- Found fftw3 includes at /usr/local/include
-- Found fftw3 library at /usr/local/lib/libfftw3.a
-- Looking for CFITSIO
-- Found CFITSIO: /usr/local/include
-- Found CFITSIO version: 3.45
-- Support Shadow password not found. Switching off shadowpw option
-- Could NOT find Monalisa (missing: MONALISA_LIBRARY MONALISA_INCLUDE_DIR)
-- Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation
-- For the time being switching OFF 'monalisa' option
-- Looking for XROOTD
-- Found Xrootd version num: 4.8.3 (setting -DROOTXRDVERS=400080003)
--              libXrdMain not found: xproofd will be a wrapper around xrootd
--              include_dirs: /usr/local/include/xrootd;/usr/local/include/xrootd/private
--              libraries: /usr/local/lib/libXrdUtils.dylib;/usr/local/lib/libXrdClient.dylib;/usr/local/lib/libXrdCl.dylib
-- Checking for module 'arrow'
--   No package 'arrow' found
-- Could not find the Arrow library. Looked for headers in , and for libs in
-- Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation,or include the installation of Arrow in the CMAKE_PREFIX_PATH.
-- For the time being switching OFF 'arrow' option
-- 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 DCAP (missing: DCAP_INCLUDE_DIR DCAP_LIBRARY)
-- dCap library not found. Set variable DCAP_DIR to point to your dCache installation
-- For the time being switching OFF 'dcache' option
-- Found LDAP: /usr/include
-- Could NOT find CHIRP (missing: CHIRP_INCLUDE_DIR CHIRP_LIBRARY)
-- chirp library not found. Set variable CHIRP_DIR to point to your chirp installation
-- For the time being switching OFF 'chirp' option
-- Looking for R
-- Could NOT find R (missing: R_EXECUTABLE R_INCLUDE_DIR R_LIBRARY Rcpp RInside)
-- R installation not found. Set variable R_DIR to point to your R installation
-- For the time being switching OFF 'r' option
-- Could NOT find HDFS (missing: HDFS_INCLUDE_DIR HDFS_LIBRARY)
-- hdfs library not found. Set variable HDFS_DIR to point to your hdfs installation
-- For the time being switching OFF 'hdfs' option
-- Looking for uuid_generate_random in uuid
-- Looking for uuid_generate_random in uuid - not found
-- Found uuid: /usr/include
-- Davix not found, switching ON 'builtin_davix' option.
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for TBB
-- Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY)
-- TBB not found. Switching on builtin_tbb option
-- Performing Test CXX_HAS_mno_rtm
-- Performing Test CXX_HAS_mno_rtm - Success
-- Vc library not found, support for it disabled.
-- Please enable the option 'builtin_vc' to build Vc internally.
-- VecCore not found, switching on 'builtin_veccore' option.
-- Found VecCore: /Applications/root/obj/externals//usr/local/include (found version "0.4.2")
-- Looking for VDT
-- Found VDT: /include
-- Looking for BLAS for optional parts of TMVA
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Found BLAS: /System/Library/Frameworks/Accelerate.framework
-- >>> Option 'glite' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'sapdb' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'srp' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- Enabled support for:  asimage astiff bonjour builtin_afterimage builtin_davix builtin_freetype builtin_ftgl builtin_glew builtin_llvm builtin_clang builtin_lz4 builtin_openssl builtin_tbb builtin_veccore builtin_xxhash cling cocoa cxx11 davix exceptions explicitlink fftw3 fitsio fortran gdml genvector http imt krb5 ldap libcxx mathmore memstat minuit2 opengl pch python qt qtgsi roofit shared sqlite ssl table thread tmva tmva-cpu unuran vdt veccore xml xrootd
CMake Deprecation Warning at interpreter/llvm/src/CMakeLists.txt:15 (cmake_policy):
  The OLD behavior for policy CMP0051 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 ASM compiler identification is unknown
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Warning: Did not find file Compiler/-ASM
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
CMake Warning (dev) at interpreter/llvm/src/CMakeLists.txt:344 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_SHARED_LIBS'.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at interpreter/llvm/src/CMakeLists.txt:399 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'LLVM_ENABLE_ASSERTIONS'.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /Applications/CMake.app/Contents/share/cmake-3.13/Modules/CheckIncludeFile.cmake:70 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    m

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  interpreter/llvm/src/cmake/config-ix.cmake:46 (check_include_file)
  interpreter/llvm/src/CMakeLists.txt:584 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /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
-- Found OCaml: /usr/local/bin/ocamlfind
-- OCaml bindings disabled, need ctypes >=0.4.
-- LLVM host triple: x86_64-apple-darwin17.7.0
-- LLVM default target triple: x86_64-apple-darwin17.7.0
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- SysLibs: curses;/usr/lib/libz.dylib
-- Targeting X86
-- 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.
-- 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
-- Performing Test CXX_HAS_Wno_deprecated_declarations
-- Performing Test CXX_HAS_Wno_deprecated_declarations - Success
-- Performing Test CXX_HAS_Wno_shadow
-- Performing Test CXX_HAS_Wno_shadow - Success
-- Found unsuitable Qt version "5.9.6" from /Users/juifa.tsai/anaconda3/bin/qmake
-- Found unsuitable Qt version "5.9.6" from /Users/juifa.tsai/anaconda3/bin/qmake
-- Qt4 not found. Switching off qtgsi option
-- Performing Test CXX_HAS_Wno_nonnull_compare
-- Performing Test CXX_HAS_Wno_nonnull_compare - Failed
-- Performing Test CXX_HAS_fno_strict_aliasing
-- Performing Test CXX_HAS_fno_strict_aliasing - Success
-- Performing Test CXX_HAS_Wno_parentheses_equality
-- Performing Test CXX_HAS_Wno_parentheses_equality - Success
-- Using TMVA-DNN with BLAS installation
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Failed
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- 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
Running /Applications/root/build/unix/compiledata.sh
Making /Applications/root/obj/include/compiledata.h
-- Configuring done
-- Generating done
-- Build files have been written to: /Applications/root/obj

cmake.txt (15.7 KB)

  1. installation with a fews warning but without any error
sudo cmake --build . -- -j4

warning log:

[ 75%] Linking CXX shared library ../lib/libCore.so
ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication.tbd and library file /System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit.tbd and library file /System/Library/Frameworks//AppKit.framework/Versions/C/AppKit are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation.tbd and library file /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ApplicationServices.framework/Versions/A/ApplicationServices.tbd and library file /System/Library/Frameworks//ApplicationServices.framework/Versions/A/ApplicationServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Versions/C/Foundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics.tbd and library file /System/Library/Frameworks//CoreGraphics.framework/Versions/A/CoreGraphics are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText.tbd and library file /System/Library/Frameworks//CoreText.framework/Versions/A/CoreText are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO.tbd and library file /System/Library/Frameworks//ImageIO.framework/Versions/A/ImageIO are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/Versions/A/CoreServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis.tbd and library file /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking.

[ 95%] Linking CXX shared library ../../lib/libRGL.so
ld: warning: text-based stub file /System/Library/Frameworks//OpenGL.framework/OpenGL.tbd and library file /System/Library/Frameworks//OpenGL.framework/OpenGL are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib are out of sync. Falling back to library file for linking.
  1. setup root environment
source ./bin/thisroot.sh

I was solving this problem by trying different version of ROOT and different version of python. But the problem is remained… Hope any expert can help me to point out the key problem…

Many thanks,
J.F.

1 Like

You need to build ROOT in a way that’s compatible with your Anaconda install. Start by adding GCC to your Anaconda environment, and use that to build ROOT. Pass Anaconda’s Python to ROOT’s CMake invocation. That should help.

Axel.

Hi Axel,

Thanks for the answer.
I have tried to add GCC to Anaconda environment with

conda install -c anaconda gcc 
conda install -c anaconda libgcc
conda install -c anaconda llvm         # since I get error as doing cmake --build and
conda install -c anaconda libtool      # try to fix problem bellow 
conda install -c anaconda freetype  # try to fix problem

Then ROOT can not even built :frowning:, even I was trying to add more related packages.
My cmake commands and logs are

cd root
mkdir obj 
cd obj
cmake .. -DPYTHON_EXECUTABLE=/anaconda3/bin/python3.6 -DCMAKE_C_COMPILER=/anaconda3/bin/gcc -DCMAKE_CXX_COMPILER=/anaconda3/bin/g++
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /anaconda3/bin/cc
-- Check for working C compiler: /anaconda3/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /anaconda3/bin/c++
-- Check for working CXX compiler: /anaconda3/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ROOT default compression algorithm is lz4
-- Found GCC. Major version 4, minor version 8
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found a Mac OS X System 10.13
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Failed
-- ROOT Platform: macosx
-- ROOT Architecture: macosx64
-- Build Type: RelWithDebInfo
-- Compiler Flags:  -m64 -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -pthread -std=c++11
-- Looking for ZLib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Building freetype version 2.6.1 included in ROOT itself
-- Looking for PCRE
-- Found PCRE: /usr/local/include
-- Looking for LZMA
-- Found LZMA includes at /usr/local/include
-- Found LZMA library at /usr/local/lib/liblzma.dylib
-- Looking for xxHash
-- Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
-- xxHash not found. Switching on builtin_xxhash option
-- Looking for LZ4
-- Found LZ4: /opt/local/lib/liblz4.dylib (found version "1.8.3")
-- Found GIF: /usr/local/lib/libgif.dylib (found version "5.1.4")
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.0.9")
-- Found PNG: /usr/X11R6/lib/libpng.dylib (found version "1.6.26")
-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "90")
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Found GSL: /opt/local/include (found suitable version "2.5", minimum required is "1.10")
-- Found PythonInterp: /anaconda3/bin/python (found version "3.6.5")
-- Found PythonLibs: /anaconda3/lib/libpython3.6m.dylib (found version "3.6.5")
-- Found NUMPY: /anaconda3/lib/python3.6/site-packages/numpy/core/include (found version "1.15.3")
-- Looking for OpenGL
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Looking for gl2ps
-- Found GL2PS: /usr/local/lib/libgl2ps.dylib
-- Looking for LibXml2
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4")
-- Found OpenSSL: /usr/lib/libcrypto.dylib (found version "1.0.2p")
-- Looking for Castor
-- Could NOT find CASTOR (missing: CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR)
-- Castor not found. Switching off castor option
-- 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 PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found Sqlite: /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
-- Found fftw3 includes at /usr/local/include
-- Found fftw3 library at /usr/local/lib/libfftw3.a
-- Looking for CFITSIO
-- Found CFITSIO: /usr/local/include
-- Found CFITSIO version: 3.45
-- Looking for XROOTD
-- Found Xrootd version num: 4.8.3 (setting -DROOTXRDVERS=400080003)
--              libXrdMain not found: xproofd will be a wrapper around xrootd
--              include_dirs: /usr/local/include/xrootd;/usr/local/include/xrootd/private
--              libraries: /usr/local/lib/libXrdUtils.dylib;/usr/local/lib/libXrdClient.dylib;/usr/local/lib/libXrdCl.dylib
-- 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
-- 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 uuid: /usr/include
-- Davix not found, switching ON 'builtin_davix' option.
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for TBB
-- Found TBB: /opt/local (found version "2019.0")
-- Looking for VDT
-- Found VDT: /include
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /opt/local/lib/libopenblas.dylib
-- Enabled support for:  asimage astiff builtin_afterimage builtin_davix builtin_freetype builtin_ftgl builtin_glew builtin_llvm builtin_clang builtin_xxhash cling cocoa cxx11 davix exceptions explicitlink fftw3 fitsio gdml genvector http imt mathmore opengl pch python roofit shared sqlite ssl thread tmva tmva-cpu vdt xml xrootd
CMake Deprecation Warning at interpreter/llvm/src/CMakeLists.txt:15 (cmake_policy):
  The OLD behavior for policy CMP0051 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 ASM compiler identification is GNU
-- Found assembler: /anaconda3/bin/cc
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
CMake Warning (dev) at /opt/local/share/cmake-3.12/Modules/CheckIncludeFile.cmake:70 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    m

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  interpreter/llvm/src/cmake/config-ix.cmake:46 (check_include_file)
  interpreter/llvm/src/CMakeLists.txt:584 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /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
-- Found OCaml: /usr/local/bin/ocamlfind
-- OCaml bindings disabled, need ctypes >=0.4.
-- LLVM host triple: x86_64-apple-darwin17.7.0
-- LLVM default target triple: x86_64-apple-darwin17.7.0
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- SysLibs: tinfo;/usr/lib/libz.dylib
-- Targeting X86
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.6~dev
-- Cling will look for C++ headers in '/anaconda3/bin/../lib/gcc/../../gcc/include/c++:/anaconda3/bin/../lib/gcc/../../gcc/include/c++/x86_64-apple-darwin11.4.2:/anaconda3/bin/../lib/gcc/../../gcc/include/c++/backward' at runtime.
-- And if not found, will invoke: 'c++' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- 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 - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test CXX_HAS_Wno_deprecated_declarations
-- Performing Test CXX_HAS_Wno_deprecated_declarations - Success
-- Performing Test CXX_HAS_Wno_shadow
-- Performing Test CXX_HAS_Wno_shadow - Success
-- Performing Test CXX_HAS_Wno_nonnull_compare
-- Performing Test CXX_HAS_Wno_nonnull_compare - Success
-- Performing Test CXX_HAS_fno_strict_aliasing
-- Performing Test CXX_HAS_fno_strict_aliasing - Success
-- Performing Test CXX_HAS_Wno_parentheses_equality
-- Performing Test CXX_HAS_Wno_parentheses_equality - Success
-- Using TMVA-DNN with BLAS installation
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Failed
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- 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
Running /Applications/root/build/unix/compiledata.sh
Making /Applications/root/obj/include/compiledata.h
-- Configuring done
-- Generating done
-- Build files have been written to: /Applications/root/obj

The error massages are

Scanning dependencies of target mathtext
[ 28%] Building CXX object core/macosx/CMakeFiles/Macosx.dir/src/CocoaUtils.mm.o
[ 28%] Built target Unix
g++: error: /Applications/root/core/macosx/src/CocoaUtils.mm: Objective-C++ compiler not installed on this system
make[2]: *** [core/macosx/CMakeFiles/Macosx.dir/src/CocoaUtils.mm.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 28%] Building CXX object core/macosx/CMakeFiles/Macosx.dir/src/TMacOSXSystem.mm.o
g++: error: /Applications/root/core/macosx/src/TMacOSXSystem.mm: Objective-C++ compiler not installed on this system
make[2]: *** [core/macosx/CMakeFiles/Macosx.dir/src/TMacOSXSystem.mm.o] Error 1
make[1]: *** [core/macosx/CMakeFiles/Macosx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

Not sure if I made something wrong or missed any key step.

Many thanks,
J.F.

Meh. Anaconda comes with an old GCC that cannot do MacOS things. You’ll get a minimal ROOT without proper GUI if you go this route; you can do that by specifying -Dcocoa=Off.

But I’d recommend to not marry ROOT and Anaconda; the latter makes it very difficult to interface with it for C++ programs that use Objective-C++.

Cheers, Axel.

Hi Axel,

Many thanks for your reply. In the end, I gave up to bind ROOT with anaconda environment…

1 Like

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