SYNOPSIS
To Install fluent-bit from source:
$ apt-get install cmake flex bison m4 # not required but saves time
$ cpanm Alien::FluentBit
To install fluent-bit from official binary release:
$ curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh
$ export LD_PRELOAD=/lib/fluent-bit/libfluent-bit.so # see below
$ cpanm Alien::FluentBit
To use:
use Alien::FluentBit;
say "Commandline tool is ".Alien::FluentBit->fluentbit;
say "Compile flags are ".Alien::FluentBit->cflags;
say "Link flags are ".Alien::FluentBit->libs;
See the Makefile.PL of Fluent::LibFluentBit for a full example.
DESCRIPTION
This distribution either finds fluent-bit installed on your system (currently only at the slightly odd locations used by the binary dist for Debian systems) or builds it from source.
Currently only building from source works properly, as the binary dist library conflucts with perl related to TLS allocations, and needs pre-loaded. Pre-loading a giant library like this into every program you invoke is not ideal, so the from-source build is recommended.
Note that this module currently provides a custom minimal "fluent-bit.h" because the one from upstream is broken. This minimal header is also available as "fluent-bit-minimal.h"
ATTRIBUTES
(these are class attributes, not object attributes)
- version
-
The version of fluent-bit and libfluent-bit.so
- fluentbit
-
The path of the fluent-bit executable
- cflags
-
The C compiler flags
- libs
-
The C linker flags and libraries
( this module does not yet support static linking )
See Alien::Base for additional inherited attributes and methods.
SEE ALSO
- Alien
-
Description of the Alien concept.
- Fluent::LibFluentBit
-
Perl-friendly XS wrapper around libfluent-bit.so