Permalink
Browse files

Fixed OpenMP installation on MacOSX with gcc-6 (#1460)

* Fixed OpenMP installation on MacOSX with gcc-6

- Modified makefile from gcc-5 to gcc-6
- Removed deprecated install instructions from doc (gcc-5 was automatically forced if available in makefile on OSX)

* Fixed OpenMP installation on MacOSX with gcc-6

- Modified makefile from gcc-5 to gcc-6
- Removed deprecated install instructions from doc (gcc-5 was automatically forced if available in makefile on OSX)
1 parent 93e8513 commit d754ce7dc19e0d7c7465999d464e13f9bf21b40d @ghego ghego committed with tqchen Aug 22, 2016
Showing with 9 additions and 29 deletions.
  1. +5 −5 Makefile
  2. +2 −22 doc/build.md
  3. +2 −2 make/config.mk
View
@@ -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)
View
@@ -69,35 +69,15 @@ 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
```bash
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
View
@@ -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
#

0 comments on commit d754ce7

Please sign in to comment.