I am trying to install xgboost on RedHat Linux.
It looks like the key error is
make: *** No rule to make target `../..//amalgamation/xgboost-all0.o', needed by `xgboost.so'. Stop.
I have a hard time troubleshooting compilation errors like the one I'm getting here so any general advice would be great. How do I know if this is a dependency issue on my system or a bug in the package?
Thanks!
> install_github("dmlc/xgboost", subdir = "R-package")
Downloading GitHub repo dmlc/xgboost@master
✓ checking for file ‘/tmp/Rtmp2H0RtM/remotes2dcd7e4a1cf2/dmlc-xgboost-6601a64/R-package/DESCRIPTION’ ...
─ preparing ‘xgboost’:
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘xgboost_1.1.0.1.tar.gz’
Warning: file 'xgboost/cleanup' did not have execute permissions: corrected
Warning: file 'xgboost/configure' did not have execute permissions: corrected
Warning: invalid uid value replaced by that for user 'nobody'
Warning: invalid gid value replaced by that for user 'nobody'
Installing package into ‘/home/ablack/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘xgboost’ ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking Backtrace lib...
checking for backtrace in -lexecinfo... no
checking endian...
configure: creating ./config.status
config.status: creating src/Makevars
** libs
Makevars:17: -DXGBOOST_STRICT_R_MODE=1
Makevars:17: -DDMLC_LOG_BEFORE_THROW=0
Makevars:17: -DDMLC_ENABLE_STD_THREAD=1
Makevars:17: -DDMLC_DISABLE_STDIN=1
Makevars:17: -DDMLC_LOG_CUSTOMIZE=1
Makevars:17: -DXGBOOST_CUSTOMIZE_LOGGER=1
Makevars:17: -DRABIT_CUSTOMIZE_MSG_
Makevars:17: -DRABIT_STRICT_CXX98_
g++ -std=gnu++11 -I"/opt/R/3.5.1/lib64/R/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/include -fopenmp -DDMLC_CMAKE_LITTLE_ENDIAN=1 -pthread -fpic -g -O2 -c xgboost_R.cc -o xgboost_R.o
g++ -std=gnu++11 -I"/opt/R/3.5.1/lib64/R/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/include -fopenmp -DDMLC_CMAKE_LITTLE_ENDIAN=1 -pthread -fpic -g -O2 -c xgboost_custom.cc -o xgboost_custom.o
gcc -std=gnu99 -I"/opt/R/3.5.1/lib64/R/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/include -fpic -g -O2 -c xgboost_assert.c -o xgboost_assert.o
gcc -std=gnu99 -I"/opt/R/3.5.1/lib64/R/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/include -fpic -g -O2 -c init.c -o init.o
make: *** No rule to make target `../..//amalgamation/xgboost-all0.o', needed by `xgboost.so'. Stop.
make: *** Waiting for unfinished jobs....
xgboost_custom.cc:5:29: fatal error: xgboost/logging.h: No such file or directory
#include <xgboost/logging.h>
^
compilation terminated.
xgboost_R.cc:2:26: fatal error: dmlc/logging.h: No such file or directory
#include <dmlc/logging.h>
^
compilation terminated.
make: *** [xgboost_custom.o] Error 1
make: *** [xgboost_R.o] Error 1
ERROR: compilation failed for package ‘xgboost’
* removing ‘/home/awblack@mmcf.mehealth.org/R/x86_64-pc-linux-gnu-library/3.5/xgboost’
Error: Failed to install 'xgboost' from GitHub:
(converted from warning) installation of package ‘/tmp/Rtmp2H0RtM/file2dcd63b633a4/xgboost_1.1.0.1.tar.gz’ had non-zero exit status