apache / incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
http://ngxpagespeed.com/
Apache License 2.0
4.37k stars 365 forks source link

Error compiling 1.9.32.6 - no matching function for call to 'net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(NULL)' #1000

Closed 27Bslash6 closed 9 years ago

27Bslash6 commented 9 years ago

Where I had no trouble compiling 1.9.32.4-beta in my Dockerfile, upon changing to 1.9.32.6 I receive the following error:

/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc: In function 'void net_instaweb::{anonymous}::ps_release_request_context(void*)':
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:1713:42: error: no matching function for call to 'net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(NULL)'
     ctx->recorder->DoneAndSetHeaders(NULL);  // Deletes recorder.
                                          ^
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:1713:42: note: candidate is:
In file included from /tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:56:0:
/tmp/ngx_pagespeed-1.9.32.6-beta/psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note: void net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*, bool)
   void DoneAndSetHeaders(ResponseHeaders* response_headers,
        ^
/tmp/ngx_pagespeed-1.9.32.6-beta/psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note:   candidate expects 2 arguments, 1 provided
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc: In function 'ngx_int_t net_instaweb::{anonymous}::in_place::ps_in_place_body_filter(ngx_http_request_t*, ngx_chain_t*)':
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:2509:57: error: no matching function for call to 'net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*)'
       ctx->recorder->DoneAndSetHeaders(&response_headers);
                                                         ^
/tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:2509:57: note: candidate is:
In file included from /tmp/ngx_pagespeed-1.9.32.6-beta/src/ngx_pagespeed.cc:56:0:
/tmp/ngx_pagespeed-1.9.32.6-beta/psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note: void net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*, bool)
   void DoneAndSetHeaders(ResponseHeaders* response_headers,
        ^
/tmp/ngx_pagespeed-1.9.32.6-beta/psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note:   candidate expects 2 arguments, 1 provided
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory `/tmp/nginx-1.9.3'
make: *** [build] Error 2

This is built on a Phusion Ubuntu trusty image - https://registry.hub.docker.com/u/phusion/baseimage/

ENV PAGESPEED_VERSION 1.9.32.6
ENV NGINX_VERSION 1.9.3
ENV OPENSSL_VERSION 1.0.1p
apt-get update && \
    apt-get -y install wget build-essential zlib1g-dev libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev && \
    echo "Downloading ngx_pagespeed v${PAGESPEED_VERSION} ..." && wget -qO - https://github.com/pagespeed/ngx_pagespeed/archive/v${PAGESPEED_VERSION}-beta.tar.gz | tar zxf - -C /tmp && \
    echo "Downloading pagespeed psol v${PAGESPEED_VERSION} ..." && wget -qO - https://dl.google.com/dl/page-speed/psol/${PAGESPEED_VERSION}.tar.gz | tar xzf  - -C /tmp/ngx_pagespeed-${PAGESPEED_VERSION}-beta && \
    echo "Downloading nginx v${NGINX_VERSION} ..." && wget -qO - http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | tar zxf - -C /tmp && \
    echo "Downloading openssl v${OPENSSL_VERSION} ..." && wget -qO - https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz | tar xzf  - -C /tmp && \
    cd /tmp/nginx-${NGINX_VERSION} && ./configure \
        --prefix=/etc/nginx  \
        --sbin-path=/usr/sbin/nginx  \
        --conf-path=/etc/nginx/nginx.conf  \
        --error-log-path=/var/log/nginx/error.log \
        --http-log-path=/var/log/nginx/access.log \
        --pid-path=/var/run/nginx.pid \
        --lock-path=/var/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-http_ssl_module  \
        --with-http_realip_module  \
        --with-http_addition_module  \
        --with-http_sub_module  \
        --with-http_dav_module  \
        --with-http_flv_module  \
        --with-http_mp4_module  \
        --with-http_gunzip_module  \
        --with-http_gzip_static_module  \
        --with-http_random_index_module  \
        --with-http_secure_link_module \
        --with-http_stub_status_module  \
        --with-http_auth_request_module  \
        --without-http_autoindex_module \
        --without-http_ssi_module \
        --with-threads  \
        --with-stream  \
        --with-stream_ssl_module  \
        --with-mail  \
        --with-mail_ssl_module  \
        --with-file-aio  \
        --with-http_spdy_module  \
        --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2'  \
        --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed' \
        --with-ipv6 \
        --with-pcre-jit \
        --with-openssl=/tmp/openssl-${OPENSSL_VERSION} \
        --add-module=/tmp/ngx_pagespeed-${PAGESPEED_VERSION}-beta && make && make install
# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Model name:            Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
Stepping:              9
CPU MHz:               3490.566
CPU max MHz:           4500.0000
CPU min MHz:           1600.0000
BogoMIPS:              6999.58
Virtualisation:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
episage commented 9 years ago

UP & my log from Docker:

/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc: In function 'void net_instaweb::{anonymous}::ps_release_request_context(void*)':
/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:1713:42: error: no matching function for call to 'net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(NULL)'
     ctx->recorder->DoneAndSetHeaders(NULL);  // Deletes recorder.
                                          ^
/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:1713:42: note: candidate is:
In file included from /b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:56:0:
/b/ngx_pagespeed-release-1.9.32.6-beta//psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note: void net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*, bool)
   void DoneAndSetHeaders(ResponseHeaders* response_headers,
        ^
/b/ngx_pagespeed-release-1.9.32.6-beta//psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note:   candidate expects 2 arguments, 1 provided
/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc: In function 'ngx_int_t net_instaweb::{anonymous}::in_place::ps_in_place_body_filter(ngx_http_request_t*, ngx_chain_t*)':
/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:2509:57: error: no matching function for call to 'net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*)'
       ctx->recorder->DoneAndSetHeaders(&response_headers);
                                                         ^
/b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:2509:57: note: candidate is:
In file included from /b/ngx_pagespeed-release-1.9.32.6-beta//src/ngx_pagespeed.cc:56:0:
/b/ngx_pagespeed-release-1.9.32.6-beta//psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note: void net_instaweb::InPlaceResourceRecorder::DoneAndSetHeaders(net_instaweb::ResponseHeaders*, bool)
   void DoneAndSetHeaders(ResponseHeaders* response_headers,
        ^
/b/ngx_pagespeed-release-1.9.32.6-beta//psol/include/net/instaweb/system/public/in_place_resource_recorder.h:120:8: note:   candidate expects 2 arguments, 1 provided
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory `/b/nginx-1.9.3'
make: *** [build] Error 2
INFO[0245] The command [/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get update     && apt-get -y install wget unzip     && apt-get -y install build-essential zlib1g-dev libpcre3 libpcre3-dev     && mkdir ${BUILDDIR} && cd ${BUILDDIR}     && wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip     && unzip release-${NPS_VERSION}-beta.zip     && cd ngx_pagespeed-release-${NPS_VERSION}-beta/     && wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz     && tar -xzvf ${NPS_VERSION}.tar.gz     && cd ${BUILDDIR}     && wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz     && tar -xvzf nginx-${NGINX_VERSION}.tar.gz     && cd ${BUILDDIR}     && wget ftp://ftp.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz     && tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz     && cd ${BUILDDIR}/nginx-${NGINX_VERSION}     && ./configure --add-module=${BUILDDIR}/ngx_pagespeed-release-${NPS_VERSION}-beta/ --with-openssl=${BUILDDIR}/openssl-${OPENSSL_VERSION} --with-http_ssl_module --with-http_realip_module     && make && make install     && cd /     && rm -r ${BUILDDIR}     && apt-get purge -y --auto-remove wget build-essential unzip     && rm -rf /var/lib/apt/lists/*] returned a non-zero code: 2

https://github.com/episage/docker-ngx-psm/blob/master/Dockerfile

jeffkaufman commented 9 years ago

I'm sorry about that! Totally our fault. Fixed in 0f3f268. Redownload https://github.com/pagespeed/ngx_pagespeed/archive/release-1.9.32.6-beta.zip and it should work now.