Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#2312 closed defect (invalid)

master does not compile

Reported by: RekGRpth@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version:
Keywords: Cc:
uname -a: Linux nginx 5.13.0-24-generic #24-Ubuntu SMP Wed Jan 5 00:51:12 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.21.6
built by gcc 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
built with OpenSSL 1.1.1l 24 Aug 2021
TLS SNI support enabled
configure arguments: --add-dynamic-module='modules/echo-nginx-module modules/encrypted-session-nginx-module modules/form-input-nginx-module modules/iconv-nginx-module modules/nginx_csrf_prevent modules/nginx-jwt-module modules/nginx-push-stream-module modules/nginx-upload-module modules/nginx-upstream-fair modules/nginx-uuid4-module modules/ngx_brotli/filter modules/ngx_brotli/static modules/ngx_http_auth_basic_ldap_module modules/ngx_http_captcha_module modules/ngx_http_handlebars_module modules/ngx_http_headers_module modules/ngx_http_htmldoc_module modules/ngx_http_json_module modules/ngx_http_mustach_module modules/ngx_http_sign_module modules/ngx_http_substitutions_filter_module modules/ngx_http_upstream_session_sticky_module modules/ngx_http_zip_var_module modules/ngx_postgres modules/set-misc-nginx-module modules/ngx_http_auth_pam_module modules/ngx_http_evaluate_module modules/spnego-http-auth-nginx-module modules/ngx_http_response_body_module' --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --group=nginx --http-client-body-temp-path=/var/tmp/nginx/client_body --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/tmp/nginx/proxy --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --lock-path=/run/nginx/nginx.lock --modules-path=/usr/local/lib/nginx --pid-path=/run/nginx/nginx.pid --prefix=/etc/nginx --sbin-path=/usr/local/bin/nginx --user=nginx --with-cc-opt='-Wextra -Wwrite-strings -Wmissing-prototypes -Werror -Wno-discarded-qualifiers -fsanitize=address' --with-compat --with-debug --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-ld-opt=-lasan --with-pcre --with-pcre-jit --with-poll_module --with-select_module --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads

Description

master does not compile under debian:stable-slim and ubuntu:rolling

src/event/ngx_event_udp.h:38:27: error: field ‘pkt6’ has incomplete type
   38 |     struct in6_pktinfo    pkt6;
      |                           ^~~~

Change History (5)

comment:1 by vl, 7 months ago

Component: documentationnginx-core

Builds find here, on both.
You may want to retry without 3rd-party modules or provide details
about some specific OS configuration.

docker run --rm nginx-build-test
Linux b5d55305317e 5.9.2-gentoo #5 SMP PREEMPT Thu Jun 3 11:59:13 MSK 2021 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
nginx version: nginx/1.21.7 (8004:c0a432c0301b)
built by gcc 11.2.0 (Ubuntu 11.2.0-7ubuntu2) 
built with OpenSSL 1.1.1l  24 Aug 2021
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --build=8004:c0a432c0301b --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/run/nginx.pid --lock-path=/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-debug --with-http_ssl_module --with-http_v2_module --with-stream=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_xslt_module=dynamic --with-pcre --with-pcre-jit --with-poll_module --with-select_module --with-stream_geoip_module=dynamic --with-threads --with-cc-opt='-Wextra -Wwrite-strings -Wmissing-prototypes -Werror -Wno-discarded-qualifiers -fsanitize=address' --with-ld-opt=-lasan
docker run --rm nginx-build-test
Linux e71bde6e332e 5.9.2-gentoo #5 SMP PREEMPT Thu Jun 3 11:59:13 MSK 2021 x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
nginx version: nginx/1.21.7 (8004:c0a432c0301b)
built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 
built with OpenSSL 1.1.1k  25 Mar 2021
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --build=8004:c0a432c0301b --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/run/nginx.pid --lock-path=/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-debug --with-http_ssl_module --with-http_v2_module --with-stream=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_xslt_module=dynamic --with-pcre --with-pcre-jit --with-poll_module --with-select_module --with-stream_geoip_module=dynamic --with-threads --with-cc-opt='-Wextra -Wwrite-strings -Wmissing-prototypes -Werror -Wno-discarded-qualifiers -fsanitize=address' --with-ld-opt=-lasan

comment:2 by phillipseamore@…, 6 months ago

I have the same issue with two modules that are not on RekGRpth config list.

https://github.com/slact/nchan

https://github.com/jamesmarlowe/ngx_json_post_module

A more detailed error:

/usr/src/nginx_modules/ngx_json_post_module/src/ngx_json_post_module.c
In file included from src/event/ngx_event.h:526,
                 from src/http/ngx_http_upstream.h:14,
                 from src/http/ngx_http.h:34,
                 from /usr/src/nginx_modules/ngx_json_post_module/src/ngx_json_post_module.c:11:
src/event/ngx_event_udp.h:38:27: error: field ‘pkt6’ has incomplete type
   38 |     struct in6_pktinfo    pkt6;
      |                           ^~~~

comment:3 by maxim, 6 months ago

Hi,

Both above modules are not a part of nginx distribution. Please contact their authors.

Maxim

comment:4 by vl, 6 months ago

Resolution: invalid
Status: newclosed

The issue is caused by modules including system headers prior to nginx ones.
In this particular case, it leads to undefined GNU_SOURCE macro and thus
missing type declaration.

See also http://nginx.org/en/docs/dev/development_guide.html#include_files

in reply to:  4 comment:5 by RekGRpth@…, 6 months ago

Replying to vl:

The issue is caused by modules including system headers prior to nginx ones.
In this particular case, it leads to undefined GNU_SOURCE macro and thus
missing type declaration.

Really, https://github.com/jamesmarlowe/ngx_json_post_module/blob/7d6db9fd0b8f51d28c0348e94e8d2c9156137aff/src/ngx_json_post_module.c#L7-L11

Last edited 6 months ago by RekGRpth@… (previous) (diff)
Note: See TracTickets for help on using tickets.