在Cygwin中安装xgboost时缺少execinfo.h

har*_*on4 15 c python gcc cygwin xgboost

我按照以下教程在Cygwin64中安装xgboost python包:

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

但是当在dmlc-core目录中执行make时,我收到以下错误:

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
Run Code Online (Sandbox Code Playgroud)

为什么我收到此错误?如果您需要更多信息,请告诉我.

Vad*_*tov 5

你可以#undef DMLC_LOG_STACK_TRACE在第45行的定义之后把它放在这里.请参阅本要点中的示例.

execinfo.h仅适用于Linux,但在此项目中,它仅用于在Linux上调试和打印堆栈跟踪.有一张支票在他们的代码库MinGW的,不知道为什么它没有被定义(他们已经禁用它,看到这个PR).

您应该尝试更改这些行并make再次运行.