Closed ghost closed 5 months ago
I just tried to build this module with NGINX 1.25.3.1, while it working perfectly with 1.21.4.3 which I had in use previously.
Please see my output below:
22.98 -o objs/src/http/modules/perl/ngx_http_perl_module.o \ 22.98 src/http/modules/perl/ngx_http_perl_module.c 22.99 /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c: In function ‘get_jwt’: 22.99 /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c:657:58: error: ‘ngx_http_headers_in_t’ has no member named ‘cookies’; did you mean ‘cookie’? 22.99 657 | if (ngx_http_parse_multi_header_lines(&r->headers_in.cookies, &jwt_location, &jwtCookieVal) != NGX_DECLINED) 22.99 | ^~~~~~~ 22.99 | cookie 22.99 /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c:657:67: warning: passing argument 2 of ‘ngx_http_parse_multi_header_lines’ from incompatible pointer type [-Wincompatible-pointer-types] 22.99 657 | if (ngx_http_parse_multi_header_lines(&r->headers_in.cookies, &jwt_location, &jwtCookieVal) != NGX_DECLINED) 22.99 | ^~~~~~~~~~~~~ 22.99 | | 22.99 | ngx_str_t * 22.99 In file included from /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c:12: 22.99 src/http/ngx_http.h:112:22: note: expected ‘ngx_table_elt_t *’ {aka ‘struct ngx_table_elt_s *’} but argument is of type ‘ngx_str_t *’ 22.99 112 | ngx_table_elt_t *headers, ngx_str_t *name, ngx_str_t *value); 22.99 | ~~~~~~~~~~~~~~~~~^~~~~~~ 22.99 /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c:657:9: error: too few arguments to function ‘ngx_http_parse_multi_header_lines’ 22.99 657 | if (ngx_http_parse_multi_header_lines(&r->headers_in.cookies, &jwt_location, &jwtCookieVal) != NGX_DECLINED) 22.99 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22.99 In file included from /tmp/app/ngx-http-auth-jwt-module-2.0.3/src/ngx_http_auth_jwt_module.c:12: 22.99 src/http/ngx_http.h:111:18: note: declared here 22.99 111 | ngx_table_elt_t *ngx_http_parse_multi_header_lines(ngx_http_request_t *r, 22.99 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23.00 make[2]: *** [objs/Makefile:3201: objs/addon/src/ngx_http_auth_jwt_module.o] Error 1 23.00 make[2]: *** Waiting for unfinished jobs.... 23.31 make[2]: Leaving directory '/tmp/app/openresty-1.25.3.1/build/nginx-1.25.3' 23.31 make[1]: Leaving directory '/tmp/app/openresty-1.25.3.1/build/nginx-1.25.3' 23.31 make[1]: *** [Makefile:10: build] Error 2 23.31 make: *** [Makefile:9: all] Error 2 ------ failed to solve: process "/bin/sh -c cd /tmp/app/openresty-\"${RESTY_VERSION}\" && ./configure -j\"$(nproc)\" --prefix=\"${RESTY_INSTALL_PATH}\" --conf-path=\"${RESTY_INSTALL_PATH}\"/openresty.conf --pid-path=/run/openresty.pid --sbin-path=/usr/sbin/openresty --lock-path=/var/lock/openresty.lock --with-ld-opt='-Wl,-rpath,/usr/local/lib/' --with-cc-opt='-O2 -fstack-protector-strong -DTCP_FASTOPEN=23' --user=\"${OS_USER}\" --group=\"${OS_USER}\" --http-log-path=/var/log/openresty/access.log --error-log-path=/var/log/openresty/error.log --http-client-body-temp-path=/var/cache/openresty/body_temp --http-proxy-temp-path=/var/cache/openresty/proxy_temp --http-uwsgi-temp-path=/var/cache/openresty/uwsgi_temp --modules-path=/usr/lib64/openresty_modules --without-http_split_clients_module --without-http_ssi_module --without-http_mirror_module --without-http_geo_module --without-http_fastcgi_module --without-http_scgi_module --without-http_memcached_module --without-mail_smtp_module --without-mail_imap_module --without-mail_pop3_module --without-http_rds_csv_module --without-http_upstream_ip_hash_module --without-http_upstream_least_conn_module --without-http_upstream_keepalive_module --without-http_empty_gif_module --without-stream_access_module --without-stream_geo_module --without-stream_split_clients_module --without-stream_return_module --without-stream_upstream_hash_module --without-stream_upstream_least_conn_module --without-stream_upstream_zone_module --with-http_v2_module --with-poll_module --with-http_realip_module --with-stream_ssl_preread_module --with-stream_ssl_module --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_stub_status_module --with-http_sub_module --with-http_dav_module --with-threads --with-debug --with-compat --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-md5-asm --with-sha1-asm --with-pcre-jit --with-http_ssl_module --with-http_xslt_module --with-http_perl_module --with-stream --with-openssl=/tmp/app/openssl-\"${RESTY_OPENSSL_VERSION}\" --with-pcre=/tmp/app/pcre-\"${RESTY_PCRE_VERSION}\" --add-module=/tmp/app/ngx-http-auth-jwt-module-\"${RESTY_JWT_MODULE_VERSION}\" --add-module=/tmp/app/nginx-dav-ext-module-\"${RESTY_DAV_EXT_VERSION}\" --add-module=/tmp/app/ngx-fancyindex-\"${RESTY_FANCYINDEX_VERSION}\" --add-module=/tmp/app/ngx_brotli --add-module=/tmp/app/ngx_http_geoip2_module-\"${RESTY_GEOIP2_VERSION}\" && make -j\"$(nproc)\" && make install && cp -r /tmp/app/lua-resty-http-\"${RESTY_HTTP_VERSION}\"/lib/resty \"${RESTY_INSTALL_PATH}\"/lualib/" did not complete successfully: exit code: 2
Can somebody help?
My bad, it was enough to simply set:
--with-cc-opt='-O2 -fstack-protector-strong -DTCP_FASTOPEN=23 -DNGX_LINKED_LIST_COOKIES=1'
-> -DNGX_LINKED_LIST_COOKIES=1
I just tried to build this module with NGINX 1.25.3.1, while it working perfectly with 1.21.4.3 which I had in use previously.
Please see my output below:
Can somebody help?