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 on macOS fails #9004

Open
kiyutink opened this issue Jun 24, 2024 · 4 comments
Open

Build on macOS fails #9004

kiyutink opened this issue Jun 24, 2024 · 4 comments

Comments

@kiyutink
Copy link

Bug Report

Describe the bug

following the instructions on https://docs.fluentbit.io/manual/installation/macos#get-the-source-and-build-it
on macos 14.5.1 getting the following error:

Undefined symbols for architecture arm64:
  "_flb_ra_create", referenced from:
      _flb_mp_accessor_create in flb_mp.c.o
      _k8s_events_conf_create in libflb-plugin-in_kubernetes_events.a[2](kubernetes_events_conf.c.o)
      _flb_azure_conf_create in libflb-plugin-out_azure.a[2](azure_conf.c.o)
      _flb_es_conf_create in libflb-plugin-out_es.a[3](es_conf.c.o)
      _flb_es_conf_create in libflb-plugin-out_es.a[3](es_conf.c.o)
      _flb_es_conf_create in libflb-plugin-out_es.a[3](es_conf.c.o)
      _flb_http_conf_create in libflb-plugin-out_http.a[3](http_conf.c.o)
      _flb_http_conf_create in libflb-plugin-out_http.a[3](http_conf.c.o)
      ...
  "_flb_ra_create_str_from_list", referenced from:
      _create_label_map_entry in libflb-plugin-out_loki.a[2](loki.c.o)
  "_flb_ra_destroy", referenced from:
      _flb_mp_accessor_destroy in flb_mp.c.o
      _k8s_events_conf_destroy in libflb-plugin-in_kubernetes_events.a[2](kubernetes_events_conf.c.o)
      _flb_azure_conf_destroy in libflb-plugin-out_azure.a[2](azure_conf.c.o)
      _flb_es_conf_destroy in libflb-plugin-out_es.a[3](es_conf.c.o)
      _flb_es_conf_destroy in libflb-plugin-out_es.a[3](es_conf.c.o)
      _flb_http_conf_destroy in libflb-plugin-out_http.a[3](http_conf.c.o)
      _flb_http_conf_destroy in libflb-plugin-out_http.a[3](http_conf.c.o)
      ...
  "_flb_ra_get_kv_pair", referenced from:
      _flb_mp_accessor_keys_remove in flb_mp.c.o
      _post_all_requests in libflb-plugin-out_http.a[2](http.c.o)
      _post_all_requests in libflb-plugin-out_http.a[2](http.c.o)
      _log_record_set_body in libflb-plugin-out_opentelemetry.a[3](opentelemetry_logs.c.o)
      _cb_type_converter_filter in libflb-plugin-filter_type_converter.a[2](type_converter.c.o)
      _evaluate_condition_KEY_EXISTS in libflb-plugin-filter_modify.a[2](modify.c.o)
      _evaluate_condition_KEY_VALUE_EQUALS in libflb-plugin-filter_modify.a[2](modify.c.o)
      ...
  "_flb_ra_get_value_object", referenced from:
      _es_get_id_value in libflb-plugin-out_es.a[4](es.c.o)
      _pack_labels in libflb-plugin-out_loki.a[2](loki.c.o)
      _get_tenant_id_from_record in libflb-plugin-out_loki.a[2](loki.c.o)
      _os_get_id_value in libflb-plugin-out_opensearch.a[3](opensearch.c.o)
      _pack_map_meta in libflb-plugin-out_splunk.a[3](splunk.c.o)
      _pack_resource_labels in libflb-plugin-out_stackdriver.a[4](stackdriver.c.o)
      _get_otlp_group_metadata in libflb-plugin-out_opentelemetry.a[3](opentelemetry_logs.c.o)
      _get_otlp_group_metadata in libflb-plugin-out_opentelemetry.a[3](opentelemetry_logs.c.o)
      _get_otlp_group_metadata in libflb-plugin-out_opentelemetry.a[3](opentelemetry_logs.c.o)
      ...
  "_flb_ra_key_value_destroy", referenced from:
      _es_get_id_value in libflb-plugin-out_es.a[4](es.c.o)
      _es_get_id_value in libflb-plugin-out_es.a[4](es.c.o)
      _es_get_id_value in libflb-plugin-out_es.a[4](es.c.o)
      _pack_labels in libflb-plugin-out_loki.a[2](loki.c.o)
      _get_tenant_id_from_record in libflb-plugin-out_loki.a[2](loki.c.o)
      _get_tenant_id_from_record in libflb-plugin-out_loki.a[2](loki.c.o)
      _get_tenant_id_from_record in libflb-plugin-out_loki.a[2](loki.c.o)
      _get_tenant_id_from_record in libflb-plugin-out_loki.a[2](loki.c.o)
      ...
  "_flb_ra_regex_match", referenced from:
      _grep_filter_data in libflb-plugin-filter_log_to_metrics.a[2](log_to_metrics.c.o)
  "_flb_ra_subkey_count", referenced from:
      _insert_by_subkey_count in flb_mp.c.o
      _insert_by_subkey_count in flb_mp.c.o
  "_flb_ra_translate", referenced from:
      _azure_format in libflb-plugin-out_azure.a[3](azure.c.o)
      _elasticsearch_format in libflb-plugin-out_es.a[4](es.c.o)
      _pack_labels in libflb-plugin-out_loki.a[2](loki.c.o)
      _pack_labels in libflb-plugin-out_loki.a[2](loki.c.o)
      _opensearch_format in libflb-plugin-out_opensearch.a[3](opensearch.c.o)
      _opensearch_format in libflb-plugin-out_opensearch.a[3](opensearch.c.o)
      _extract_hec_token in libflb-plugin-out_splunk.a[3](splunk.c.o)
      ...
  "_flb_ra_translate_check", referenced from:
      _get_log_stream in libflb-plugin-out_cloudwatch_logs.a[3](cloudwatch_api.c.o)
      _get_log_stream in libflb-plugin-out_cloudwatch_logs.a[3](cloudwatch_api.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libfluent-bit.dylib] Error 1
make[1]: *** [src/CMakeFiles/fluent-bit-shared.dir/all] Error 2
make: *** [all] Error 2

Additional context
I'm trying to pinpoint the codechange that caused #8993 - for that i need to be able to build fluent-bit from sources

@edsiper
Copy link
Member

edsiper commented Jun 24, 2024

if you do a basic cmake ../ inside build/ does it work ? (without setting any environment variable)

@cosmo0920
Copy link
Contributor

It seems that record accessor is not compiled correctly. Did you install bison and flex via homebrew?

@kiyutink
Copy link
Author

if you do a basic cmake ../ inside build/ does it work ? (without setting any environment variable)

cmake succeeds (like in the other case too), but the subsequent make is where i get the errors

@kiyutink
Copy link
Author

kiyutink commented Jun 25, 2024

It seems that record accessor is not compiled correctly. Did you install bison and flex via homebrew?

Yep

➜  build git:(master) which flex
/opt/homebrew/opt/flex/bin/flex
➜  build git:(master) which bison
/opt/homebrew/opt/bison/bin/bison

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

3 participants