Here is the process I tried to install xgboost:
git clone --recursive https://github.com/dmlc/xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
It was good until I ran the code in my git bash
make -j4
It goes wrong:
F:/mingw64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE* std::fopen(const char*, const char*)' should have been declared inside 'std'
FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode);
^
F:/mingw64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE* std::fopen(const char*, const char*)' conflicts with a previous declaration
F:/mingw64/x86_64-w64-mingw32/include/stdio.h:449:17: note: previous declaration 'FILE* fopen(const char*, const char*)'
FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^
Makefile:97: recipe for target 'build/c_api/c_api_error.o' failed
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from dmlc-core/include/dmlc/registry.h:14:0,
from include/xgboost/./gbm.h:11,
from include/xgboost/learner.h:16,
from src/learner.cc:8:
dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::__make__LearnerModelParamParamManager__' defined but not used [-Wunused-variable]
static ::dmlc::parameter::ParamManager &__make__ ## PType ## ParamManager__ = \
^
src/learner.cc:107:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER'
DMLC_REGISTER_PARAMETER(LearnerModelParam);
^
dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::__make__LearnerTrainParamParamManager__' defined but not used [-Wunused-variable]
static ::dmlc::parameter::ParamManager &__make__ ## PType ## ParamManager__ = \
^
src/learner.cc:108:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER'
DMLC_REGISTER_PARAMETER(LearnerTrainParam);
I find some reference which shows the reason may be related to the difference between the windows system and Unix, but it is beyond my konwledge.
I installed mingw64