ngx_http_proxy_connect_module
ngx_http_proxy_connect_module copied to clipboard
make error找不到变量
/Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1459:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT || !plcf->accept_connect) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1487:30: error: no member named 'connect_host' in 'struct ngx_http_request_s' url.url.len = r->connect_host.len; ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1488:31: error: no member named 'connect_host' in 'struct ngx_http_request_s' url.url.data = r->connect_host.data; ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1492:26: error: no member named 'connect_host' in 'struct ngx_http_request_s' url.url.len = r->connect_host.len; ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1493:27: error: no member named 'connect_host' in 'struct ngx_http_request_s' url.url.data = r->connect_host.data; ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1496:27: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' url.default_port = r->connect_port_n; ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1541:55: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' u->resolved->port = (in_port_t) (url.no_port ? r->connect_port_n : url.port); ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1577:27: error: no member named 'connect_host' in 'struct ngx_http_request_s'; did you mean 'connection'? &r->connect_host); ^~~~~~~~~~~~ connection src/core/ngx_log.h:88:67: note: expanded from macro 'ngx_log_error' if ((log)->log_level >= level) ngx_log_error_core(level, log, VA_ARGS) ^ src/http/ngx_http_request.h:374:39: note: 'connection' declared here ngx_connection_t *connection; ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1653:41: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' if ((ports[i][1] == 0 && r->connect_port_n == ports[i][0]) ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1654:39: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' || (ports[i][0] <= r->connect_port_n && r->connect_port_n <= ports[i][1])) ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1654:60: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' || (ports[i][0] <= r->connect_port_n && r->connect_port_n <= ports[i][1])) ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1662:16: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' if (r->connect_port_n == 443 || r->connect_port_n == 563) { ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1662:44: error: no member named 'connect_port_n' in 'struct ngx_http_request_s' if (r->connect_port_n == 443 || r->connect_port_n == 563) { ~ ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2014:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2051:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2093:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2150:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2203:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ /Users/w/Github/openresty-1.19.3.1/../ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2231:22: error: use of undeclared identifier 'NGX_HTTP_CONNECT' if (r->method != NGX_HTTP_CONNECT) { ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [objs/addon/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.o] Error 1 make[1]: *** [build] Error 2 make: *** [all] Error 2
目录openresty-1.19.3.1和ngx_http_proxy_connect_module在同一级
./configure --prefix=/usr/local/Cellar/openresty/1.19.3.1_1/nginx --with-cc-opt='-O2 -I/usr/local/include -I/usr/local/opt/pcre/include -I/usr/local/opt/openresty-openssl111/include' --add-module=./bundle/ngx_devel_kit-0.3.1 --add-module=./bundle/echo-nginx-module-0.62 --add-module=./bundle/xss-nginx-module-0.06 --add-module=./bundle/ngx_coolkit-0.2 --add-module=./bundle/set-misc-nginx-module-0.32 --add-module=./bundle/form-input-nginx-module-0.12 --add-module=./bundle/encrypted-session-nginx-module-0.08 --add-module=./bundle/srcache-nginx-module-0.32 --add-module=./bundle/ngx_lua-0.10.19 --add-module=./bundle/ngx_lua_upstream-0.07 --add-module=./bundle/headers-more-nginx-module-0.33 --add-module=./bundle/array-var-nginx-module-0.05 --add-module=./bundle/memc-nginx-module-0.19 --add-module=./bundle/redis2-nginx-module-0.15 --add-module=./bundle/redis-nginx-module-0.3.7 --add-module=./bundle/ngx_stream_lua-0.0.9 --with-ld-opt='-Wl,-rpath,/usr/local/Cellar/openresty/1.19.3.1_1/luajit/lib -L/usr/local/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/openresty-openssl111/lib' --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/local/var/run/openresty.lock --conf-path=/usr/local/etc/openresty/nginx.conf --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-pcre-jit --with-ipv6 --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_geoip_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-stream --with-http_ssl_module --add-module=../ngx_http_proxy_connect_module
how can I fix the problem? /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_handler’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1459:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT || !plcf->accept_connect) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1459:22: note: each undeclared identifier is reported only once for each function it appears in /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1487:28: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1488:29: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1492:24: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1493:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1496:25: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ url.default_port = r->connect_port_n; ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1541:53: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ u->resolved->port = (in_port_t) (url.no_port ? r->connect_port_n : url.port); ^ In file included from src/core/ngx_core.h:60:0, from /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:7: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1577:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ &r->connect_host); ^ src/core/ngx_log.h:86:67: note: in definition of macro ‘ngx_log_error’ if ((log)->log_level >= level) ngx_log_error_core(level, log, VA_ARGS) ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_allow_handler’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1653:39: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if ((ports[i][1] == 0 && r->connect_port_n == ports[i][0]) ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1654:37: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ || (ports[i][0] <= r->connect_port_n && r->connect_port_n <= ports[i][1])) ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1654:58: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ || (ports[i][0] <= r->connect_port_n && r->connect_port_n <= ports[i][1])) ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1662:14: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:1662:42: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_variable_get_time’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2014:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_variable_set_time’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2051:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_resolve_time_variable’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2093:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_connect_time_variable’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2150:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_variable_get_response’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2203:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_variable_set_response’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2231:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method != NGX_HTTP_CONNECT) { ^ /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_post_read_handler’: /usr/local/module/ngx_http_proxy_connect_module/ngx_http_proxy_connect_module.c:2269:22: error: ‘NGX_HTTP_CONNECT’ undeclared (first use in this function) if (r->method == NGX_HTTP_CONNECT) { ^
Hi,
These error means xxxproxy_connectxxx.patch are not patched to nginx source, make sure you have patched the right patch before building the nginx source.
The patch will add new macro for this error:L
error: use of undeclared identifier 'NGX_HTTP_CONNECT'
See https://github.com/chobits/ngx_http_proxy_connect_module#select-patch
think it resolved. feel free to reopen if u still have the same problem