Skip to content

Windows用FluentBit4.2.2版ソースビルド用スクリプトの整備 #1

@n-kawauchi

Description

@n-kawauchi
  • OpenRTM-aist 2.1.0版リリース向けビルド時に利用するFluentBitのバージョンを、現時点で最新Release版のv4.2.2利用で整備する
  • OpenRTMのmsm, msi生成用のビルドは、vc2019を使用しており、これでビルドすると下記エラーが出る
    fluent-bit-4.2.2\plugins\filter_nest\nest.c(553,1): error C2065: '__FLB_FILENAME__': 定義されていない識別子です。
    
    • エラーの原因は、Fluent Bit v4.2.2 で導入(または変更)された __FLB_FILENAME__ というカスタムマクロが、
      Visual Studio 2019 のコンパイラ環境で正しく認識・定義されていないことにある
  • エラー解決のため、cmakeオプション試したが改善せず、最終的にCMakeLists.txtへ下記指定を追加することになり、これを反映させるpatchファイルを用意した
    add_definitions(-D__FLB_FILENAME__=__FILE__)
    
  • このpatchは、flb422-build.bat を実行しても自動で反映されない
    • batファイルの中から patchコマンドを実行できないため
  • patchを当てる手順は、README.txt を参照
  • ビルド環境は最新のcmake(4.2.1)利用で、FluentBitソースのCMakeLists.txtで定義している
    cmake_minimum_requiredのバージョンが低いため、cmakeが通らない。cmake時に下記メッセージが出る
    CMake Error at lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt:8 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.
    
    Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.
    
    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
    
  • この対応のため、flb422-build.bat内でのcmakeオプションに下記を追加している
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
    

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions