E461 How to build module ngx_http_opentelemetry_module for version nginx 1.20.1 · Issue #525 · open-telemetry/opentelemetry-cpp-contrib · GitHub
[go: up one dir, main page]

Skip to content

How to build module ngx_http_opentelemetry_module for version nginx 1.20.1 #525

@Ilyin-V-V

Description

@Ilyin-V-V

I'm trying to figure out how to build ngx_http_opentelemetry_module for version nginx 1.20.1 in Centos 7 and is it possible?

From a container with Centos 7 in the downloaded archive nginx-1.20.1,
I execute:

  1. [root@200e088735f3 nginx-1.20.1]#
    ./configure --add-module=/opt/src/1.0.1/opentelemetry-cpp-contrib-webserver-v1.0.1/instrumentation/otel-webserver-module/src/nginx/
    where /opt/src/1.0.1/opentelemetry-cpp-contrib-webserver-v1.0.1/instrumentation/otel-webserver-module/src/nginx/
    webserver/v1.0.1 and contains files,
    Makefile
    config
    ngx_http_opentelemetry_log.c
    ngx_http_opentelemetry_log.h
    ngx_http_opentelemetry_module.c
    ngx_http_opentelemetry_module.h

  2. Configure works fine, but at the make stage I get errors:
    /opt/src/1.0.2/opentelemetry-cpp-contrib-webserver-v1.0.2/instrumentation/otel-webserver-module/src/nginx//ngx_http_opentelemetry_module.c:1511:12: note: expected 'const char *' but argument is of type 'u_char *'
    /opt/src/1.0.2/opentelemetry-cpp-contrib-webserver-v1.0.2/instrumentation/otel-webserver-module/src/nginx//ngx_http_opentelemetry_module.c:1512:51: error: assignment discards 'const' qualifier from pointer target type [-Werror]
    req_payload->headers[count].value = (const char)(h->value).data;
    ^
    cc1: all warnings being treated as errors
    make[1]: *** [objs/addon/nginx/ngx_http_opentelemetry_module.o] Error 1
    make[1]: Leaving directory `/nginx-1.20.1'
    make: *** [build] Error 2
    [root@200e088735f3 nginx-1.20.1]#

How can I build ngx_http_opentelemetry_module for the required version of nginx server?

err.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    WebserverThis represents the otel-webserver-module in the instrumentation directory

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0