Closed typ431127 closed 1 year ago
系统版本: CentOS Linux release 7.3.1611 (Core) 内核版本: 3.10.0-514.26.2.el7.x86_64 nginx版本: nginx-1.20.1 nginx_waf版本: current最新版 git拉取 编译参数:
./configure --prefix=/app/nginx-1.20.1 --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_v2_module --with-openssl=/data/install/openssl-1.0.2l/ --with-cc-opt=-std=gnu99 --add-module=/usr/local/src/ngx_waf --with-debug
make阶段报错
/usr/local/src/ngx_waf/src/ngx_http_waf_module_check.c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -std=gnu99 -fstack-protector-strong -Wno-sign-compare -I src/core -I src/event -I src/event/modules -I src/os/unix -I /data/install/openssl-1.0.2l//.openssl/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I /usr/local/src/ngx_waf/inc -I /usr/local/src/ngx_waf/lib -I /usr/local/modsecurity/include -I /usr/local/src/ngx_waf/lib/uthash/include -I /usr/local/src/nginx-1.20.1/libsodium/include \ -o objs/addon/src/ngx_http_waf_module_config.o \ /usr/local/src/ngx_waf/src/ngx_http_waf_module_config.c In file included from /usr/local/src/ngx_waf/inc/ngx_http_waf_module_type.h:23:0, from /usr/local/src/ngx_waf/inc/ngx_http_waf_module_config.h:22, from /usr/local/src/ngx_waf/src/ngx_http_waf_module_config.c:1: /usr/local/src/ngx_waf/src/ngx_http_waf_module_config.c: In function ‘ngx_http_waf_captcha_conf’: /usr/local/src/ngx_waf/inc/ngx_http_waf_module_macro.h:359:33: error: the comparison will always evaluate as ‘false’ for the address of ‘sitekey’ will never be NULL [-Werror=address] #define ngx_is_null_str(s) ((s) == NULL || (s)->data == NULL || (s)->len == 0 || ((s)->data[0] == '\0' && (s)->len == 1)) ^ /usr/local/src/ngx_waf/src/ngx_http_waf_module_config.c:833:13: note: in expansion of macro ‘ngx_is_null_str’ if (ngx_is_null_str(&sitekey)) { ^ cc1: all warnings being treated as errors make[1]: *** [objs/addon/src/ngx_http_waf_module_config.o] Error 1 make[1]: Leaving directory `/usr/local/src/nginx-1.20.1' make: *** [build] Error 2
请尝试升级 gcc 版本。
系统版本: CentOS Linux release 7.3.1611 (Core) 内核版本: 3.10.0-514.26.2.el7.x86_64 nginx版本: nginx-1.20.1 nginx_waf版本: current最新版 git拉取 编译参数:
错误说明
make阶段报错