Closed dagolub closed 2 years ago
Same problem with --add-dynamic-module=
/tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c: In function ‘ngx_http_kafka_log_log_handler’: /tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:235:5: error: unknown type name ‘rd_kafka_topic_t’ 235 | rd_kafka_topic_t *rkt; | ^~~~~~~~~~~~~~~~ /tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:235:42: error: unused variable ‘rkt’ [-Werror=unused-variable] 235 | rd_kafka_topic_t *rkt; | ^~~ /tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:230:41: error: unused variable ‘topic’ [-Werror=unused-variable] 230 | ngx_str_t topic;
From the errors you pasted, the cause is most likely that librdkafka was not detected during configure (NGX_HAVE_LIBRDKAFKA). While these errors can be fixed, this module has no value without librdkafka :) If you installed librdkafka after you ran configure, just run configure again, and it should work... otherwise, there may be some problem in the detection of librdkafka.
Yep
apt install librdkafka-dev
fix it
Thanks for all
/tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c: In function ‘ngx_http_kafka_log_log_handler’: /tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:235:5: error: unknown type name ‘rd_kafka_topic_t’ 235 | rd_kafka_topic_t rkt; | ^
~~~/tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:235:42: error: unused variable ‘rkt’ [-Werror=unused-variable] 235 | rd_kafka_topic_t rkt; | ^~~ /tmp/nginx-kafka-log-module/ngx_http_kafka_log_module.c:230:41: error: unused variable ‘topic’ [-Werror=unused-variable] 230 | ngx_str_t topic;