diff --git a/Makefile b/Makefile index ac551974d..adcbabf49 100644 --- a/Makefile +++ b/Makefile @@ -33,18 +33,18 @@ include $(XGB_PLUGINS) # use customized config file ifndef CC -export CC = $(if $(shell which gcc-5),gcc-5,gcc) +export CC = $(if $(shell which gcc-6),gcc-6,gcc) endif ifndef CXX -export CXX = $(if $(shell which g++-5),g++-5,g++) +export CXX = $(if $(shell which g++-6),g++-6,g++) endif -# on Mac OS X, force brew gcc-5, since the Xcode c++ fails anyway +# on Mac OS X, force brew gcc-6, since the Xcode c++ fails anyway # it is useful for pip install compiling-on-the-fly OS := $(shell uname) ifeq ($(OS), Darwin) -export CC = $(if $(shell which gcc-5),gcc-5,clang) -export CXX = $(if $(shell which g++-5),g++-5,clang++) +export CC = $(if $(shell which gcc-6),gcc-6,clang) +export CXX = $(if $(shell which g++-6),g++-6,clang++) endif export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS) $(PLUGIN_LDFLAGS) diff --git a/doc/build.md b/doc/build.md index 21db4a52d..92d9541b3 100644 --- a/doc/build.md +++ b/doc/build.md @@ -69,7 +69,7 @@ See the following paragraph for OpenMP enabled xgboost. Here is the complete solution to use OpenMP-enabled compilers to install XGBoost. -Obtain gcc-5.x.x with openmp support by `brew install gcc --without-multilib`. (`brew` is the de facto standard of `apt-get` on OS X. So installing [HPC](http://hpc.sourceforge.net/) separately is not recommended, but it should work.). Installation of `gcc` can take a while (~ 30 minutes) +Obtain gcc-6.x.x with openmp support by `brew install gcc --without-multilib`. (`brew` is the de facto standard of `apt-get` on OS X. So installing [HPC](http://hpc.sourceforge.net/) separately is not recommended, but it should work.). Installation of `gcc` can take a while (~ 30 minutes) Now, clone the repository @@ -77,27 +77,7 @@ Now, clone the repository git clone --recursive https://github.com/dmlc/xgboost ``` -The next step is to update the compliers in xgboost's configuration file - -```bash -cd xgboost -``` - -Open make/config.mk file and replace the following two lines - -```bash -export CC = gcc -export CXX = g++ -``` - -with - -```bash -export CC = gcc-5 -export CXX = g++-5 -``` - -Now, build using the following commands +and build using the following commands ```bash cd ..; cp make/config.mk ./config.mk; make -j4 diff --git a/make/config.mk b/make/config.mk index ff6844617..508dbec3f 100644 --- a/make/config.mk +++ b/make/config.mk @@ -3,11 +3,11 @@ # # If you want to change the configuration, please use the following # steps. Assume you are on the root directory of xgboost. -# First copy the this file so that any local changes will be ignored by git +# First copy this file so that any local changes will be ignored by git # # $ cp make/config.mk . # -# Next modify the according entries, and then compile by +# Next modify the according entries in the copied file and then compile by # # $ make #