chunkin-nginx-module icon indicating copy to clipboard operation
chunkin-nginx-module copied to clipboard

error: ‘ngx_http_request_t’ has no member named ‘plain_http’

Open simonkuang opened this issue 7 years ago • 0 comments

I've got the error below while trying to add chunkin-nginx-module into openresty.

cc -c -I/data/soft/openresty-1.11.2.2/build/luajit-root/usr/local/openresty-1.11.2.2/luajit/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -g -O2 -I/usr/local/geoip-1.4.8/include -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR -DNDK_SET_VAR -DNDK_SET_VAR -DLUA_DEFAULT_PATH='"/usr/local/openresty-1.11.2.2/site/lualib/?.lua;/usr/local/openresty-1.11.2.2/site/lualib/?/init.lua;/usr/local/openresty-1.11.2.2/lualib/?.lua;/usr/local/openresty-1.11.2.2/lualib/?/init.lua"' -DLUA_DEFAULT_CPATH='"/usr/local/openresty-1.11.2.2/site/lualib/?.so;/usr/local/openresty-1.11.2.2/lualib/?.so"' -DNDK_SET_VAR  -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../ngx_lua-0.10.7/src/api -I /data/soft/openssl-1.0.2k/.openssl/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I /data/soft/openresty-1.11.2.2/build/luajit-root/usr/local/openresty-1.11.2.2/luajit/include/luajit-2.1 -I src/mail -I src/stream \
        -o objs/addon/src/chunked_parser.o \
        /data/soft/chunkin-nginx-module/src/chunked_parser.c
In file included from src/core/ngx_core.h:59:0,
                 from /data/soft/chunkin-nginx-module/src/ddebug.h:6,
                 from src/chunked_parser.rl:7:
src/chunked_parser.rl: In function ‘ngx_http_chunkin_run_chunked_parser’:
src/chunked_parser.rl:325:24: error: ‘ngx_http_request_t’ has no member named ‘plain_http’
src/core/ngx_log.h:88:67: note: in definition of macro ‘ngx_log_error’
     if ((log)->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__)
                                                                   ^
make[2]: *** [objs/addon/src/chunked_parser.o] Error 1
make[2]: Leaving directory `/data/soft/openresty-1.11.2.2/build/nginx-1.11.2'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/data/soft/openresty-1.11.2.2/build/nginx-1.11.2'
make: *** [all] Error 2

configure openresty like this:

GEOIP=`find /data/soft -maxdepth 1 | grep 'GeoIP-' | sort -rV | head -n1 | xargs basename | tr A-Z a-z`
cd /data/soft/openresty-1.11.2.2 && \
'./configure' '--prefix=/usr/local/openresty-1.11.2.2' \
  '--with-stream' \
  '--with-pcre' \
  '--with-luajit' \
  '--with-poll_module' \
  '--with-threads' \
  '--with-file-aio' \
  '--with-http_realip_module' \
  '--with-http_xslt_module' \
  '--with-http_dav_module' \
  '--with-http_auth_request_module' \
  '--with-http_gzip_static_module' \
  '--with-http_geoip_module' \
  '--with-http_sub_module' \
  '--with-mail' \
  '--with-mail_ssl_module' \
  "--with-cc-opt=-I/usr/local/${GEOIP}/include" \
  "--with-ld-opt=-L/usr/local/${GEOIP}/lib" \
  '--add-module=/data/soft/chunkin-nginx-module' \
  '--with-openssl=/data/soft/openssl-1.0.2k' && \
make -j1 V=1 && make install

actually, configure command is this:

./configure --prefix=/usr/local/openresty-1.11.2.2 --with-stream --with-pcre --with-luajit --with-poll_module --with-threads --with-file-aio --with-http_realip_module --with-http_xslt_module --with-http_dav_module --with-http_auth_request_module --with-http_gzip_static_module --with-http_geoip_module --with-http_sub_module --with-mail --with-mail_ssl_module --with-cc-opt=-I/usr/local/geoip-1.4.8/include --with-ld-opt=-L/usr/local/geoip-1.4.8/lib --add-module=/data/soft/chunkin-nginx-module --with-openssl=/data/soft/openssl-1.0.2k

simonkuang avatar Apr 17 '17 03:04 simonkuang