Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

can't build incubator-pagespeed-ngx-latest-stable (Aug 17) with nginx 1.23.1 #1758

Open
parf opened this issue Aug 17, 2022 · 14 comments
Open

Comments

@parf
Copy link

parf commented Aug 17, 2022

error is:
/home/parf/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc
/home/parf/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*)’:
/home/parf/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 ‘->’ ?)
if (r->headers_out.cache_control.elts == NULL) {
^~~~
/home/parf/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*’
ngx_int_t rc = ngx_array_init(&r->headers_out.cache_control, r->pool,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/core/ngx_core.h:65,
from src/http/ngx_http.h:13,
from /home/parf/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.h:33,
from /home/parf/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)’
ngx_array_init(ngx_array_t array, ngx_pool_t pool, ngx_uint_t n, size_t size)
~~~~~~~~~~~~~^~~~~
/home/parf/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*’
ngx_array_push(&r->headers_out.cache_control));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/core/ngx_core.h:65,
from src/http/ngx_http.h:13,
from /home/parf/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.h:33,
from /home/parf/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*)’
void ngx_array_push(ngx_array_t a);
~~~~~~~~~~~~~^
/home/parf/incubator-pagespeed-ngx-latest-stable/src/ngx_pagespeed.cc: In function ‘bool net_instaweb::{anonymous}::ps_get_cache_control(ngx_http_request_t
, GoogleString
)’:
/home/parf/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 ‘->’ ?)
auto ccp = static_cast<ngx_table_elt_t**>(r->headers_out.cache_control.elts);
^~~~
/home/parf/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 ‘->’ ?)
for (ngx_uint_t i = 0; i < r->headers_out.cache_control.nelts; i++) {
^~~~~
make[1]: *** [objs/Makefile:1312: objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory '/home/parf/nginx-1.23.1'
make: *** [Makefile:10: build] Error 2
Error: Failure running 'make', exiting.

@iammattmartin
Copy link

Also seeing the same error.

@myvesta
Copy link

myvesta commented Aug 25, 2022

On Debian11 I succeeded with 1.22.0 version:
bash <(curl -f -L -sS https://ngxpagespeed.com/install) --nginx-version 1.22.0

Sadly, 1.23.1 end up with the errors that you posted above.

@SandakovMM
Copy link

#1749 looks pretty similar

@GwynethLlewelyn
Copy link

Same as #1717, #1743, #1758, #1759. The issue is related to a PSOL linked to an earlier version of glibc, as explained by @eilandert, who has posted binaries compiled to a recent version of glibc on http://www.tiredofit.nl/psol-jammy.tar.xz.

I think that a fix in this case would be to check for the presence of the old glibc and force a recompilation of PSOL...

@eilandert
Copy link

This error is due to the API change in nginx 1.23.0+ :-)

@brandnewx
Copy link

The fact that Pagespeed module is not supported by Nginx 1.23.x for months should make everyone abandon this module altogether because it has been abandoned by the devs already. Is Google too broke to hire a dev or two to maintain one of the most important nginx modules out there?

@eilandert
Copy link

eilandert commented Sep 17, 2022

The fact that Pagespeed module is not supported by Nginx 1.23.x for months should make everyone abandon this module altogether because it has been abandoned by the devs already. Is Google too broke to hire a dev or two to maintain one of the most important nginx modules out there?

What are you talking about? This has been fixed in June. #1751

ngx_pagespeed 1.15.0.0-8917
nginx version: nginx/1.23.1
built with OpenSSL 3.0.5 5 Jul 2022

@brandnewx
Copy link

brandnewx commented Sep 17, 2022

What are you talking about? This has been fixed in June. #1751

Then please submit a new stable release or tag so that people can build a production module from. You don't expect people to build production module off main branch, do you?

The said merge still fails 2 tests. It appears the CI actions are outdated as well.

@beobungbu
Copy link

The fact that Pagespeed module is not supported by Nginx 1.23.x for months should make everyone abandon this module altogether because it has been abandoned by the devs already. Is Google too broke to hire a dev or two to maintain one of the most important nginx modules out there?

What are you talking about? This has been fixed in June. #1751

ngx_pagespeed 1.15.0.0-8917 nginx version: nginx/1.23.1 built with OpenSSL 3.0.5 5 Jul 2022

how to build from source code on ubuntu 20.04?

@johndahl147
Copy link

I'm having this same error. The fix is not working for me. Error 1
make[1]: Leaving directory '/root/nginx-1.23.1'
make: *** [Makefile:10: build] Error 2
Error: Failure running 'make', exiting. @eilandert

@phamgiang2510
Copy link

The fact that Pagespeed module is not supported by Nginx 1.23.x for months should make everyone abandon this module altogether because it has been abandoned by the devs already. Is Google too broke to hire a dev or two to maintain one of the most important nginx modules out there?

What are you talking about? This has been fixed in June. #1751

ngx_pagespeed 1.15.0.0-8917 nginx version: nginx/1.23.1 built with OpenSSL 3.0.5 5 Jul 2022

How did you install it? I still get this error with Ubuntu 22.04

@Kerberus35
Copy link

Kerberus35 commented Sep 25, 2022

Both the automated installer as the instructions on the install page are broken for nginx 1.23.x. The installer in /script is broken as well.

Can somebody please post their build instructions (as eilandert has succesfully build a compatible version from master) or update the auto installer / instructions?

@eilandert
Copy link

Both the automated installer as the instructions on the install page are broken for nginx 1.23.x. The installer in /script is broken as well.

Can somebody please post their build instructions (as eilandert has succesfully build a compatible version from master) or update the auto installer / instructions?

I fixed an example here:
#1760

@Kerberus35
Copy link

Awesome eilandert. Bedankt!

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

No branches or pull requests