chobits/ngx_http_proxy_connect_module

openresty-1.21.4.3 gmake errors

caesarok opened this issue · 3 comments

Use environment: openresty-1.21.4.3

./configure --prefix=/usr/local/openresty --with-http_sub_module --with-http_v2_module --with-openssl=/root/openssl-1.1.1k --with-http_flv_module --with-http_stub_status_module --with-http_gzip_static_module --add-module=/root/ngx_http_proxy_connect_module-master/ -j4 --with-luajit

patch -p 1 < /root/ngx_http_proxy_connect_module-master/patch/proxy_connect.patch
patch -p 1 < /root/ngx_http_proxy_connect_module-master/patch/proxy_connect_rewrite_102101.patch
gmake
Compilation error,who can help me?

===
/root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_handler’: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1498:28: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1499:29: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1503:24: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1504:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1507:25: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ url.default_port = r->connect_port_n; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1552: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 /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:7: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1588:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ &r->connect_host); ^ 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__) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_allow_handler’: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1664: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]) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1665: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])) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1665: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])) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1673:14: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1673:42: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ gmake[2]: *** [objs/addon/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.o] Error 1 gmake[2]: Leaving directory/root/openresty-1.21.4.3/build/nginx-1.21.4'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory /root/openresty-1.21.4.3/build/nginx-1.21.4' gmake: *** [all] Error 2

Use environment: openresty-1.21.4.3

./configure --prefix=/usr/local/openresty --with-http_sub_module --with-http_v2_module --with-openssl=/root/openssl-1.1.1k --with-http_flv_module --with-http_stub_status_module --with-http_gzip_static_module --add-module=/root/ngx_http_proxy_connect_module-master/ -j4 --with-luajit

patch -p 1 < /root/ngx_http_proxy_connect_module-master/patch/proxy_connect.patch patch -p 1 < /root/ngx_http_proxy_connect_module-master/patch/proxy_connect_rewrite_102101.patch gmake Compilation error,who can help me?

=== /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_handler’: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1498:28: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1499:29: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1503:24: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.len = r->connect_host.len; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1504:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ url.url.data = r->connect_host.data; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1507:25: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ url.default_port = r->connect_port_n; ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1552: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 /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:7: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1588:25: error: ‘ngx_http_request_t’ has no member named ‘connect_host’ &r->connect_host); ^ 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__) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c: In function ‘ngx_http_proxy_connect_allow_handler’: /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1664: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]) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1665: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])) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1665: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])) ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1673:14: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ /root/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.c:1673:42: error: ‘ngx_http_request_t’ has no member named ‘connect_port_n’ if (r->connect_port_n == 443 || r->connect_port_n == 563) { ^ gmake[2]: *** [objs/addon/ngx_http_proxy_connect_module-master/ngx_http_proxy_connect_module.o] Error 1 gmake[2]: Leaving directory/root/openresty-1.21.4.3/build/nginx-1.21.4' gmake[1]: *** [build] Error 2 gmake[1]: Leaving directory /root/openresty-1.21.4.3/build/nginx-1.21.4' gmake: *** [all] Error 2
===

patch -d build/nginx-1.21.4.3 -p1 < /root/ngx_http_proxy_connect_module-master/patch/proxy_connect_rewrite_102101.patch

hello,im chinese, that because you need
patch -p1 < /usr/local/ngx_http_proxy_connect_module/patch/proxy_connect_rewrite_102101.patch
its very easy,i just find the key to the problem,maybe help you,不谢谢!

I think @liushang789 provided an effective solution.
If you still have problem, I think you could check our GITHUB CI/CD progress, it worked already there. https://github.com/chobits/ngx_http_proxy_connect_module/actions/runs/8390166097/workflow