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 v3.2.0 when disable AWS. #9664

Open
nortenorte opened this issue Nov 28, 2024 · 1 comment · May be fixed by #9709
Open

Build error on v3.2.0 when disable AWS. #9664

nortenorte opened this issue Nov 28, 2024 · 1 comment · May be fixed by #9709

Comments

@nortenorte
Copy link

nortenorte commented Nov 28, 2024

Bug Report

Describe the bug

We have AWS disabled on v3.1.6 and wanted to update to 3.2.0 (building for embedded system). We have reproduced it on the official branch as well (Ubuntu Linux x86_64).

We got the following build error:

/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c: In function ‘flb_http_client_session_begin’:
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1708:25: warning: implicit declaration of function ‘flb_upstream_ha_node_get’; did you mean ‘flb_upstream_queue_get’? [-Wimplicit-function-declaration]
 1708 |         upstream_node = flb_upstream_ha_node_get(client->upstream_ha);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
      |                         flb_upstream_queue_get
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1708:23: warning: assignment to ‘struct flb_upstream_node *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1708 |         upstream_node = flb_upstream_ha_node_get(client->upstream_ha);
      |                       ^
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1714:57: error: invalid use of undefined type ‘struct flb_upstream_node’
 1714 |         connection = flb_upstream_conn_get(upstream_node->u);
      |                                                         ^~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c: In function ‘flb_http_request_set_parameters_internal’:
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2341:17: warning: implicit declaration of function ‘flb_config_map_foreach’ [-Wimplicit-function-declaration]
 2341 |                 flb_config_map_foreach(iterator, config_map_list_entry, header_list) {
      |                 ^~~~~~~~~~~~~~~~~~~~~~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2341:85: error: expected ‘;’ before ‘{’ token
 2341 |                 flb_config_map_foreach(iterator, config_map_list_entry, header_list) {
      |                                                                                     ^~
      |                                                                                     ;
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2241:37: warning: unused variable ‘header_name’ [-Wunused-variable]
 2241 |     struct flb_slist_entry         *header_name;
      |                                     ^~~~~~~~~~~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2237:37: warning: unused variable ‘header_value’ [-Wunused-variable]
 2237 |     struct flb_slist_entry         *header_value;
      |                                     ^~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/fluent-bit-static.dir/build.make:958: src/CMakeFiles/fluent-bit-static.dir/flb_http_client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8435: src/CMakeFiles/fluent-bit-static.dir/all] Error 2

To Reproduce
Disable AWS and plugins/filters that require AWS.

cd build
cmake .. -DFLB_SIGNV4=Off -DFLB_AWS=Off -DFLB_FILTER_AWS=Off -DFLB_OUT_S3=Off -DFLB_OUT_KINESIS_FIREHOSE=Off -DFLB_OUT_KINESIS_STREAMS=Off -DFLB_OUT_CLOUDWATCH_LOGS=Off -DFLB_OUT_BIGQUERY=Off
make


[  0%] Built target backtrace
[  6%] Built target c-ares
[  6%] Built target jsmn
[  6%] Built target sqlite3
[  6%] Built target xxd-c
[  6%] Built target minilua
[  6%] Built target buildvm_arch_h
[  7%] Built target buildvm
[  7%] Built target lj_gen_headers
[  7%] Built target lj_gen_folddef
[ 13%] Built target libluajit
[ 14%] Built target luajit
[ 17%] Built target vmlib-static
[ 17%] Built target flb-wasm-static
[ 18%] Built target xxhash
[ 20%] Built target cfl-static
[ 20%] Built target fluent-otel-proto
[ 20%] Built target msgpack-c-static
[ 21%] Built target mpack-static
[ 22%] Built target miniz
[ 22%] Built target tutf8e
[ 22%] Built target snappy-c
[ 24%] Built target cmetrics-static
[ 25%] Built target ctraces-static
[ 26%] Built target cprofiles-static
[ 28%] Built target nghttp2_static
[ 30%] Built target cio-crc32
[ 31%] Built target chunkio-static
[ 31%] Built target rbtree
[ 31%] Built target regex
[ 31%] Built target co
[ 31%] Built target mk_core
[ 31%] Built target monkey-liana-static
[ 32%] Built target monkey-core-static
[ 37%] Built target rdkafka
[ 41%] Built target onigmo-static
[ 41%] Built target processor-sql-parser
[ 41%] Built target maxminddb
[ 41%] Built target flb-ra-parser
[ 41%] Built target flb-sp-parser
[ 42%] Built target flb-sp
[ 42%] Built target flb-plugin-proxy-go
[ 43%] Built target api-v2
[ 43%] Built target api-v1
[ 44%] Built target flb-http-server
[ 44%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_http_client.c.o
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c: In function ‘flb_http_client_session_begin’:
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1708:25: warning: implicit declaration of function ‘flb_upstream_ha_node_get’; did you mean ‘flb_upstream_queue_get’? [-Wimplicit-function-declaration]
 1708 |         upstream_node = flb_upstream_ha_node_get(client->upstream_ha);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
      |                         flb_upstream_queue_get
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1708:23: warning: assignment to ‘struct flb_upstream_node *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1708 |         upstream_node = flb_upstream_ha_node_get(client->upstream_ha);
      |                       ^
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:1714:57: error: invalid use of undefined type ‘struct flb_upstream_node’
 1714 |         connection = flb_upstream_conn_get(upstream_node->u);
      |                                                         ^~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c: In function ‘flb_http_request_set_parameters_internal’:
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2341:17: warning: implicit declaration of function ‘flb_config_map_foreach’ [-Wimplicit-function-declaration]
 2341 |                 flb_config_map_foreach(iterator, config_map_list_entry, header_list) {
      |                 ^~~~~~~~~~~~~~~~~~~~~~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2341:85: error: expected ‘;’ before ‘{’ token
 2341 |                 flb_config_map_foreach(iterator, config_map_list_entry, header_list) {
      |                                                                                     ^~
      |                                                                                     ;
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2241:37: warning: unused variable ‘header_name’ [-Wunused-variable]
 2241 |     struct flb_slist_entry         *header_name;
      |                                     ^~~~~~~~~~~
/fluent-bit-v3.2.0/fluent-bit/src/flb_http_client.c:2237:37: warning: unused variable ‘header_value’ [-Wunused-variable]
 2237 |     struct flb_slist_entry         *header_value;
      |                                     ^~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/fluent-bit-static.dir/build.make:958: src/CMakeFiles/fluent-bit-static.dir/flb_http_client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8435: src/CMakeFiles/fluent-bit-static.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Expected behavior
Build successful.

Your Environment

  • Version used: v3.2.0
  • Configuration: Disable AWS (see cmake flags)
  • Server type and version: x86_64
  • Operating System and version: Ubuntu 24.04.1 LTS
  • Filters and plugins: Disable AWS (see cmake flags)

Additional context
We have traced back the following truth table.

Version Result
v3.1.6 OK
v3.1.7 OK
v3.1.8 OK
v3.1.9 OK
v3.1.10 OK
v3.2.0 NOK
v3.2.1 NOK
v3.2.2 NOK

@nortenorte
Copy link
Author

Adding missing dependencies will resolve the issue: Added to flb_http_client.c
#include <fluent-bit/flb_config_map.h>
#include <fluent-bit/flb_upstream_ha.h>

nortenorte added a commit to nortenorte/fluent-bit that referenced this issue Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant