Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

execinfo.h missing when installing xgboost in Cygwin

I've follow the following tutorial in order to install xgboost python package within Cygwin64:

https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows

But when executing the make in dmlc-core directory I get the following errors:

harrison4@mypc ~/xgboost/dmlc-core
$ mingw32-make -j4
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude  -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o line_split.o src/io/line_split.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude  -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o recordio_split.o src/io/recordio_split.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude  -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o input_split_base.o src/io/input_split_base.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude  -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o io.o src/io.cc
src/io/line_split.cc:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es independiente de posición)
 // Copyright by Contributors
 ^
src/io.cc:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es independiente de posición)
 // Copyright by Contributors
 ^
src/io/input_split_base.cc:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es independiente de posición)
 // Copyright by Contributors
 ^
src/io/recordio_split.cc:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es independiente de posición)
 // Copyright by Contributors
 ^
In file included from include/dmlc/io.h:14:0,
                 from src/io/line_split.cc:2:
include/dmlc/./logging.h:18:22: error fatal: execinfo.h: No such file or directory
compilación terminada.
Makefile:83: recipe for target 'line_split.o' failed
mingw32-make: *** [line_split.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from src/io/input_split_base.cc:2:0:
include/dmlc/logging.h:18:22: error fatal: execinfo.h: No such file or directory
compilación terminada.
In file included from include/dmlc/io.h:14:0,
                 from src/io.cc:4:
include/dmlc/./logging.h:18:22: error fatal: execinfo.h: No such file or directory
compilación terminada.
Makefile:83: recipe for target 'input_split_base.o' failed
mingw32-make: *** [input_split_base.o] Error 1
Makefile:83: recipe for target 'io.o' failed
mingw32-make: *** [io.o] Error 1
In file included from include/dmlc/./io.h:14:0,
                 from include/dmlc/recordio.h:12,
                 from src/io/recordio_split.cc:2:
include/dmlc/././logging.h:18:22: error fatal: execinfo.h: No such file or directory
compilación terminada.
Makefile:83: recipe for target 'recordio_split.o' failed
mingw32-make: *** [recordio_split.o] Error 1

Why am I getting this error? Let me know if you need more information, please.

like image 446
mllamazares Avatar asked May 22 '17 09:05

mllamazares


1 Answers

You can put #undef DMLC_LOG_STACK_TRACE right after it's definition on line 45 here. See example in this gist.

execinfo.h is only available on Linux, but in this project it is used only for debugging and printing stack trace on Linux. There is a check for Mingw in their codebase, don't know why it is not defined (they've disabled it, see this PR).

You should try to change those lines and run make again.

like image 185
Vadim Kotov Avatar answered Oct 06 '22 10:10

Vadim Kotov