Hi. Can you provide with more information. The ROOT version, the full cmake command and its output. The file in error does fail because GCC_MAJOR is not defined.
Pere
So it seems like it does not display GCC_MAJOR and MINOR:
$ export CC=gcc
$ export CXX=g++
$ cmake /proper_path/root_src
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 5.1.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
-- Check for working C compiler: /usr/local/bin/gcc -- 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++
-- Check for working CXX compiler: /usr/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 4.2.1
-- 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
-- Found GCC. Major version , minor version
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Performing Test CXX_HAS_Wno-array-bounds
-- Performing Test CXX_HAS_Wno-array-bounds - Success
-- Performing Test CXX_HAS_Wno-strict-aliasing
-- Performing Test CXX_HAS_Wno-strict-aliasing - Success
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found a Mac OS X System 10.11
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test CXX_HAS_Wno_deprecated_declarations
-- Performing Test CXX_HAS_Wno_deprecated_declarations - Success
-- ROOT Platform: macosx
-- ROOT Architecture: macosx64
-- Build Type: RelWithDebInfo
-- Compiler Flags: -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -pthread -Wno-deprecated-declarations -O2 -g -DNDEBUG
-- Looking for ZLib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Looking for PCRE
-- Found PCRE version 8.37 using /usr/local/bin/pcre-config
-- Looking for LZMA
-- Found LZMA includes at /usr/local/include
-- Found LZMA library at /usr/local/lib/liblzma.dylib
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.0.6")
-- Found PNG: /usr/local/lib/libpng.dylib (found version "1.6.18")
-- Found JPEG: /usr/local/lib/libjpeg.dylib
-- Looking for GSL
-- FindGSL: gsl-config not found.
-- GSL not found. Set variable GSL_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 Python
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- Found Python interpreter version 2.7
-- Found PythonLibs: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib (found version "2.7.10")
-- Looking for GCCXML
-- Looking for OpenGL
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- 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.2")
-- Looking for OpenSSL
-- Found OpenSSL: /usr/lib/libssl.dylib;/usr/lib/libcrypto.dylib (found version "1.0.2d")
-- Looking for Castor
-- Castor not found. Switching off castor/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
-- 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.28")
-- 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.dylib
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing: CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
-- For the time being switching off 'fitsio' option
-- Support Shadow password not found. Switching off shadowpw option
-- Alien API not found. Set variable ALIEN_DIR to point to your Alien installation
-- For the time being switching OFF 'alien' option
-- Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation
-- For the time being switching OFF 'monalisa' option
-- Looking for XROOTD
-- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
-- Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally'
-- For the time being switching OFF 'xrootd' option
-- Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARIES)
-- 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
-- >>> Option 'chirp' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'glite' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'hdfs' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'pch' 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_ftgl builtin_freetype builtin_glew cintex cocoa exceptions explicitlink fftw3 fortran genvector krb5 ldap memstat opengl python reflex shared sqlite ssl thread tmva vdt xml
CMake Error at cint/cint/PlatformDependentSettings.cmake:97 (IF):
if given arguments:
"EQUAL" "3"
Unknown arguments specified
Call Stack (most recent call first):
cint/cint/CMakeLists.txt:47 (include)
-- Configuring incomplete, errors occurred!
See also "/..../CMakeOutput.log".
It seems that your gcc and gfortran come from a very old version 4.2.1 while your g++ is 5.1.0, so I think they will not play together (you need to upgrade your gcc and gfortran to 5.1.0).
Having different versions for C and C++ is no good. But there is still a problem with GCC_MAJOR and GCC_MINOR. What is the output of the command ‘/usr/local/bin/gcc -dumpversion’ ?
I’m sorry - a few minutes too late. After upgrading the gcc and gfortran ROOT compiled successfully. If you are still interested in the /usr/local/bin/gcc -dumpversion result, I can send it though.