Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable bpf to compile the fluent bit exception #9778

Open
Ljohn001 opened this issue Dec 30, 2024 · 1 comment
Open

Enable bpf to compile the fluent bit exception #9778

Ljohn001 opened this issue Dec 30, 2024 · 1 comment

Comments

@Ljohn001
Copy link

Bug Report

Describe the bug

I was testing the fluent bit input bpf plugin and found that there was a compilation problem and I couldn't try out the bpf feature.

To Reproduce

  • Compilation error on ubuntu22.04/24.04
  • Compilation process,Steps to reproduce the problem
cat /etc/issue
Ubuntu 24.04.1 LTS \n \l

uname -a
Linux u01 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

sudo apt install -y libyaml-dev libbpf-dev flex bison cmake build-essential libbpfcc-dev libssl-dev libbpf-dev linux-tools-common cmake
git clone https://github.com/fluent/fluent-bit.git
cd fluent-bit/build 
cmake .. -DFLB_IN_EBPF=On
make
[ 85%] Building C object plugins/in_node_exporter_metrics/CMakeFiles/flb-plugin-in_node_exporter_metrics.dir/__/__/lib/lwrb/lwrb/src/lwrb/lwrb.c.o
[ 85%] Linking C static library ../../library/libflb-plugin-in_node_exporter_metrics.a                                                            
[ 85%] Built target flb-plugin-in_node_exporter_metrics                                                                                           
[ 85%] Building C object plugins/in_ebpf/CMakeFiles/flb-plugin-in_ebpf.dir/in_ebpf.c.o                                                            
In file included from /root/fluent-bit/plugins/in_ebpf/in_ebpf.c:24:                                                                              
/root/fluent-bit/plugins/in_ebpf/traces/traces.h:6:10: fatal error: generated/trace_signal.skel.h: No such file or directory                      
    6 | #include "generated/trace_signal.skel.h"                                                                                                  
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                  
compilation terminated.
make[2]: *** [plugins/in_ebpf/CMakeFiles/flb-plugin-in_ebpf.dir/build.make:76: plugins/in_ebpf/CMakeFiles/flb-plugin-in_ebpf.dir/in_ebpf.c.o] Erro
r 1
make[1]: *** [CMakeFiles/Makefile2:5968: plugins/in_ebpf/CMakeFiles/flb-plugin-in_ebpf.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Your Environment

  • Version used: master,v3.2.3
  • Environment name and version (e.g. Kubernetes? What version?): local
  • Operating System and version: ubuntu22.04,24.04
@Ljohn001
Copy link
Author

supplemental content

Execution cmake output:

cmake .. -DFLB_IN_EBPF=On
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)                          
-- Could NOT find Journald (missing: JOURNALD_LIBRARY JOURNALD_INCLUDE_DIR)                                                                                                  
-- Could NOT find LibEdit (missing: libedit_INCLUDE_DIRS libedit_LIBRARIES)                                                                                                  
-- Git hash: d1dfd838ef91bef724cdd6c1df4caae2475ec567                                                                                                                        
-- Enabling FLB_REGEX since FLB_PARSER requires                                       
CMake Deprecation Warning at lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt:8 (cmake_minimum_required):                                                                  
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                                                                                                                                                     
                                                                                                                                                                             
  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    
                                                                                                                                                                             
                                                                                                                                                                             
-- xxHash build type: Debug                                                                                                                                                  
CMake Deprecation Warning at lib/fluent-otel-proto/CMakeLists.txt:1 (cmake_minimum_required):                                                                                
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                                                                                                                                                     
                                                                                                                                                                             
  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    
                                                                                      
                                                                                      
CMake Deprecation Warning at lib/msgpack-c/CMakeLists.txt:1 (cmake_minimum_required):                                                                                        
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   
                                                                                      
  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    
                                                                                                                                                                             
                                                                                                                                                                             
CMake Deprecation Warning at lib/miniz/CMakeLists.txt:1 (cmake_minimum_required):                                                                                            
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                                                                                                                                                     
                                                                                                                                                                             
  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions. 

CMake Deprecation Warning at lib/lwrb/CMakeLists.txt:1 (cmake_minimum_required):                                                                                             
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


Entering /root/fluent-bit/lib/lwrb/lwrb/CMakeLists.txt                                
Exiting /root/fluent-bit/lib/lwrb/lwrb/CMakeLists.txt                                 
CMake Deprecation Warning at lib/tutf8e/CMakeLists.txt:1 (cmake_minimum_required):                                                                                           
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


CMake Deprecation Warning at lib/snappy-fef67ac/CMakeLists.txt:1 (cmake_minimum_required):                                                                                   
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


CMake Deprecation Warning at lib/cmetrics/CMakeLists.txt:1 (cmake_minimum_required):                                                                                         
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


-- CFL found in the system. OK             
CMake Deprecation Warning at lib/ctraces/CMakeLists.txt:1 (cmake_minimum_required):                                                                                          
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at lib/cprofiles/CMakeLists.txt:1 (cmake_minimum_required):                                                                                        
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


-- CFL found in the system. OK             
CMake Deprecation Warning at lib/nghttp2/CMakeLists.txt:25 (cmake_minimum_required):                                                                                         
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


-- Could NOT find Libev (missing: LIBEV_LIBRARY LIBEV_INCLUDE_DIR) (Required is at least version "4.11")                                                                     
-- Could NOT find Libcares (missing: LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR) (Required is at least version "1.7.5")                                                           
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.3", minimum required is "1.2.3")                                                                 
-- Could NOT find Libngtcp2 (missing: LIBNGTCP2_LIBRARY LIBNGTCP2_INCLUDE_DIR) (Required is at least version "1.0.0")                                                        
-- Could NOT find Libngtcp2_crypto_quictls (missing: LIBNGTCP2_CRYPTO_QUICTLS_LIBRARY LIBNGTCP2_CRYPTO_QUICTLS_INCLUDE_DIR) (Required is at least version "1.0.0")
-- Could NOT find Libnghttp3 (missing: LIBNGHTTP3_LIBRARY LIBNGHTTP3_INCLUDE_DIR) (Required is at least version "1.1.0")                                                     
-- Could NOT find Systemd (missing: SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES) (Required is at least version "209")                                                             
-- Could NOT find Jansson (missing: JANSSON_LIBRARY JANSSON_INCLUDE_DIR) (Required is at least version "2.5")                                                                
-- Could NOT find Libevent (missing: LIBEVENT_CORE_LIBRARY LIBEVENT_EXTRA_LIBRARY LIBEVENT_OPENSSL_LIBRARY LIBEVENT_INCLUDE_DIR core extra openssl) (Required is at least ver
sion "2.0.8")
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) (Required is at least version "2.6.26")                                                             
-- Could NOT find Jemalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)                                                                                                  
-- Could NOT find CUnit (missing: CUNIT_LIBRARY CUNIT_INCLUDE_DIR) (Required is at least version "2.1")                                                                      
-- summary of build options:               

    Package version: 1.58.90               
    Library version: 39:1:25               
    Install prefix:  /usr/local            
    Target system:   Linux                 
    Compiler:                              
      Build type:     Debug                
      C compiler:     /usr/bin/cc          
      CFLAGS:         -g  -Wall -D__FLB_FILENAME__=__FILE__                           
      C++ compiler:   /usr/bin/c++         
      CXXFLAGS:       -g 
      WARNCFLAGS:       -W -Wall -Wconversion -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Waddres
s -Wattributes -Wcast-align -Wdeclaration-after-statement -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wmissing-field-initi
alizers -Wmissing-noreturn -Wno-format-nonliteral -Wredundant-decls -Wsign-conversion -Wstrict-prototypes -Wunreachable-code -Wunused-macros -Wunused-parameter -Wvla -Wclobb
ered -Wpragmas                             
      CXX1XCXXFLAGS:  -std=c++14           
      WARNCXXFLAGS:     -Wall -Wformat-security                                       
    Python:                                
      Python:          /usr/bin/python3                                               
      Python3_VERSION: 3.12.3              
    Test:                                  
      CUnit:          FALSE (LIBS='')                                                 
      Failmalloc:     ON                   
    Libs:                                  
      OpenSSL:         (LIBS='')           
      Libxml2:        FALSE (LIBS='')                                                 
      Libev:          FALSE (LIBS='')                                                 
      Libc-ares:      FALSE (LIBS='')                                                 
      Libngtcp2:       (LIBS='')           
      Libngtcp2_crypto_quictls:  (LIBS='')                                            
      Libnghttp3:      (LIBS='')           
      Libbpf:          (LIBS='')           
      Libevent(SSL):  FALSE (LIBS='')                                                 
      Jansson:        FALSE (LIBS='')                                                 
      Jemalloc:       FALSE (LIBS='')                                                 
      Zlib:           TRUE (LIBS='/usr/lib/x86_64-linux-gnu/libz.so')                 
      Systemd:        FALSE (LIBS='SYSTEMD_LIBRARIES-NOTFOUND')                       
    Third-party:                           
      http-parser:                         
      MRuby:          0                    
      Neverbleed:     0                    
    Features:                              
      Applications:   OFF                  
      HPACK tools:    OFF                  
      Examples:       OFF                  
      Threading:      ON                   
      HTTP/3(EXPERIMENTAL): OFF            

CMake Deprecation Warning at lib/chunkio/CMakeLists.txt:1 (cmake_minimum_required):                                                                                          
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.

-- FLB Event loop backend > auto discovery (Monkey library)                           
CMake Deprecation Warning at lib/monkey/CMakeLists.txt:2 (cmake_minimum_required):                                                                                           
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


Found posix_memalign in stdlib.h -DHAVE_POSIX_MEMALIGN_IN_STDLIB -DHAVE_POSIX_MEMALIGN                                                                                       
-- Plugin dirlisting enabled               
-- Plugin liana enabled [== static ==]                                                
-- Plugin mandril enabled                  
-- LINKING monkey-liana-static;            
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.13")                                                                                            
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)                          
-- libbacktrace not found, building ourselves                                         
CMake Deprecation Warning at lib/librdkafka-2.4.0/CMakeLists.txt:1 (cmake_minimum_required):                                                                                 
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


-- Found Zstd: /usr/lib/x86_64-linux-gnu/libzstd.so                                   
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")                
-- Found ZSTD: /usr/lib/x86_64-linux-gnu/libzstd.so                                   
CMake Deprecation Warning at lib/onigmo/CMakeLists.txt:1 (cmake_minimum_required):                                                                                           
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions. 

-- Using python executable is: /usr/bin/python3                                                                                                                     [16/5593]
-- FALSE Linux                                                                                                                                                               
-- 8 Linux                                 
-- Check target system architecture: x86_64                                           
-- Check target fpu: FPU IS Hard           
-- Check target fpu abi: FPU ABI IS Hard                                              
-- #### CMAKE_SYSTEM_NAME is Linux         
-- #### CMAKE_SYSTEM_PROCESSOR is x86_64                                              
-- #### TARGET_ARCH is -DLJ_ARCH_HASFPU=1;-DLJ_ABI_SOFTFP=0;-DLUAJIT_TARGET=LUAJIT_ARCH_x64                                                                                  
-- #### unwind_FOUND is                    
-- #### HAVE_UNWIND_H is 1                 
-- #### HAVE_UNWIND_LIB is                 
-- #### UNWIND_LIBRARY is UNWIND_LIBRARY-NOTFOUND                                     
-- #### LUAJIT_NO_UNWIND is ON             
-- Using Git: git version 2.43.0           
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)                                                                                            
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)                          
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)                          
-- Found libbpf: /usr/lib/x86_64-linux-gnu/libbpf.so                                  
CMake Deprecation Warning at plugins/in_ebpf/CMakeLists.txt:1 (cmake_minimum_required):                                                                                      
  Compatibility with CMake < 3.5 will be removed from a future version of                                                                                                    
  CMake.                                   

  Update the VERSION argument <min> value or use a ...<max> suffix to tell                                                                                                   
  CMake that the project does not need compatibility with older versions.                                                                                                    


-- ##### lsb_release -i -- Distributor ID:      Ubuntu                                
-- Build as target X86_64                  
-- Build Configurations:                   
     Build as target X86_64                
     CMAKE_BUILD_TYPE Debug                
     WAMR Interpreter enabled              
     WAMR AOT enabled                      
     WAMR Fast JIT disabled                
     WAMR LLVM ORC JIT disabled            
     Libc builtin enabled                  
     Libc WASI enabled                     
     Fast interpreter enabled              
     Multiple modules disabled             
     Bulk memory feature enabled           
     Shared memory enabled                 
     Thread manager enabled                
     Lib pthread enabled                   
     Wakeup of blocking operations enabled                                            
     Reference types disabled              
     Module instance context enabled                                                  
     Write linear memory base addr to x86 GS register enabled 
     Quick AOT/JIT entries enabled         
-- Configuring done (4.9s)                 
-- Generating done (2.8s)                  
-- Build files have been written to: /root/fluent-bit/build    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant