I'm trying to build multithread supporting xgboost according to this guide. So i made fist three steps. But when i run:
cd xgboost
make
i get this message:
/Users/user/clang-omp/build/bin/clang++ -c -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -fopenmp -fopenmp -fPIC -o updater.o src/tree/updater.cpp
src/tree/updater.cpp:5:10: fatal error: 'cstring' file not found
#include <cstring>
^
1 error generated.
make: *** [updater.o] Error 1
What am i doing wrong?
System: Mac OS X 10.10.4
P.S. I've tried to set system variables like in this post, but it didn't work.
Solved: Just found file "cstring" on my mac. There were some variants. I took folder:/usr/local/Cellar/clang-omp/2015-04-01/libexec/include/c++/v1/ and set variables:
export CPLUS_INCLUDE_PATH=/usr/local/Cellar/clang-omp/2015-04-01/libexec/include/c++/v1/:
export C_INCLUDE_PATH=/usr/local/Cellar/clang-omp/2015-04-01/libexec/include/c++/v1/:
It wasn't the end of the story. Another mistake occured:
Undefined symbols for architecture x86_64:
"__ZNKSs7compareEPKc", referenced from:
__ZN7xgboost14BoostLearnTask3RunEiPPc in main.o
__ZN7xgboost7learner12BoostLearner10InitObjGBMEv in main.o
__ZN7xgboost14BoostLearnTask8InitDataEv in main.o
...
Solved in this post. So I just correct Makefile like this:
export CC = clang-omp++
export CXX = clang-omp++
And it's worked.