Here's how I installed xgboost on my Mac. First, install gcc:
brew install gcc
Then clone the repo:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
cp make/config.mk .
inside config.mk make the following change:
export CC = gcc-7
export CXX = g++-7
then:
make -j4
cd python-package/
python setup.py install
this should install xgboost!