Error compiling ROOT5.34.36 OSX Sierra with Apple Clang

Not sure if it will help, but in debian wheezy it worked for me after doing sth like:

unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
export LD_LIBRARY_PATH=/usr/local/lib64/
#(or the path where the gcc related libs are located)
cmake ../root -DCMAKE_CXX_COMPILER=/usr/local/bin/c++-4.8 -DCMAKE_C_COMPILER=/usr/local/bin/gcc-4.8 -DCMAKE_Fortran_COMPILER=/usr/local/bin/gfortran-4.8
make

Check ROOT 6 build from source error gcc 4.7.2

You could also post the output of “printenv”.