【发布时间】:2016-07-12 16:23:20
【问题描述】:
我正在尝试在these instructions 之后为 Python 构建 XGBoost 包:
这是使用支持 OpenMP 的编译器安装 XGBoost 的完整解决方案。通过
brew install gcc --without-multilib获取支持openmp 的gcc-5.x.x。 (brew 是 OS X 上 apt-get 的事实标准。因此不建议单独安装 HPC,但应该可以。):
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/config.mk ./config.mk; make -j4
这个错误恰好出现在make -j4 命令中。
在搜索之前,我已经尝试了这两种解决方案(1 和2),但无济于事,除了安装另一个 gcc 的部分,因为害怕搞砸一切。
下面是make 配置文件。它没有任何可疑之处。
#-----------------------------------------------------
# xgboost: the configuration compile script
#
# 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
#
# $ cp make/config.mk .
#
# Next modify the according entries, and then compile by
#
# $ make
#
# or build in parallel with 8 threads
#
# $ make -j8
#----------------------------------------------------
# choice of compiler, by default use system preference.
# export CC = gcc
# export CXX = g++
# export MPICXX = mpicxx
# the additional link flags you want to add
ADD_LDFLAGS =
# the additional compile flags you want to add
ADD_CFLAGS =
# Whether enable openmp support, needed for multi-threading.
USE_OPENMP = 1
# whether use HDFS support during compile
USE_HDFS = 0
# whether use AWS S3 support during compile
USE_S3 = 0
# whether use Azure blob support during compile
USE_AZURE = 0
# Rabit library version,
# - librabit.a Normal distributed version.
# - librabit_empty.a Non distributed mock version,
LIB_RABIT = librabit.a
# path to libjvm.so
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
# List of additional plugins, checkout plugin folder.
# uncomment the following lines to include these plugins
# you can also add your own plugin like this
#
# XGB_PLUGINS += plugin/example/plugin.mk
【问题讨论】:
-
仔细阅读Makefile中的cmets。