mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #69] amazon linux 2 编译出错 #185
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#185
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 @purplegrape on GitHub (Oct 9, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/69
环境: Amazon LInux 2 + gcc 7.3.1
版本: nginx 1.20.1 + ngx_waf 6.1.5
编译参数如下
报错信息如下
make -f objs/Makefile modules
make[1]: Entering directory
/home/ec2-user/rpmbuild/BUILD/nginx-module-waf-1.20.1' 此处省略N字 ngx_waf-6.1.5/src/ngx_http_waf_module_vm.c cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=gnu99 -I src/core -I src/event -I src/event/modules -I src/os/unix -I ngx_waf-6.1.5/inc -I ngx_waf-6.1.5/inc/libinjection/src -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \ -o objs/addon/src/ngx_http_waf_module_lexer.o \ ngx_waf-6.1.5/src/ngx_http_waf_module_lexer.c src/ngx_http_waf_module_lexer.c: In function 'ngx_http_waf_lex': src/ngx_http_waf_module_lexer.c:933:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] src/ngx_http_waf_module_lexer.c: In function 'ngx_http_waf__scan_bytes': src/ngx_http_waf_module_lexer.c:1986:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] cc1: all warnings being treated as errors make[1]: *** [objs/addon/src/ngx_http_waf_module_lexer.o] Error 1 make[1]: Leaving directory/home/ec2-user/rpmbuild/BUILD/nginx-module-waf-1.20.1'make: *** [modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.0OwOq2 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.0OwOq2 (%build)
@ADD-SP commented on GitHub (Oct 9, 2021):
编辑 nginx 源码目录下的
objs/Makefile文件,删除CFLAGS那一行的-Werror。@purplegrape commented on GitHub (Oct 9, 2021):
编译通过,感谢!