kaltura / nginx-kafka-log-module

Send Kafka messages from Nginx
BSD 2-Clause "Simplified" License
64 stars 22 forks source link

Can't make with nginx 1.21.4 #10

Closed dagolub closed 2 years ago

dagolub commented 2 years ago

/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;

dagolub commented 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;

erankor commented 2 years ago

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.

dagolub commented 2 years ago

Yep apt install librdkafka-dev fix it

dagolub commented 2 years ago

Thanks for all