Multithread R installation fails macOS Mojave 10.14.2


#1

Hi There, I’ve been trying to install xgboost with multithread support in R.

I followed the instructions here,

brew install gcc@7
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake .. -DR_LIB=ON
make -j4
make install

but when I try and actually run make -j4, I get the following error

[  4%] Built target rabit
[ 24%] Built target dmlc
[ 98%] Built target objxgboost
[100%] Linking CXX shared library xgboost.so
ld: framework not found R
collect2: error: ld returned 1 exit status
make[2]: *** [xgboost.so] Error 1
make[1]: *** [CMakeFiles/xgboost.dir/all] Error 2
make: *** [all] Error 2

I’ve exhausted my google abilities on this so thought I’d ask here.

Thanks!

System information

Using R version 3.5.2 (2018-12-20) – “Eggshell Igloo”
ProductName: Mac OS X
ProductVersion: 10.14.2
BuildVersion: 18C54
abalone:build danovan$ R

Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: Intel Core i9
Processor Speed: 2.9 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Memory: 32 GB
Boot ROM Version: 220.230.16.0.0 (iBridge: 16.16.2542.0.0,0)
Serial Number (system): C02XJ4K8JGH6
Hardware UUID: 6AE66135-8881-5AA7-9BA3-33C812131F12

#2

How did you install R?


#3

Thanks for taking a look at this, I used the .pkg installer from CRAN


#4

I tried installing R from homebrew as well and that didn’t fix it either


#5

Same steps, config and error here too.