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

Build error on Poky Styhead when using Fluentbit 3.1.6 #9684

Open
nortenorte opened this issue Dec 3, 2024 · 1 comment
Open

Build error on Poky Styhead when using Fluentbit 3.1.6 #9684

nortenorte opened this issue Dec 3, 2024 · 1 comment

Comments

@nortenorte
Copy link

nortenorte commented Dec 3, 2024

Bug Report

Describe the bug
We are staying on Fluentbit v3.1.6 because issue described in: #9664

Our build system was upgraded to Poky Styhead which changes compiler default to treat some warnings as errors, which previous compiler versions didn't. Compiler now checks incompatible-pointer-types which Fluentbit 3.1.6 creates warnings for.

Workaround for AARCH64-based hardware ,does not seem to other ARM-based hardware, update .bb-file:
EXTRA_OECMAKE += "-DCMAKE_C_FLAGS='-Wno-incompatible-pointer-types' -DCMAKE_CXX_FLAGS='-Wno-incompatible-pointer-types' "

To Reproduce
Build options in .bb-file:

# Disable LuaJIT and filter_lua support
EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off "

# Disable Library and examples
EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off -DFLB_EXAMPLES=Off "
# Disable WASM
EXTRA_OECMAKE += "-DFLB_WASM=Off "

# Disable ins
EXTRA_OECMAKE += "-DFLB_IN_CALYPTIA_FLEET=Off -DFLB_IN_COLLECTD=Off -DFLB_IN_CPU=Off -DFLB_IN_DISK=Off -DFLB_IN_DOCKER=Off -DFLB_IN_DOCKER_EVENTS=Off -DFLB_IN_DUMMY=Off -DFLB_IN_ELASTICSEARCH=Off -DFLB_IN_EMITTER=On -DFLB_IN_EVENT_TEST=Off -DFLB_IN_EVENT_TYPE=Off -DFLB_IN_EXEC=Off -DFLB_IN_EXEC_WASI=Off -DFLB_IN_FLUENTBIT_METRICS=Off -DFLB_IN_FORWARD=Off -DFLB_IN_HEAD=Off -DFLB_IN_HEALTH=Off -DFLB_IN_HTTP=Off -DFLB_IN_KAFKA=Off -DFLB_IN_KMSG=Off -DFLB_IN_KUBERNETES_EVENTS=Off -DFLB_IN_LIB=Off -DFLB_IN_MEM=Off -DFLB_IN_MQTT=Off -DFLB_IN_NETIF=Off -DFLB_IN_NGINX_EXPORTER_METRICS=Off -DFLB_IN_NODE_EXPORTER_METRICS=Off -DFLB_IN_OPENTELEMETRY=On -DFLB_IN_PODMAN_METRICS=Off -DFLB_IN_PROCESS_EXPORTER_METRICS=Off -DFLB_IN_PROC=Off -DFLB_IN_PROMETHEUS_REMOTE_WRITE=Off -DFLB_IN_PROMETHEUS_SCRAPE=Off -DFLB_IN_RANDOM=Off -DFLB_IN_SERIAL=Off -DFLB_IN_SPLUNK=Off -DFLB_IN_STATSD=Off -DFLB_IN_STDIN=Off -DFLB_IN_STORAGE_BACKLOG=Off -DFLB_IN_SYSLOG=Off -DFLB_IN_SYSTEMD=Off -DFLB_IN_TAIL=Off -DFLB_IN_TCP=Off -DFLB_IN_THERMAL=Off -DFLB_IN_UDP=Off -DFLB_IN_UNIX_SOCKET=Off -DFLB_IN_WINLOG=Off -DFLB_IN_WINDOWS_EXPORTER_METRICS=Off -DFLB_IN_WINEVTLOG=Off -DFLB_IN_WINSTAT=Off "

# Disable filters
EXTRA_OECMAKE += "-DFLB_FILTER_ALTER_SIZE=Off -DFLB_FILTER_AWS=Off -DFLB_FILTER_CHECKLIST=Off -DFLB_FILTER_ECS=Off -DFLB_FILTER_EXPECT=On -DFLB_FILTER_GEOIP2=Off -DFLB_FILTER_GREP=On -DFLB_FILTER_KUBERNETES=Off -DFLB_FILTER_LOG_TO_METRICS=On -DFLB_FILTER_LUA=Off -DFLB_FILTER_LUA_USE_MPACK=Off -DFLB_FILTER_MODIFY=On -DFLB_FILTER_MULTILINE=On -DFLB_FILTER_NEST=On -DFLB_FILTER_NIGHTFALL=Off -DFLB_FILTER_PARSER=On -DFLB_FILTER_RECORD_MODIFIER=On -DFLB_FILTER_REWRITE_TAG=On -DFLB_FILTER_STDOUT=Off -DFLB_FILTER_SYSINFO=Off -DFLB_FILTER_THROTTLE=On -DFLB_FILTER_THROTTLE_SIZE=On -DFLB_FILTER_TYPE_CONVERTER=Off -DFLB_FILTER_TENSORFLOW=Off -DFLB_FILTER_WASM=Off "

# Disable outs
EXTRA_OECMAKE += "-DFLB_OUT_AZURE=Off -DFLB_OUT_AZURE_BLOB=Off -DFLB_OUT_AZURE_KUSTO=Off -DFLB_OUT_AZURE_LOGS_INGESTION=Off -DFLB_OUT_BIGQUERY=Off -DFLB_OUT_CALYPTIA=Off -DFLB_OUT_CHRONICLE=Off -DFLB_OUT_CLOUDWATCH_LOGS=Off -DFLB_OUT_COUNTER=Off -DFLB_OUT_DATADOG=Off -DFLB_OUT_ES=Off -DFLB_OUT_EXIT=Off -DFLB_OUT_FILE=Off -DFLB_OUT_FLOWCOUNTER=Off -DFLB_OUT_FORWARD=Off -DFLB_OUT_GELF=Off -DFLB_OUT_HTTP=On -DFLB_OUT_INFLUXDB=Off -DFLB_OUT_KAFKA=Off -DFLB_OUT_KAFKA_REST=Off -DFLB_OUT_KINESIS_FIREHOSE=Off -DFLB_OUT_KINESIS_STREAMS=Off -DFLB_OUT_LIB=Off -DFLB_OUT_LOGDNA=Off -DFLB_OUT_LOKI=Off -DFLB_OUT_NATS=Off -DFLB_OUT_NRLOGS=Off -DFLB_OUT_NULL=On -DFLB_OUT_OPENSEARCH=Off -DFLB_OUT_OPENTELEMETRY=On -DFLB_OUT_ORACLE_LOG_ANALYTICS=Off -DFLB_OUT_PGSQL=Off -DFLB_OUT_PLOT=Off -DFLB_OUT_PROMETHEUS_EXPORTER=Off -DFLB_OUT_PROMETHEUS_REMOTE_WRITE=Off -DFLB_OUT_RETRY=Off -DFLB_OUT_S3=Off -DFLB_OUT_SKYWALKING=Off -DFLB_OUT_SLACK=Off -DFLB_OUT_SPLUNK=Off -DFLB_OUT_STACKDRIVER=Off -DFLB_OUT_STDOUT=Off -DFLB_OUT_SYSLOG=Off -DFLB_OUT_TD=Off -DFLB_OUT_TCP=On -DFLB_OUT_UDP=On -DFLB_OUT_VIVO_EXPORTER=Off -DFLB_OUT_WEBSOCKET=Off "

# Build options
EXTRA_OECMAKE += "-DFLB_RELEASE=On -DFLB_DEBUG=Off -DFLB_SQLDB=Off -DFLB_LUAJIT=Off -DFLB_SIGNV4=Off -DFLB_AWS=Off -DFLB_WINDOWS_DEFAULTS=Off -DFLB_CUSTOM_CALYPTIA=Off "
In file included from /tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/size_window.c:27:
/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/size_window.h: In function 'find_throttle_size_window':
/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/size_window.h:116:28: error: passing argument 4 of 'flb_hash_table_get' from incompatible pointer type [-Wincompatible-pointer-types]
  116 |                            (const char **)&window, &out_size) >= 0) {
      |                            ^~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            const char **

...

make[2]: *** [plugins/filter_throttle_size/CMakeFiles/flb-plugin-filter_throttle_size.dir/build.make:76: plugins/filter_throttle_size/CMakeFiles/flb-plugin-filter_throttle_size.dir/size_window.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/throttle_size.h:37,
                 from /tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/throttle_size.c:36:
/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/size_window.h: In function 'find_throttle_size_window':
/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/git/plugins/filter_throttle_size/size_window.h:116:28: error: passing argument 4 of 'flb_hash_table_get' from incompatible pointer type [-Wincompatible-pointer-types]
  116 |                            (const char **)&window, &out_size) >= 0) {
      |                            ^~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            const char **

....

make[2]: Leaving directory '/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/build'
make[1]: Leaving directory '/tmp/work/cortexa53-crypto-poky-linux/fluentbit/3.1.6/build'
make[2]: *** [plugins/filter_throttle_size/CMakeFiles/flb-plugin-filter_throttle_size.dir/build.make:90: plugins/filter_throttle_size/CMakeFiles/flb-plugin-filter_throttle_size.dir/throttle_size.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3598: plugins/filter_throttle_size/CMakeFiles/flb-plugin-filter_throttle_size.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Expected behavior
Fluentbit build successful

Your Environment

  • Version used: 3.1.6
  • Configuration: see above
  • Environment name and version (e.g. Kubernetes? What version?): Poky Styhead
  • Server type and version: x86_64
  • Operating System and version: Ubuntu
  • Filters and plugins: see above
@nortenorte
Copy link
Author

Updated workaround to build all target:
Instead of EXTRA_OECMAKE += ...
Use
CFLAGS += "-Wno-error=incompatible-pointer-types "

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