Home | News | Documentation | Download

Installation error OS X CocoaUtils

I’ve been trying to install ROOT on OS X 10.15.6 and running into an error with cocoa. I have seen this issue but the switch from cocoa to x11 does not solve my problem.

The error in question is:

**Scanning dependencies of target Unix**

[ 70%] Building CXX object core/unix/CMakeFiles/Unix.dir/src/TUnixSystem.cxx.o

[ 70%] Built target Unix

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGStmt.cpp.o

**Scanning dependencies of target Macosx**

[ 70%] Building CXX object core/macosx/CMakeFiles/Macosx.dir/src/CocoaUtils.mm.o

**cc1objplus:** **error:** argument to '**-O**' should be a non-negative integer, '**g**', '**s**' or '**fast**'

make[2]: *** [core/macosx/CMakeFiles/Macosx.dir/src/CocoaUtils.mm.o] Error 1

make[1]: *** [core/macosx/CMakeFiles/Macosx.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGStmtOpenMP.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGVTT.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGVTables.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenABITypes.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenAction.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenFunction.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenModule.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenPGO.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenTBAA.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CodeGenTypes.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ConstantInitBuilder.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CoverageMappingGen.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ItaniumCXXABI.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/MacroPPCallbacks.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/MicrosoftCXXABI.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ModuleBuilder.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ObjectFilePCHContainerOperations.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/SanitizerMetadata.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/SwiftCallingConv.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/TargetInfo.cpp.o

[ 70%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/VarBypassDetector.cpp.o

[ 70%] **Linking CXX static library ../../../../lib/libclangCodeGen.a**

[ 70%] Built target clangCodeGen

make: *** [all] Error 2

I have a suspicion that this may have something to do with a home-brew installation of gcc but I am unsure if this is the source of the problem and, if it is, how to solve it. For clarity ive included the full CMake stack trace.

gabrielbridges@Gabriels-MacBook-Pro root_build % cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_source

-- The C compiler identification is GNU 10.2.0

-- The CXX compiler identification is GNU 10.2.0

-- 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: /usr/local/bin/gcc-10

-- Check for working C compiler: /usr/local/bin/gcc-10 - 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: /usr/local/bin/g++-10

-- Check for working CXX compiler: /usr/local/bin/g++-10 - works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)")

-- Detected ROOT_VERSION 6.22.99

-- Looking for Python

-- Found Python3: /Users/gabrielbridges/.pyenv/shims/python3.8 (found version "3.8.0") found components: Interpreter Development NumPy

-- Found Python2: /usr/bin/python2.7 (found version "2.7.16") found components: Interpreter Development NumPy

-- ROOT default compression algorithm: zlib

-- PyROOT will be built for versions 3.8.0 (Main) and 2.7.16

-- Found GCC. Major version 10, minor version 2

-- 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 macOS system 10.15

-- Found an x86_64 system

-- Found GNU compiler collection

-- Performing Test GLIBCXX_USE_CXX11_ABI

-- Performing Test GLIBCXX_USE_CXX11_ABI - Success

-- ROOT Platform: macosx

-- ROOT Architecture: macosx64

-- Build Type: Release (flags = '-O3 -DNDEBUG')

-- Compiler Flags: -O3 -DNDEBUG -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -m64 -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -pthread

-- 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 (found version "8.44")

-- Looking for LZMA

-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib

-- Looking for lzma_auto_decoder in /usr/local/lib/liblzma.dylib - found

-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib

-- Looking for lzma_easy_encoder in /usr/local/lib/liblzma.dylib - found

-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib

-- Looking for lzma_lzma_preset in /usr/local/lib/liblzma.dylib - found

-- Found LibLZMA: /usr/local/lib/liblzma.dylib (found version "5.2.5")

-- 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

-- Found GIF: /usr/local/lib/libgif.dylib (found version "5.2.1")

-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.3.0")

-- Found PNG: /usr/local/lib/libpng.dylib (found version "1.6.37")

-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "90")

-- 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")

-- 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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/OpenGL.framework

-- Looking for GLEW

-- Could NOT find GLEW (missing: GLEW_INCLUDE_DIRS GLEW_LIBRARIES)

-- GLEW not found. Switching on builtin_glew option

-- 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/gabrielbridges/Root/root_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/MacOSX11.0.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)

-- 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/MacOSX11.0.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 TBB_LIBRARY) (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

-- Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY) (Required is at least version "0.4")

-- VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH

-- Switching ON 'builtin_vdt' option

-- 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/MacOSX11.0.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 GNU

-- Found assembler: /usr/local/bin/gcc-10

-- 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/MacOSX11.0.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-darwin19.6.0

-- LLVM default target triple: x86_64-apple-darwin19.6.0

-- Building with -fPIC

-- Found PythonInterp: /Users/gabrielbridges/.pyenv/shims/python3.8 (found version "3.8")

-- 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 '/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/x86_64-apple-darwin19/10.2.0/../../../../../../include/c++/10.2.0:/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/x86_64-apple-darwin19/10.2.0/../../../../../../include/c++/10.2.0/x86_64-apple-darwin19:/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/x86_64-apple-darwin19/10.2.0/../../../../../../include/c++/10.2.0/backward' at runtime.

-- And if not found, will invoke: '/usr/local/bin/g++-10 ' for them.

-- Performing Test CXX_HAS_Wno_maybe_uninitialized

-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success

-- Performing Test __result

-- Performing Test __result - 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

-- 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 - 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

-- Performing Test has_found_attribute_noinline

-- Performing Test has_found_attribute_noinline - Success

Running /Users/gabrielbridges/Root/root_source/build/unix/compiledata.sh

Making /Users/gabrielbridges/Root/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_tbb builtin_vdt builtin_xrootd builtin_xxhash builtin_zstd clad cocoa dataframe exceptions gdml http imt 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/gabrielbridges/Root/root_build

ROOT Version: 6-22-00
Platform: Mac OsX Catalina 10.15.6
Compiler: GCC-10 (I think)


Hi @Gabriel,

It seems that you are still not passing the suggested options to CMake. I would suggest to remove CMakeCache.txt and re-run CMake as follows:

$ # cd /path/to/your/ROOT/build/directory/
$ rm -f CMakeCache.txt
$ cmake -Dcocoa=OFF -Dx11=ON -DCMAKE_INSTALL_PREFIX=../root_install ../root_source

Cheers,
J.

Yes, I tried that and it did not resolve the problem. The stack trace I included is from the installation attempt with Cocoa but I did use the the cocoa=OFF and x11=ON options to no avail.

Hi @Gabriel,

Are you building with make or ninja? Could you build in verbose mode, e.g. $ make VERBOSE=1, so that we can see the compiler command line?

Cheers,
J.