QUIC preview `make` fails: `[objs/Makefile:1055: objs/src/event/quic/ngx_event_quic.o] Error 1`

petecooper nginx-forum at forum.nginx.org
Fri Sep 16 14:08:44 UTC 2022


Hello.
I am adapting my stable Nginx compile script to road test the QUIC preview.
Per the readme, I am using `quictls`, specifically v3.0.3. I have not yet
tried BoringSSL.

My `configure` command completes successfully, but my `make` command fails.
I have included output below, and there is a (safe for work) GitHub gist for
the `make` output to retain formatting.

I would be very grateful for any advice or feedback as to what I am (or
might be) doing wrong.

Thank you for your consideration.

Best wishes.

==8<==

Here is my `make` error`:

cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1055: objs/src/event/quic/ngx_event_quic.o]
Error 1
make[1]: Leaving directory '/home/pete/nginx-quic'
make: *** [Makefile:10: build] Error 2

Here is my `configure` script:

cd ~/nginx-quic/ \
&& yes Y | ./auto/configure \
--add-dynamic-module=../brotli-source/ \
--add-dynamic-module=../cache-purge-source/ngx_cache_purge-$cache_purge_source_version
\
--add-dynamic-module=../devel-kit-source/ngx_devel_kit-$devel_kit_source_version
\
--add-dynamic-module=../echo-source/echo-nginx-module-$echo_source_version
\
--add-dynamic-module=../headers-more-source/headers-more-nginx-module-$headers_more_source_version
\
--add-dynamic-module=../ipscrub-source/ipscrub-$ipscrub_source_version/ipscrub
\
--add-dynamic-module=../length-hiding-source/nginx-length-hiding-filter-module-$length_hiding_source_version
\
--add-dynamic-module=../memcached-source/memc-nginx-module-$memcached_source_version
\
--add-dynamic-module=../nchan-source/nchan-$nchan_source_version/ \
--add-dynamic-module=../redis2-source/redis2-nginx-module-$redis2_source_version
\
--add-dynamic-module=../set-misc-source/set-misc-nginx-module-$set_misc_source_version
\
--add-dynamic-module=../vts-source/nginx-module-vts-$vts_source_version \
--build=$(date --iso-8601=seconds) \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=$nginx_log_dir_base/log/nginx/live/nginx/nginx.error.log \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-log-path=$nginx_log_dir_base/log/nginx/live/nginx/nginx.access.log \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--lock-path=/var/run/nginx.lock \
--modules-path=/usr/lib/nginx/modules \
--pid-path=/var/run/nginx.pid \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--with-cc-opt="-m64 -march=native -mtune=native -DTCP_FASTOPEN=23 -g -O3
-fstack-protector-strong -flto -ffat-lto-objects -fuse-ld=gold
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wimplicit-fallthrough=0 -Wno-deprecated-declarations -fcode-hoisting
-Wp,-D_FORTIFY_SOURCE=2
-I../quictls-source/openssl-openssl-$quictls_source_version/apps/include" \
--with-compat \
--with-debug \
--with-file-aio \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_dav_module \
--with-http_geoip_module=dynamic \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_image_filter_module=dynamic \
--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_v3_module \
--with-http_xslt_module=dynamic \
--with-ld-opt='-Wl,-E -lrt -lpcre -Wl,-z,relro
-L../quictls-source/openssl-openssl-$quictls_source_version/apps/lib' \
--with-libatomic \
--with-openssl-opt="\
shared \
no-ssl3 \
no-weak-ssl-ciphers \
-fstack-protector-strong \
" \
--with-openssl=../quictls-source/openssl-openssl-$quictls_source_version \
--with-openssl-opt=enable-ktls \
--with-pcre=../pcre2-source/pcre2-$pcre2_source_version \
--with-pcre-jit \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-stream=dynamic \
--with-threads \
--with-zlib=../cf-zlib-source \
--without-http_empty_gif_module \
--without-http_scgi_module \
--without-http_ssi_module \
--without-http_uwsgi_module \
--without-mail_imap_module \
--without-mail_pop3_module \
--without-mail_smtp_module

Here is the final part of the `make` output (formatted here
https://gist.github.com/petecooper/26e6a47e44f4ad1e49a031e26dde2de4):

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
-m64 -march=native -mtune=native -DTCP_FASTOPEN=23 -g -O3
-fstack-protector-strong -flto -ffat-lto-objects -fuse-ld=gold
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wimplicit-fallthrough=0 -Wno-deprecated-declarations -fcode-hoisting
-Wp,-D_FORTIFY_SOURCE=2
-I../quictls-source/openssl-openssl-3.0.3/apps/include
-Wno-deprecated-declarations -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -I src/core
-I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I
../brotli-source//deps/brotli/c/include -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../devel-kit-source/ngx_devel_kit-0.3.1/src -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../nchan-source/nchan-1.3.3//src -I ../pcre2-source/pcre2-10.40/src/ -I
../quictls-source/openssl-openssl-3.0.3/.openssl/include -I
../cf-zlib-source -I /usr/include/libxml2 -I objs \
	-o objs/src/event/ngx_event_openssl.o \
	src/event/ngx_event_openssl.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
-m64 -march=native -mtune=native -DTCP_FASTOPEN=23 -g -O3
-fstack-protector-strong -flto -ffat-lto-objects -fuse-ld=gold
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wimplicit-fallthrough=0 -Wno-deprecated-declarations -fcode-hoisting
-Wp,-D_FORTIFY_SOURCE=2
-I../quictls-source/openssl-openssl-3.0.3/apps/include
-Wno-deprecated-declarations -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -I src/core
-I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I
../brotli-source//deps/brotli/c/include -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../devel-kit-source/ngx_devel_kit-0.3.1/src -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../nchan-source/nchan-1.3.3//src -I ../pcre2-source/pcre2-10.40/src/ -I
../quictls-source/openssl-openssl-3.0.3/.openssl/include -I
../cf-zlib-source -I /usr/include/libxml2 -I objs \
	-o objs/src/event/ngx_event_openssl_stapling.o \
	src/event/ngx_event_openssl_stapling.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
-m64 -march=native -mtune=native -DTCP_FASTOPEN=23 -g -O3
-fstack-protector-strong -flto -ffat-lto-objects -fuse-ld=gold
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wimplicit-fallthrough=0 -Wno-deprecated-declarations -fcode-hoisting
-Wp,-D_FORTIFY_SOURCE=2
-I../quictls-source/openssl-openssl-3.0.3/apps/include
-Wno-deprecated-declarations -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -I src/core
-I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I
../brotli-source//deps/brotli/c/include -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../devel-kit-source/ngx_devel_kit-0.3.1/src -I
../devel-kit-source/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I
../nchan-source/nchan-1.3.3//src -I ../pcre2-source/pcre2-10.40/src/ -I
../quictls-source/openssl-openssl-3.0.3/.openssl/include -I
../cf-zlib-source -I /usr/include/libxml2 -I objs \
	-o objs/src/event/quic/ngx_event_quic.o \
	src/event/quic/ngx_event_quic.c
In file included from src/event/quic/ngx_event_quic_connection.h:28,
                 from src/event/quic/ngx_event_quic.c:10:
src/event/quic/ngx_event_quic_transport.h:266:49: error: field ‘level’ has
incomplete type
  266 |     enum ssl_encryption_level_t                 level;
      |                                                 ^~~~~
src/event/quic/ngx_event_quic_transport.h:314:49: error: field ‘level’ has
incomplete type
  314 |     enum ssl_encryption_level_t                 level;
      |                                                 ^~~~~
In file included from src/event/quic/ngx_event_quic_connection.h:29,
                 from src/event/quic/ngx_event_quic.c:10:
src/event/quic/ngx_event_quic_protection.h:17:37: error:
‘ssl_encryption_application’ undeclared here (not in a function)
   17 | #define NGX_QUIC_ENCRYPTION_LAST  ((ssl_encryption_application) +
1)
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic_protection.h:53:39: note: in expansion of
macro ‘NGX_QUIC_ENCRYPTION_LAST’
   53 |     ngx_quic_secrets_t        secrets[NGX_QUIC_ENCRYPTION_LAST];
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/event/quic/ngx_event_quic.c:10:
src/event/quic/ngx_event_quic_connection.h:163:39: error: field ‘level’ has
incomplete type
  163 |     enum ssl_encryption_level_t       level;
      |                                       ^~~~~
src/event/quic/ngx_event_quic_connection.h:245:39: error: field
‘error_level’ has incomplete type
  245 |     enum ssl_encryption_level_t       error_level;
      |                                       ^~~~~~~~~~~
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_new_connection’:
src/event/quic/ngx_event_quic.c:261:29: error: ‘ssl_encryption_initial’
undeclared (first use in this function); did you mean
‘ssl_encryption_level_t’?
  261 |     qc->send_ctx[0].level = ssl_encryption_initial;
      |                             ^~~~~~~~~~~~~~~~~~~~~~
      |                             ssl_encryption_level_t
src/event/quic/ngx_event_quic.c:261:29: note: each undeclared identifier is
reported only once for each function it appears in
src/event/quic/ngx_event_quic.c:262:29: error: ‘ssl_encryption_handshake’
undeclared (first use in this function)
  262 |     qc->send_ctx[1].level = ssl_encryption_handshake;
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_close_connection’:
src/event/quic/ngx_event_quic.c:506:40: error: implicit declaration of
function ‘SSL_quic_read_level’ [-Werror=implicit-function-declaration]
  506 |             qc->error_level = c->ssl ?
SSL_quic_read_level(c->ssl->connection)
      |                                        ^~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:507:40: error: ‘ssl_encryption_initial’
undeclared (first use in this function); did you mean
‘ssl_encryption_level_t’?
  507 |                                      : ssl_encryption_initial;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
      |                                        ssl_encryption_level_t
In file included from src/event/quic/ngx_event_quic.c:10:
src/event/quic/ngx_event_quic_connection.h:57:24: error:
‘ssl_encryption_handshake’ undeclared (first use in this function)
   57 |         : (((level) == ssl_encryption_handshake) ?
&((qc)->send_ctx[1])       \
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:519:23: note: in expansion of macro
‘ngx_quic_get_send_ctx’
  519 |                 ctx = ngx_quic_get_send_ctx(qc, qc->error_level);
      |                       ^~~~~~~~~~~~~~~~~~~~~
In file included from src/core/ngx_core.h:61,
                 from src/event/quic/ngx_event_quic.c:8:
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_handle_datagram’:
src/event/quic/ngx_event_quic_transport.h:51:19: error:
‘ssl_encryption_initial’ undeclared (first use in this function); did you
mean ‘ssl_encryption_level_t’?
   51 |         : (lvl == ssl_encryption_initial) ? "init"                  
         \
      |                   ^~~~~~~~~~~~~~~~~~~~~~
src/core/ngx_log.h:93:48: note: in definition of macro ‘ngx_log_debug’
   93 |         ngx_log_error_core(NGX_LOG_DEBUG, log, __VA_ARGS__)
      |                                                ^~~~~~~~~~~
src/event/quic/ngx_event_quic.c:686:13: note: in expansion of macro
‘ngx_log_debug5’
  686 |             ngx_log_debug5(NGX_LOG_DEBUG_EVENT, c->log, 0,
      |             ^~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:689:32: note: in expansion of macro
‘ngx_quic_level_name’
  689 |                            rc, ngx_quic_level_name(pkt.level),
      |                                ^~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic_transport.h:52:23: error:
‘ssl_encryption_handshake’ undeclared (first use in this function)
   52 |             : (lvl == ssl_encryption_handshake) ? "hs" : "early"
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~
src/core/ngx_log.h:93:48: note: in definition of macro ‘ngx_log_debug’
   93 |         ngx_log_error_core(NGX_LOG_DEBUG, log, __VA_ARGS__)
      |                                                ^~~~~~~~~~~
src/event/quic/ngx_event_quic.c:686:13: note: in expansion of macro
‘ngx_log_debug5’
  686 |             ngx_log_debug5(NGX_LOG_DEBUG_EVENT, c->log, 0,
      |             ^~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:689:32: note: in expansion of macro
‘ngx_quic_level_name’
  689 |                            rc, ngx_quic_level_name(pkt.level),
      |                                ^~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_handle_packet’:
src/event/quic/ngx_event_quic.c:787:23: error: ‘ssl_encryption_initial’
undeclared (first use in this function); did you mean
‘ssl_encryption_level_t’?
  787 |     if (pkt->level == ssl_encryption_initial) {
      |                       ^~~~~~~~~~~~~~~~~~~~~~
      |                       ssl_encryption_level_t
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_handle_payload’:
src/event/quic/ngx_event_quic.c:947:44: error: type of formal parameter 2 is
incomplete
  947 |     if (!ngx_quic_keys_available(qc->keys, pkt->level)) {
      |                                            ^~~~~~~~~~
In file included from src/core/ngx_core.h:61,
                 from src/event/quic/ngx_event_quic.c:8:
src/event/quic/ngx_event_quic_transport.h:51:19: error:
‘ssl_encryption_initial’ undeclared (first use in this function); did you
mean ‘ssl_encryption_level_t’?
   51 |         : (lvl == ssl_encryption_initial) ? "init"                  
         \
      |                   ^~~~~~~~~~~~~~~~~~~~~~
src/core/ngx_log.h:86:67: note: in definition of macro ‘ngx_log_error’
   86 |     if ((log)->log_level >= level) ngx_log_error_core(level, log,
__VA_ARGS__)
      |                                                                  
^~~~~~~~~~~
src/event/quic/ngx_event_quic.c:950:23: note: in expansion of macro
‘ngx_quic_level_name’
  950 |                       ngx_quic_level_name(pkt->level));
      |                       ^~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic_transport.h:52:23: error:
‘ssl_encryption_handshake’ undeclared (first use in this function)
   52 |             : (lvl == ssl_encryption_handshake) ? "hs" : "early"
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~
src/core/ngx_log.h:86:67: note: in definition of macro ‘ngx_log_error’
   86 |     if ((log)->log_level >= level) ngx_log_error_core(level, log,
__VA_ARGS__)
      |                                                                  
^~~~~~~~~~~
src/event/quic/ngx_event_quic.c:950:23: note: in expansion of macro
‘ngx_quic_level_name’
  950 |                       ngx_quic_level_name(pkt->level));
      |                       ^~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:1005:33: error: type of formal parameter 2
is incomplete
 1005 |         ngx_quic_discard_ctx(c, ssl_encryption_initial);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c: At top level:
src/event/quic/ngx_event_quic.c:1062:71: error: parameter 2 (‘level’) has
incomplete type
 1062 | ngx_quic_discard_ctx(ngx_connection_t *c, enum
ssl_encryption_level_t level)
      |                                          
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/event/quic/ngx_event_quic.c: In function ‘ngx_quic_discard_ctx’:
src/event/quic/ngx_event_quic.c:1072:44: error: type of formal parameter 2
is incomplete
 1072 |     if (!ngx_quic_keys_available(qc->keys, level)) {
      |                                            ^~~~~
src/event/quic/ngx_event_quic.c:1076:37: error: type of formal parameter 2
is incomplete
 1076 |     ngx_quic_keys_discard(qc->keys, level);
      |                                     ^~~~~
In file included from src/event/quic/ngx_event_quic.c:10:
src/event/quic/ngx_event_quic_connection.h:56:17: error:
‘ssl_encryption_initial’ undeclared (first use in this function); did you
mean ‘ssl_encryption_level_t’?
   56 |     ((level) == ssl_encryption_initial) ? &((qc)->send_ctx[0])      
         \
      |                 ^~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:1080:11: note: in expansion of macro
‘ngx_quic_get_send_ctx’
 1080 |     ctx = ngx_quic_get_send_ctx(qc, level);
      |           ^~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic_connection.h:57:24: error:
‘ssl_encryption_handshake’ undeclared (first use in this function)
   57 |         : (((level) == ssl_encryption_handshake) ?
&((qc)->send_ctx[1])       \
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
src/event/quic/ngx_event_quic.c:1080:11: note: in expansion of macro
‘ngx_quic_get_send_ctx’
 1080 |     ctx = ngx_quic_get_send_ctx(qc, level);
      |           ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1055: objs/src/event/quic/ngx_event_quic.o]
Error 1
make[1]: Leaving directory '/home/pete/nginx-quic'
make: *** [Makefile:10: build] Error 2

Here is the code around line #1055 in `objs/Makefile`:

objs/src/event/quic/ngx_event_quic.o:   $(CORE_DEPS) \
        src/event/quic/ngx_event_quic.c
        $(CC) -c $(CFLAGS) $(CORE_INCS) \
                -o objs/src/event/quic/ngx_event_quic.o \
                src/event/quic/ngx_event_quic.c

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,295227,295227#msg-295227



More information about the nginx mailing list