Compile error nginx-1.23.0 mainline

604 views
Skip to first unread message

petter....@gmail.com

unread,
Jun 27, 2022, 6:10:34 AM6/27/22
to ngx-pagespeed-discuss
I have a server running Ubuntu 2020 and Nginx installed with bash <(curl -f -L -sS https://ngxpagespeed.com/install) \--nginx-version latest --ngx-pagespeed-version latest-stable.

When new version of Nginx mainline is releases, I use to upgrade using the above pagrespeed install bash script above. Normally upgrades goes well without any issues, but this time I got an error as can be seen under. Can anyone help P

/include/url -I /usr/local/src/ngx_brotli/deps/brotli/c/include -I src/mail -I src/stream \
    -o objs/addon/src/ngx_pagespeed.o \
    /root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc: In function ‘ngx_int_t net_instaweb::{anonymous}::ps_set_cache_control(ngx_http_request_t*, char*)’:
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:407:36: error: request for member ‘elts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
  407 |   if (r->headers_out.cache_control.elts == NULL) {
      |                                    ^~~~
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:408:35: error: cannot convert ‘ngx_table_elt_t**’ {aka ‘ngx_table_elt_s**’} to ‘ngx_array_t*’
  408 |     ngx_int_t rc = ngx_array_init(&r->headers_out.cache_control, r->pool,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   ngx_table_elt_t** {aka ngx_table_elt_s**}
In file included from src/core/ngx_core.h:65,
                 from src/http/ngx_http.h:13,
                 from /root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.h:33,
                 from /root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:26:
src/core/ngx_array.h:32:29: note:   initializing argument 1 of ‘ngx_int_t ngx_array_init(ngx_array_t*, ngx_pool_t*, ngx_uint_t, size_t)’
   32 | ngx_array_init(ngx_array_t *array, ngx_pool_t *pool, ngx_uint_t n, size_t size)
      |                ~~~~~~~~~~~~~^~~~~
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:415:22: error: cannot convert ‘ngx_table_elt_t**’ {aka ‘ngx_table_elt_s**’} to ‘ngx_array_t*’
  415 |       ngx_array_push(&r->headers_out.cache_control));
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      ngx_table_elt_t** {aka ngx_table_elt_s**}
In file included from src/core/ngx_core.h:65,
                 from src/http/ngx_http.h:13,
                 from /root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.h:33,
                 from /root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:26:
src/core/ngx_array.h:27:35: note:   initializing argument 1 of ‘void* ngx_array_push(ngx_array_t*)’
   27 | void *ngx_array_push(ngx_array_t *a);
      |                      ~~~~~~~~~~~~~^
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc: In function ‘bool net_instaweb::{anonymous}::ps_get_cache_control(ngx_http_request_t*, GoogleString*)’:
/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:439:74: error: request for member ‘elts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
  439 |  static_cast<ngx_table_elt_t**>(r->headers_out.cache_control.elts);
      |                                                              ^~~~

/root/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc:444:59: error: request for member ‘nelts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
  444 |   for (ngx_uint_t i = 0; i < r->headers_out.cache_control.nelts; i++) {
      |                                                           ^~~~~
make[1]: *** [objs/Makefile:1958: objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory '/root/nginx-1.23.0'
make: *** [Makefile:10: build] Error 2
Error: Failure running 'make', exiting.

Otto van der Schaaf

unread,
Jun 28, 2022, 9:56:58 AM6/28/22
to ngx-pagespeed-discuss

petter....@gmail.com

unread,
Aug 16, 2022, 6:50:12 PM8/16/22
to ngx-pagespeed-discuss
I did try to compile latest Nginx today, but compiling still fail :
make[1]: Leaving directory '/root/nginx-1.23.1'

make: *** [Makefile:10: build] Error 2
Error: Failure running 'make', exiting.
Reply all
Reply to author
Forward
0 new messages