Alien::XGBoost - Alien package to find, and build if necessary XGBoost dynamic library
version 0.05
use Alien::XGBoost;
use FFI::Platypus;
my $ffi = FFI::Platypus->new;
$ffi->lib(Alien::XGBoost->dynamic_libs);
$ffi->attach(XGBGetLastError => [] => 'string');
my $error = XGBGetLastError();
Alien package to find, and build if necessary XGBoost dynamic library.
This module is to be used by other modules that need the XGBoost dynamic library available, indeed I've made this for AI::XGBoost.
If you only want to use XGBoost in your perl programns, just use AI::XGBoost and forget this module. If you want to make other XGBoost wrappers or use from XS then continue reading.
By now there is no support for compiling your modules against XGBoost. Just using the dynamic library via FFI::Platypus or NativeCall.
The "instructions" to build and install as a module are in the alienfile.
Lots of things can go wrong, and in that case, I'm glad to help, just open an issue https://github.com/pablrod/p5-Alien-XGBoost.
But this information could be useful:
-
Downloading
XGBoost doesn't make releases often https://github.com/dmlc/xgboost/releases (last one from 2016) So I'm cloning branch master.
XGBoost uses git modules, so I need a recursive clone.
-
Installing
XGBoost cmake doesn't provide a install target for the generated Makefiles, so this module is copying the dynamic library and the xgboost command to the module share dir
If installation is succesfull you can query the module Alien::XGBoost to know where is the dynamic library and command in your system
- https://github.com/dmlc/xgboost
- Alien::Build
- alienfile
- AI::XGBoost
- FFI::Platypus
- NativeCall
Thanks to Graham Ollis [email protected] for all the support and making so many great modules that make easier to make Alien's:
Pablo Rodríguez González [email protected]
Copyright (c) 2017 by Pablo Rodríguez González.