installers icon indicating copy to clipboard operation
installers copied to clipboard

ngx_http_core_try_files_phase was not declared in this scope

Open brad13x opened this issue 6 years ago • 2 comments

Installing on a clean ubuntu 16.04 at digital ocean.

Used this guide to create some Swap space then ran the code below per this post

cd /opt
&& git clone https://github.com/serveradminsh/installers
&& cd installers/nginx
&& chmod +x installer.sh
&& ./installer.sh

/usr/local/src/github/ngx_pagespeed-1.12.34.2-beta/src/ngx_pagespeed.cc /usr/local/src/github/ngx_pagespeed-1.12.34.2-beta/src/ngx_pagespeed.cc: In function ‘ngx_int_t net_instaweb::{anonymous}::ps_preaccess_handler(ngx_http_request_t*)’: /usr/local/src/github/ngx_pagespeed-1.12.34.2-beta/src/ngx_pagespeed.cc:3011:31: error: ‘ngx_http_core_try_files_phase’ was not declared in this scope while (ph[i + 1].checker != ngx_http_core_try_files_phase && ^ objs/Makefile:2364: recipe for target 'objs/addon/src/ngx_pagespeed.o' failed make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1 make[1]: Leaving directory '/usr/local/src/github/nginx' Makefile:8: recipe for target 'build' failed make: *** [build] Error 2

Was wondering if it was because I didnt create enough Swap space (1G) or if the something is wrong with the ngx_pagespeed code.

brad13x avatar Jul 28 '17 19:07 brad13x

This is an issue with NGINX 1.13.4 and PageSpeed 1.12.34.2.

Please see my pull request: https://github.com/serveradminsh/installers/pull/5

This resolves the problem by building NGINX 1.13.3 instead.

bbbenji avatar Aug 24 '17 08:08 bbbenji

The fix that @bbbenji mention works, but there is a working candidate fix on ngx-pagespeed's repo

pagespeed#1453

CristianHG2 avatar Feb 25 '18 14:02 CristianHG2