You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
_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
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
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" notifications@github.com 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 #909 (comment).
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]
@pakchoi , thank you for your work. It works fine on x64, but not in 32 bit.
$ mingw32-makeg++ -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.dg++ -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.oIn 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' failedmingw32-make: *** [build/learner.o] Error 1
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<SparsePage::Format* ()> > {
^~~~~~~~
src/data/././sparse_batch_page.h:238:46: note: suggested alternative: 'is_functi on'
std::function<SparsePage::Format* ()> > {
^~~~~~~~
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<SparsePage::Format* ()> > {
^~~~~~~~
is_function
src/data/././sparse_batch_page.h:238:77: error: template argument 2 is invalid
std::function<SparsePage::Format* ()> > {
^
src/data/././sparse_batch_page.h:238:79: error: expected '{' before '>' token
std::function<SparsePage::Format* ()> > {
^
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: :~optional() [with T = int]':
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<T*>(&val)->~T();
^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional::value() const [with T = int]':
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<const T>(&val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11: required from 'std::ostream& d mlc::operator<<(std::ostream&, const dmlc::optional&) [with T = int; std::ost ream = std::basic_ostream]'
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<const T>(&val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:117: recipe for target 'build/data/simple_dmatrix.o' failed
mingw32-make: *** [build/data/simple_dmatrix.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
Activity
thirdwing commentedon Mar 4, 2016
It seems you don't show all the errors to us.
Can you just use
make
and show us the error message?funkindy commentedon Mar 5, 2016
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.
tqchen commentedon Mar 7, 2016
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
thirdwing commentedon Mar 7, 2016
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'
tqchen commentedon Mar 7, 2016
I see, if this is an common issue, let us add a trouble shooting section, to remind user to add the alias
pakchoi commentedon Mar 11, 2016
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
thirdwing commentedon Mar 11, 2016
Can you show me the full log?
funkindy commentedon Mar 11, 2016
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.
thirdwing commentedon Mar 11, 2016
So, Alex, can you help to update the document by sending a PR?
On Mar 11, 2016 12:14 AM, "Alex Tro" notifications@github.com wrote:
funkindy commentedon Mar 11, 2016
Sure, but do we need any confirmation from pakchoi/smb that this really is a useful tip? (ama newbie here)
maxceem commentedon Mar 16, 2016
It really helped me. And I can confirm that just putting alias didn't help me. I had the same error.
Diyago commentedon Mar 16, 2016
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:
maxceem commentedon Mar 17, 2016
Try to run building as in documentation:
BaydinAlexey commentedon Mar 17, 2016
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?
pakchoi commentedon Mar 18, 2016
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]
pakchoi commentedon Mar 20, 2016
Problem fixed!
Follow this blog:
http://dnc1994.com/2016/03/installing-xgboost-on-windows/
Diyago commentedon Mar 21, 2016
@pakchoi , thank you for your work. It works fine on x64, but not in 32 bit.
souljourner commentedon Feb 20, 2017
same error trying to build multi-threaded XGB on mac. I dont think we use the mingw32-make. Any suggestions? Thanks very much.
Natural209X commentedon Feb 23, 2017
same error on ubuntu w/ MKL, HDFS, distributed enabled.
abhijithch commentedon Mar 8, 2017
Facing the same error on POWER8 machine and centos 7. I have removed the
-msse2
flag in the Makefile, as was suggested here.erseema commentedon May 5, 2017
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<SparsePage::Format* ()> > {
^~~~~~~~
src/data/././sparse_batch_page.h:238:46: note: suggested alternative: 'is_functi on'
std::function<SparsePage::Format* ()> > {
^~~~~~~~
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<SparsePage::Format* ()> > {
^~~~~~~~
is_function
src/data/././sparse_batch_page.h:238:77: error: template argument 2 is invalid
std::function<SparsePage::Format* ()> > {
^
src/data/././sparse_batch_page.h:238:79: error: expected '{' before '>' token
std::function<SparsePage::Format* ()> > {
^
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: :~optional() [with T = int]':
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<T*>(&val)->~T();
^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional::value() const [with T = int]':
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<const T>(&val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::opt ional::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11: required from 'std::ostream& d mlc::operator<<(std::ostream&, const dmlc::optional&) [with T = int; std::ost ream = std::basic_ostream]'
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<const T>(&val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:117: recipe for target 'build/data/simple_dmatrix.o' failed
mingw32-make: *** [build/data/simple_dmatrix.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
llmercury commentedon May 5, 2017
@erseema, exactly the same issue. Exhausted. Waiting for a fix......
erseema commentedon May 6, 2017
@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!