Closed ben519 closed 7 years ago
I recently tried to install XGBoost on my macbook and also ran into some problems. I did some search and found that the key issue is the to find the right complier for XGBoost for Mac OSX. For your problem, my understanding is that gcc and clang are two different compliers. clang from XCode does not support OpenMP. So I tried to install clang-omp.
In my case, I installed clang-omp by brew install clang-omp It works for me.
Hope this helps.
I think I got it, although I'm not sure how. One last thing though - after I build
the package, how do I install it? I'm looking for a ".tar.gz" file for which I can do install.packages(path_to_file, repos = NULL, type="source")
. Is this incorrect? Or, where is the .tar file for me to install?
Running into yet another problem :(
library(devtools)
devtools::install('/Users/Ben/xgboost/R-package')
output
Installing xgboost
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL '/Users/Ben/xgboost/R-package' \
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests
* installing *source* package ‘xgboost’ ...
** libs
g++-5 -std=c++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../..//include -I../..//dmlc-core/include -I../..//rabit/include -I../../ -DXGBOOST_STRICT_R_MODE=1 -DDMLC_LOG_BEFORE_THROW=0 -DDMLC_ENABLE_STD_THREAD=1 -DDMLC_DISABLE_STDIN=1 -DDMLC_LOG_CUSTOMIZE=1 -DXGBOOST_CUSTOMIZE_LOGGER=1 -DRABIT_CUSTOMIZE_MSG_ -DRABIT_STRICT_CXX98_ -I/usr/local/opt/llvm/include -fopenmp -fPIC -Wall -mtune=core2 -g -O2 -c xgboost_R.cc -o xgboost_R.o
In file included from ../..//dmlc-core/include/dmlc/logging.h:10:0,
from xgboost_R.cc:2:
/usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/cstdio:42:19: fatal error: stdio.h: No such file or directory
compilation terminated.
make: *** [xgboost_R.o] Error 1
ERROR: compilation failed for package ‘xgboost’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/xgboost’
Error: Command failed (1)
I'll probably give up for now - the time I'll spend on this might not be worth the time saved by using multi-threading. Would love to revisit and get it working. Any help would be greatly appreciated!
I worked through the installation process again. Still unsuccessful, but I documented my steps very clearly in this StackOverflow question. Hoping this will help someone easily spot my error.
I'm trying to install xgboost with multi-threading for R. I had this working on OSX 10.11 but I recently upgraded to 10.12.1 and now I'm running into some trouble. Note that I'm following the instructions in building-on-osx.
First I ran
brew install homebrew/versions/gcc6
No errors, but note the Caveat. Now if I try
I get nothing. I read in another issue-thread that this means the installation was unsuccessful (see here). Also note the following
Not sure if this is relevant, but I use R's
data.table
package which enables multi-threading so I've already (successfully) followed their openmp-enabled-compiler-for-mac instructions. Could it be causing a conflict?