Hi all,
I just got compiler errors while I am trying to build root from source in my laptop (Mac OS 10.14.2, Mojave) with g++-8 compiler.
First I got an error as:
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'
As suggested in this topic - Mac os x, gcc-6 compile error, I should switch to X11 other than cocoa.
But I just found that X11 is no longer included with Mac, so I just installed the XQUARTZ, then I trying to cmake it with:
cmake ../source -Dcocoa=OFF -Dx11=ON
And I got another error as
[ 70%] Building CXX object rootx/CMakeFiles/root.dir/src/rootx.cxx.o
In file included from /Users/cheng/Software/root/source/graf3d/glew/src/glew.c:49:
/Users/cheng/Software/root/build_v6-14-04/include/GL/glxew.h:94:10: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
Below I pasted the log file of cmake ../source -Dcocoa=OFF -Dx11=ON
:
-- ROOT default compression algorithm is zlib
-- Found GCC. Major version 8, minor version 2
-- Found a Mac OS X System 10.14
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: macosx
-- ROOT Architecture: macosx64
-- Build Type: RelWithDebInfo
-- Compiler Flags: -Wno-implicit-fallthrough -Wno-noexcept-type -m64 -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common -pthread -std=c++11
-- 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
-- Looking for X11
-- 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 OpenGL
-- Looking for LibXml2
-- Looking for SQLite
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Looking for BLAS for optional parts of TMVA
-- Enabled support for: asimage astiff builtin_afterimage builtin_davix builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_clang builtin_lzma builtin_lz4 builtin_openssl builtin_pcre builtin_tbb builtin_vdt builtin_xxhash cling cxx11 davix exceptions explicitlink gdml genvector http imt opengl pch python roofit shared sqlite ssl thread tmva tmva-cpu vdt x11 xft xml
-- Found libtool - /Library/Developer/CommandLineTools/usr/bin/libtool
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Found ld64 - /Library/Developer/CommandLineTools/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-darwin18.2.0
-- LLVM default target triple: x86_64-apple-darwin18.2.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 '/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin18.0.0/8.2.0/../../../../../../include/c++/8.2.0:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin18.0.0/8.2.0/../../../../../../include/c++/8.2.0/x86_64-apple-darwin18.0.0:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin18.0.0/8.2.0/../../../../../../include/c++/8.2.0/backward' at runtime.
-- And if not found, will invoke: '/usr/local/bin/g++-8 ' for them.
-- Using TMVA-DNN with BLAS installation
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/cheng/Software/root/build_v6-14-04
ROOT Version: root_v6-14-04
Platform: Mac OS Mojave 10.14.2
Compiler: g++-8