Wednesday, May 31, 2017

execinfo.h missing when installing xgboost in Cygwin

Leave a Comment

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.

1 Answers

Answers 1

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.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment