davechallis / rust-xgboost

Rust bindings for XGBoost.
MIT License
102 stars 37 forks source link

Not able to build on ubuntu machine #5

Open infinite-Joy opened 5 years ago

infinite-Joy commented 5 years ago

I have tried to use xgboost 0.1.4 on a mac and it works fine in a Mac, but not building in Ubuntu machines. This is probably because the build procedure uses clang in the backend. Building the original Xgboost (https://github.com/dmlc/xgboost) with make and cmake. I can see that there is a platform dependent build step. https://github.com/davechallis/rust-xgboost/blob/master/xgboost-sys/build.rs#L60. Not sure if this is the source of the problem.

davechallis commented 5 years ago

rust-xgboost uses bindgen to autogenerate a lot of the xgboost C bindings at compile time, this uses clang under the hood to do a lot of that, so pulls it in as a requirement even on linux systems.

The bindgen docs have some info on the requirements: https://github.com/rust-lang/rust-bindgen/blob/master/book/src/requirements.md

I'll add something about this to the README in the near future though to make things clearer.