I take the next tutorial to install xgboost,however,when i the command "make -j4" ,i come across something wrong,why?
thanks.
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4
the erro log is:
g++: error: dmlc-core/libdmlc.a: No such file or directory
g++: error: rabit/lib/librabit_empty.a: No such file or directory
Makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: *** [lib/libxgboost.dll] Error 1
It seems you don't show all the errors to us.
Can you just use make
and show us the error message?
Same here:
_g++: error: dmlc-core/libdmlc.a: No such file or directory
g++: error: rabit/lib/librabit_empty.a: No such file or directory
Makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: ** [lib/libxgboost.dll] Error 1
mingw32-make: ** Waiting for unfinished jobs....
_
Installing on Win10 x64. Doing with the latest MinGW version.
UPDATE
solved accidentally:
1)Go to C:\mingw\mingw64\bin (your Mingw bin path)
2)Make a copy mingw32-make.exe -> make.exe (you got to have both of them in the bin path)
3) This:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4
I guess something is wrong with the alias, thats why we need make.exe exactly.
This was because we called make inside the Makefile @thirdwing Maybe we should update the instruction, or enable some kind of env variable in Makefile to use mingw32-make instead
In our latest tutorial https://github.com/dmlc/xgboost/blob/master/doc/build.md#building-on-windows
I have already added alias make='mingw32-make'
I see, if this is an common issue, let us add a trouble shooting section, to remind user to add the alias
After alias make='mingw32-make'
, I still get the same error...
System env: windows10 + mingw-w64
Here is my log:
g++: error: dmlc-core/libdmlc.a: No such file or directory
makefile:128: recipe for target 'xgboost' failed
mingw32-make: ** [xgboost] Error 1
mingw32-make: ** Waiting for unfinished jobs....
makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: *** [lib/libxgboost.dll] Error 1
a - build/learner.o
a - build/logging.o
a - build/common/common.o
a - build/c_api/c_api_error.o
a - build/c_api/c_api.o
a - build/data/simple_dmatrix.o
a - build/data/sparse_page_raw_format.o
a - build/data/data.o
a - build/data/simple_csr_source.o
a - build/data/sparse_page_writer.o
a - build/data/sparse_page_source.o
a - build/data/sparse_page_dmatrix.o
a - build/gbm/gbm.o
a - build/gbm/gblinear.o
a - build/gbm/gbtree.o
a - build/metric/multiclass_metric.o
a - build/metric/elementwise_metric.o
a - build/metric/rank_metric.o
a - build/metric/metric.o
a - build/objective/regression_obj.o
a - build/objective/rank_obj.o
a - build/objective/objective.o
a - build/objective/multiclass_obj.o
a - build/tree/tree_model.o
a - build/tree/updater_colmaker.o
a - build/tree/updater_skmaker.o
a - build/tree/updater_sync.o
a - build/tree/updater_refresh.o
a - build/tree/updater_histmaker.o
a - build/tree/tree_updater.o
a - build/tree/updater_prune.o
Can you show me the full log?
I as said previously only adding 'alias make='mingw32-make' is not enough.
The thing that helped me is making a copy of file mingw\bin\mingw32-make.exe -> make.exe so that bin path contains both of them.
I dont know exactly why but i guess alias doesnt make sense when making dependencies.
So, Alex, can you help to update the document by sending a PR?
On Mar 11, 2016 12:14 AM, "Alex Tro" [email protected] wrote:
I as said previously only adding 'alias make='mingw32-make' is not enough.
The thing that helped me is making a copy of file
mingw\bin\mingw32-make.exe -> make.exe so that bin path contains both of
them.I dont know exactly why but i guess when alias doesnt make sense when
making dependencies.—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/xgboost/issues/909#issuecomment-195193691.
Sure, but do we need any confirmation from pakchoi/smb that this really is a useful tip? (ama newbie here)
It really helped me. And I can confirm that just putting alias didn't help me. I had the same error.
I've copied make.exe to my path file, added alias - the error still persist for me. Last minigw version, win7, 64bit:
This is my error listing:
$ mingw32-make
cd dmlc-core; make libdmlc.a config=C:/Users/****/xgboost/config.mk; cd C:/User s/****/xgboost
C:/MinGW/bin/make.exe: error while loading shared libraries: ?: cannot open shar ed object file: No such file or directory
cd rabit; make lib/librabit_empty.a; cd C:/Users/****/xgboost
C:/MinGW/bin/make.exe: error while loading shared libraries: ?: cannot open shar ed object file: No such file or directory
ar crv lib/libxgboost.a
g++ -m64 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iincl ude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -sh ared -o lib/libxgboost.dll build/learner.o build/logging.o build/common/common.o build/c_api/c_api_error.o build/c_api/c_api.o build/data/simple_dmatrix.o build /data/sparse_page_raw_format.o build/data/data.o build/data/simple_csr_source.o build/data/sparse_page_writer.o build/data/sparse_page_source.o build/data/spars e_page_dmatrix.o build/gbm/gbm.o build/gbm/gblinear.o build/gbm/gbtree.o build/m etric/multiclass_metric.o build/metric/elementwise_metric.o build/metric/rank_me tric.o build/metric/metric.o build/objective/regression_obj.o build/objective/ra nk_obj.o build/objective/objective.o build/objective/multiclass_obj.o build/tree /tree_model.o build/tree/updater_colmaker.o build/tree/updater_skmaker.o build/t ree/updater_sync.o build/tree/updater_refresh.o build/tree/updater_histmaker.o b uild/tree/tree_updater.o build/tree/updater_prune.o dmlc-core/libdmlc.a rabit/li b/librabit_empty.a -pthread -lm -fopenmp
g++: error: dmlc-core/libdmlc.a: No such file or directory
g++: error: rabit/lib/librabit_empty.a: No such file or directory
Makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: *** [lib/libxgboost.dll] Error 1
Try to run building as in documentation:
$ cp make/mingw64.mk config.mk
$ make -j4
TDM version of minigw doesnt have any mingw\bin\mingw32-make.exe file, so how can fix the problem with missing libdmlc.a and librabit_empty.a files?
After making a copy, the complie errors are gone. But when import xgb, I get this:
Traceback (most recent call last):
File "test_basic.py", line 3, in
import xgboost as xgb
File "C:\Users\pakchoi\Anaconda2\lib\site-packages\xgboost-0.4-py2.7.egg\xgboost__init__.py", line 11, in
from .core import DMatrix, Booster
File "C:\Users\pakchoi\Anaconda2\lib\site-packages\xgboost-0.4-py2.7.egg\xgboost\core.py", line 83, in
_LIB = _load_lib()
File "C:\Users\pakchoi\Anaconda2\lib\site-packages\xgboost-0.4-py2.7.egg\xgboost\core.py", line 77, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "C:\Users\pakchoi\Anaconda2\lib\ctypes__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "C:\Users\pakchoi\Anaconda2\lib\ctypes__init__.py", line 365, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 127]
Problem fixed!
Follow this blog:
http://dnc1994.com/2016/03/installing-xgboost-on-windows/
@pakchoi , thank you for your work. It works fine on x64, but not in 32 bit.
$ mingw32-make
g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclu de -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c s rc/learner.cc -o build/learner.o
In file included from rabit/include/rabit/./internal/../serializable.h:11:0,
from rabit/include/rabit/./internal/engine.h:10,
from rabit/include/rabit/rabit.h:28,
from include/xgboost/learner.h:11,
from src/learner.cc:8:
rabit/include/rabit/./internal/.././internal/utils.h: In function 'FILE* rabit:: utils::FopenCheck(const char*, const char*)':
rabit/include/rabit/./internal/.././internal/utils.h:158:38: error: 'fopen64' wa s not declared in this scope
std::FILE *fp = fopen64(fname, flag);
^
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:
src/learner.cc: At global scope:
dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::__make__LearnerM odelParamParamManager__' 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__LearnerT rainParamParamManager__' 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);
^
Makefile:97: recipe for target 'build/learner.o' failed
mingw32-make: *** [build/learner.o] Error 1
same error trying to build multi-threaded XGB on mac. I dont think we use the mingw32-make. Any suggestions? Thanks very much.
same error on ubuntu w/ MKL, HDFS, distributed enabled.
Facing the same error on POWER8 machine and centos 7. I have removed the -msse2
flag in the Makefile, as was suggested here.
I am getting this error. I followed all steps:
$ git clone --recursive https://github.com/dmlc/xgboost
$ cd xgboost
$ git submodule init
$ git submodule update
$ cd dmlc-core
$ make -j4
$ cd ../rabit
$ make lib/librabit_empty.a -j4
$ cd ..
$ cp make/mingw64.mk config.mk
$ make -j4
when I run last command ; it throws error:
In file included from src/data/./simple_dmatrix.h:15:0,
from src/data/simple_dmatrix.cc:11:
src/data/././sparse_batch_page.h:238:46: error: 'function' is not a member of 's td'
std::function~~~
src/data/././sparse_batch_page.h:238:46: note: suggested alternative: 'is_functi on'
std::function~~~
is_function
src/data/././sparse_batch_page.h:238:46: error: 'function' is not a member of 's td'
src/data/././sparse_batch_page.h:238:46: note: suggested alternative: 'is_functi on'
std::function~~~
is_function
src/data/././sparse_batch_page.h:238:77: error: template argument 2 is invalid
std::function
src/data/././sparse_batch_page.h:238:79: error: expected '{' before '>' token
std::function
src/data/././sparse_batch_page.h:238:79: error: expected unqualified-id before ' >' token
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
from dmlc-core/include/dmlc/./registry.h:14,
from dmlc-core/include/dmlc/data.h:16,
from include/xgboost/data.h:11,
from src/data/simple_dmatrix.cc:7:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional
dmlc-core/include/dmlc/././parameter.h:513:7: required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
reinterpret_cast
^~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional
dmlc-core/include/dmlc/././parameter.h:872:9: required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punn ed pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast
^~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional
dmlc-core/include/dmlc/./././optional.h:134:11: required from 'std::ostream& d mlc::operator<<(std::ostream&, const dmlc::optional
dmlc-core/include/dmlc/././parameter.h:877:13: required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punne d pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast
^~~~~~~~~
Makefile:117: recipe for target 'build/data/simple_dmatrix.o' failed
mingw32-make:
mingw32-make: * Waiting for unfinished jobs....
@erseema, exactly the same issue. Exhausted. Waiting for a fix......
@llmercury , I managed to get Xgboost installed.
Follow the steps from here.
https://dnc1994.com/2016/03/installing-xgboost-on-windows/
Also, before this install MINGW from here. (don';t forget to check OpenMp checkbox)
.http://tdm-gcc.tdragon.net/download
(If you aren't able to run wget command then directly download Makefile form the link given on the blogpost (link shared above).
Hope u get it installed now!
Most helpful comment
Problem fixed!
Follow this blog:
http://dnc1994.com/2016/03/installing-xgboost-on-windows/