Issue with libxgboost.so while build demo/c-api


#1

HI Team,

I am working on C/C++ project where I need to use XGboost. I have compiled Xgboost V0.90 successfully in mu linux system. After installation I can see Xgboost binary and lib/xgboost.so . Now I am trying to use the same at demo C/C++ program. I am trying to build xgboost/demo/c-api using make. But during build i am getting following error.

gcc -std=c99 -O3 -I…/…/include -I…/…/dmlc-core/include -I…/…/rabit/include -L…/…/lib -o c-api-demo c-api-demo.c -lxgboost
/usr/bin/ld: skipping incompatible /usr/lib/…/lib/libc.so when searching for -lc
…/…/lib/libxgboost.so: undefined reference to std::__throw_regex_error(std::regex_constants::error_type)@GLIBCXX_3.4.15' ../../lib/libxgboost.so: undefined reference tostd::__throw_bad_function_call()@GLIBCXX_3.4.14
…/…/lib/libxgboost.so: undefined reference to std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const@GLIBCXX_3.4.18' ../../lib/libxgboost.so: undefined reference totypeinfo for std::regex_error@GLIBCXX_3.4.15’
…/…/lib/libxgboost.so: undefined reference to __cxa_thread_atexit@CXXABI_1.3.7' ../../lib/libxgboost.so: undefined reference tostd::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const@GLIBCXX_3.4.18’
…/…/lib/libxgboost.so: undefined reference to `std::chrono::_V2::system_clock::now()@GLIBCXX_3.4.19
collect2: error: ld returned 1 exit status
make: *** [c-api-demo] Error 1

I need some help to resolve this. Could any one help me.