目次
Installation of Fluent Bit on MacOS 12.3.1 Montery (Intel)
インストール
- 手元の MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports) (2.3 GHz Quad-Core Intel Core i7) の MacOS 12.3.1 Monterey に Fluent Bit の最新版 (v3.0.0) のインストールを試みた。git clone してインストールした。 HomeBrew でインストールできそうだが、NestDAQ ではソースからコンパイルするのが基本路線なので、それに従う。
- インストールのコマンドは以下の通り。
$ cd $HOME/nestdaq/src $ git clone https://github.com/fluent/fluent-bit $ cd fluent-bit $ git describe --tags v2.2.2-4-g5dec222d0 $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/nestdaq \ -B ./build -S . $ cd build $ time make -j6 ... real 2m28.809s user 5m21.579s sys 1m46.630s $ make install $ fluent-bit Fluent Bit v3.0.0 * Copyright (C) 2015-2024 The Fluent Bit Authors * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd * https://fluentbit.io ____________________ < Fluent Bit v2.2.2 > ------------------- \ \ \ __---__ _- /--______ __--( / \ )XXXXXXXXXXX\v. .-XXX( O O )XXXXXXXXXXXXXXX- /XXX( U ) XXXXXXX\ /XXXXX( )--_ XXXXXXXXXXX\ /XXXXX/ ( O ) XXXXXX \XXXXX\ XXXXX/ / XXXXXX \__ \XXXXX XXXXXX__/ XXXXXX \__----> ---___ XXX__/ XXXXXX \__ / \- --__/ ___/\ XXXXXX / ___--/= \-\ ___/ XXXXXX '--- XXXXXX \-\/XXX\ XXXXXX /XXXXX \XXXXXXXXX \ /XXXXX/ \XXXXXX > _/XXXXX/ \XXXXX--__/ __-- XXXX/ -XXXXXXXX--------------- XXXXXX- \XXXXXXXXXXXXXXXXXXXXXXXXXX/ ""VXXXXXXXXXXXXXXXXXXV"" [2024/01/20 15:41:36] [ info] [fluent bit] version=3.0.0, commit=5dec222d06, pid=52763 [2024/01/20 15:41:36] [ info] [storage] ver=1.5.1, type=memory, sync=normal, checksum=off, max_chunks_up=128 [2024/01/20 15:41:36] [ info] [cmetrics] version=0.6.6 [2024/01/20 15:41:36] [ info] [ctraces ] version=0.4.0 [2024/01/20 15:41:36] [ info] [sp] stream processor started
ロゴの中のバージョンが v2.2.2 と書いてあるのが気になるが、git のタグのバージョンが表示されてる?なんで整合性がないかよくわからない。Crtl-c で終了。fluent-bit –version とすると、以下のように表示される。
$ fluent-bit --version Fluent Bit v3.0.0 Git commit: 5dec222d060f7f2a22440e6fc6b07e8892b72ec1
fluent-bit-go-redis-output インストール
- fluent-bit-do-redis-output を clone する
Troubleshoooting
- cmake 時エラー。FLEX と BISONがない。
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/nestdaq -B ./build -S . -- The C compiler identification is AppleClang 13.1.6.13160021 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") Package systemd was not found in the pkg-config search path. Perhaps you should add the directory containing `systemd.pc' to the PKG_CONFIG_PATH environment variable No package 'systemd' found -- Could NOT find Journald (missing: JOURNALD_LIBRARY JOURNALD_INCLUDE_DIR) -- Found Monkey: /usr/local/include -- Looking for sys/wait.h -- Looking for sys/wait.h - found -- Found LibEdit: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include (found version ".") -- Found Homebrew at /usr/local -- Using openssl keg installed by Homebrew at /usr/local/opt/openssl@3 -- Found Git: /usr/bin/git (found version "2.32.1 (Apple Git-133)") -- Git hash: 5dec222d060f7f2a22440e6fc6b07e8892b72ec1 -- Found FLEX: /usr/bin/flex (found suitable version "2.6.4", minimum required is "2") -- Could NOT find BISON: Found unsuitable version "2.3", but required is at least "3" (found /usr/bin/bison) -- Enabling FLB_REGEX since FLB_PARSER requires CMake Error at CMakeLists.txt:472 (message): Record Accessor feature requires Flex and Bison in your system. This is a build time dependency, you can either install the dependencies or disable the feature setting the CMake option -DFLB_RECORD_ACCESSOR=Off . -- Configuring incomplete, errors occurred!
brew で FLEX と BISON をインストールする。
$ brew install flex bison
これで cmake が通るようになった。