mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #86] current分支make module时报错 #200
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ray929 on GitHub (Jan 23, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/86
make module时报错,lts分支能顺利编译并使用
os:centos7
# uname -a Linux iZuf6fzzmoxcs14np6bfgkZ 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxnginx版本:1.20.1
ngx_waf 的版本/分支:current
nginx -V命令的输出内容:
nginx version: nginx/1.20.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) built with OpenSSL 1.1.1g FIPS 21 Apr 2020 (running with OpenSSL 1.1.1k FIPS 25 Mar 2021) TLS SNI support enabled configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'错误信息:
In file included from /usr/local/src/ngx_waf/inc/ngx_http_waf_module_config.h:18:0, 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: *** [modules] Error 2非常感谢
@ray929 commented on GitHub (Jan 23, 2022):
@ADD-SP commented on GitHub (Jan 24, 2022):
参考 #78 。
@ray929 commented on GitHub (Jan 24, 2022):
搞定,十分感谢