Skip to content

Instantly share code, notes, and snippets.

@nbenn
Created October 8, 2018 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbenn/0a619eb3dd6829fefab04ad7226d3c9f to your computer and use it in GitHub Desktop.
Save nbenn/0a619eb3dd6829fefab04ad7226d3c9f to your computer and use it in GitHub Desktop.
Install xgboost r-pkg on Mac OS 10.14 with openMP
export C_INCLUDE_PATH=$(/usr/local/clang-7/bin/llvm-config --includedir)
export CPLUS_INCLUDE_PATH=$(/usr/local/clang-7/bin/llvm-config --includedir)
export LIBRARY_PATH=$(/usr/local/clang-7/bin/llvm-config --libdir)
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
cp make/config.mk config.mk
vi config.mk
# make edits such that
# export CC = /usr/local/clang-7/bin/clang
# export CXX = /usr/local/clang-7/bin/clang++
make
rm -r build
mkdir build
cd build
CC=/usr/local/clang-7/bin/clang CXX=/usr/local/clang-7/bin/clang++ cmake -DR_LIB=ON ..
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment