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

Nginx-otel doesn't compile on debian bookworm 12.9 #85

Open
aldemira opened this issue Jan 17, 2025 · 1 comment
Open

Nginx-otel doesn't compile on debian bookworm 12.9 #85

aldemira opened this issue Jan 17, 2025 · 1 comment

Comments

@aldemira
Copy link

Describe the bug

I'm tryting to compile nginx-otel as module on debian bookworm (12.9). And it fails with:

[100%] Building CXX object CMakeFiles/ngx_otel_module.dir/src/http_module.cpp.o
/opt/nginx-otel/src/http_module.cpp: In function 'ngx_int_t {anonymous}::setHeader(ngx_http_request_t*, StrView, StrView)':
/opt/nginx-otel/src/http_module.cpp:260:17: error: 'struct ngx_table_elt_t' has no member named 'next'
  260 |         header->next = NULL;
      |                 ^~~~
make[2]: *** [CMakeFiles/ngx_otel_module.dir/build.make:98: CMakeFiles/ngx_otel_module.dir/src/http_module.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:971: CMakeFiles/ngx_otel_module.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

To reproduce

Steps to reproduce the behavior:
Using debian bookworm 12.9 or the latest debian:bookworm-slim container:

apt-get install nginx-dev
 cd /usr/share/nginx/src
 ./configure 	--prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid 	--modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi 	--http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-threads --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module 			--with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module 	--with-http_slice_module
 cd /opt
 apt-get install -y cmake build-essential libssl-dev zlib1g-dev libpcre3-dev pkg-config libc-ares-dev libre2-dev git
 git clone https://github.com/nginxinc/nginx-otel.git
 cd nginx-otel
 mkdir build && cd build
 cmake -DNGX_OTEL_NGINX_BUILD_DIR=/usr/share/nginx/src/objs ..
 make -j4

Expected behavior

I'm expecting the compilation to complete successfully.

Your environment

  • Version/release of this project or specific commit
    I'm using debian:bookwork-slim container. But any debian bookworm can work.
  • Target deployment platform
    Debian

Additional context

Looking at /usr/share/nginx/src/src/core/ngx_hash.h there's no next in ngx_table_elt_t:

typedef struct {
    ngx_uint_t        hash;
    ngx_str_t         key;
    ngx_str_t         value;
    u_char           *lowcase_key;
} ngx_table_elt_t;
@p-pautov
Copy link
Contributor

That indicates pre 1.23 nginx. Say, if you remove this line (header->next = NULL;), does it work for you otherwise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants