Xgboost: g++: error: libgomp.spec: No such file or directory

Created on 22 Mar 2016  路  3Comments  路  Source: dmlc/xgboost

Hi folks,

I am trying to install xgboost on my window7-64 bit machine. It kept encoutering this problem. Not sure what I should do.
I did exactly as the thread http://xgboost.readthedocs.org/en/latest/build.html. And also renamed the mingw32-make.exe to make. exe. I am using the TDM-GCC compiler. The full error message is:

ar cr libdmlc.a line_split.o recordio_split.o input_split_base.o io.o local_filesys.o data.o recordio.o config.o
make[1]: Leaving directory 'C:/Users/hxu/xgboost/dmlc-core'
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -openmp -o xgboost  build/cli_main.o 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/siple_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_age_source.o build/data/sparse_page_dmatrix.o build/gbm/gbm.o build/gbm/gblinear.o build/gbm/gbtree.o build/metric/multiclass_metric.o build/metric/eementwise_metric.o build/metric/rank_metric.o build/metric/metric.o build/objective/regression_obj.o build/objective/rank_obj.o build/objective/objecive.o build/objective/multiclass_obj.o build/tree/tree_model.o build/tree/updater_colmaker.o build/tree/updater_skmaker.o build/tree/updater_sync.o bild/tree/updater_refresh.o build/tree/updater_histmaker.o build/tree/tree_updater.o build/tree/updater_prune.o dmlc-core/libdmlc.a rabit/lib/librabitempty.a  -pthread -lm  -fopenmp
ar crv lib/libxgboost.a 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_dmatrixo 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. build/data/sparse_page_dmatrix.o build/gbm/gbm.o build/gbm/gblinear.o build/gbm/gbtree.o build/metric/multiclass_metric.o build/metric/elementwise_mtric.o build/metric/rank_metric.o build/metric/metric.o build/objective/regression_obj.o build/objective/rank_obj.o build/objective/objective.o buildobjective/multiclass_obj.o build/tree/tree_model.o build/tree/updater_colmaker.o build/tree/updater_skmaker.o build/tree/updater_sync.o build/tree/upater_refresh.o build/tree/updater_histmaker.o build/tree/tree_updater.o build/tree/updater_prune.o
g++: error: libgomp.spec: No such file or directory
Makefile:128: recipe for target 'xgboost' failed
mingw32-make: *** [xgboost] Error 1
mingw32-make: *** Waiting for unfinished jobs....
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -openmp -shared -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/smple_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/sparsepage_source.o build/data/sparse_page_dmatrix.o build/gbm/gbm.o build/gbm/gblinear.o build/gbm/gbtree.o build/metric/multiclass_metric.o build/metric/lementwise_metric.o build/metric/rank_metric.o build/metric/metric.o build/objective/regression_obj.o build/objective/rank_obj.o build/objective/objetive.o build/objective/multiclass_obj.o build/tree/tree_model.o build/tree/updater_colmaker.o build/tree/updater_skmaker.o build/tree/updater_sync.o uild/tree/updater_refresh.o build/tree/updater_histmaker.o build/tree/tree_updater.o build/tree/updater_prune.o dmlc-core/libdmlc.a rabit/lib/librabi_empty.a -pthread -lm  -fopenmp
g++: error: libgomp.spec: No such file or directory
Makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: *** [lib/libxgboost.dll] Error 1

Thanks, any help appreciated.

Most helpful comment

@hx364
I found out that, it's due to the default installation of TDM-GCC is without openmp support. So you could reinstalled TDM-GCC and make sure you check the gcc option and select the openmp like below.
It solved my problem.

blog-tdm-gcc-openmp

All 3 comments

libgomp is needed for OpenMP support, so I think your compiler might not have good support for OpenMP.

I got similar error:

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/leg++: error: libgomp.spec: No such file or dir
ectory

on windows x64, using TDM-GCC compiler

@hx364
I found out that, it's due to the default installation of TDM-GCC is without openmp support. So you could reinstalled TDM-GCC and make sure you check the gcc option and select the openmp like below.
It solved my problem.

blog-tdm-gcc-openmp

Was this page helpful?
0 / 5 - 0 ratings