[GH-ISSUE #111] current 10.1.2编译报错 #82

Closed
opened 2026-03-04 12:18:48 +03:00 by kerem · 1 comment
Owner

Originally created by @desslee on GitHub (Sep 26, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/111

  • 如何触发错误。
    nginx编译报错

  • ngx_waf 的版本/分支。
    current 10.1.2

  • nginx -V 命令的输出内容。
    configure arguments: --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/src/ngx_waf --with-cc-opt=-std=gnu99

  • 出错时 shell 的输出内容。

/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

make -f objs/Makefile
make[1]: Entering directory `/usr/local/src/nginx-1.20.1'
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 objs -I src/http -I src/http/modules -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/src/ngx_http_waf_module_config.c:1:0:
/usr/local/src/ngx_waf/inc/ngx_http_waf_module_config.h:19:21: fatal error: utarray.h: No such file or directory
 #include <utarray.h>
                     ^
compilation terminated.
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

可以提供的信息

  • 操作系统,包括名称和版本。
    Centos7 Linux root 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Originally created by @desslee on GitHub (Sep 26, 2022). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/111 * 如何触发错误。 nginx编译报错 * ngx_waf 的版本/分支。 current 10.1.2 * `nginx -V` 命令的输出内容。 configure arguments: --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/src/ngx_waf --with-cc-opt=-std=gnu99 * 出错时 `shell` 的输出内容。 ``` /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 ``` ``` make -f objs/Makefile make[1]: Entering directory `/usr/local/src/nginx-1.20.1' 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 objs -I src/http -I src/http/modules -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/src/ngx_http_waf_module_config.c:1:0: /usr/local/src/ngx_waf/inc/ngx_http_waf_module_config.h:19:21: fatal error: utarray.h: No such file or directory #include <utarray.h> ^ compilation terminated. 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 ``` ## 可以提供的信息 * 操作系统,包括名称和版本。 Centos7 Linux root 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
kerem closed this issue 2026-03-04 12:18:48 +03:00
Author
Owner

@Mr-BeanSir commented on GitHub (Oct 1, 2022):

你好,我遇到了同样问题,请问你是如何解决的?

<!-- gh-comment-id:1264437562 --> @Mr-BeanSir commented on GitHub (Oct 1, 2022): 你好,我遇到了同样问题,请问你是如何解决的?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#82
No description provided.