Closed forting closed 4 years ago
I have solved this issue by the file objs/Makefile of the nginx-VERSION folder. So i have remove all -W.. flags of the CFLAGS option.
So if anyone have another solution?
Have same issue :/
Hello, what version of gcc are you using please ? it might be related to this.
Hi, gcc is gcc (Debian 8.3.0-6) 8.3.0 g++ is g++ (Debian 8.3.0-6) 8.3.0
same question, gcc version 8.3.0 (Debian 8.3.0-6)
apt install gcc-6; ./configure --add-dynamic-module=../naxsi/naxsi_src make CC=gcc-6 modules
Specify the GCC version to resolve
sorry for my late answer but, on debian 10 gcc-6 aren't available. I've used gcc-7 and it's works to compile naxsi module. but gcc-8 doesn't compile.
Hello all,
I would like to compile naxsi on my debian 10 (amd64).
So i run those commands:
apt update apt upgrade -y apt install build-essential libpcre3-dev zlib1g-dev export NAXSI_VER=0.56 cd /tmp wget https://github.com/nbs-system/naxsi/archive/$NAXSI_VER.tar.gz -O naxsi_$NAXSI_VER.tar.gz export NGINX_VER=1.17.3 wget https://nginx.org/download/nginx-$NGINX_VER.tar.gz tar vxf naxsi_$NAXSI_VER.tar.gz tar vxf nginx-$NGINX_VER.tar.gz cd nginx-$NGINX_VER ./configure --add-dynamic-module=../naxsi-$NAXSI_VER/naxsi_src/ make modules
So when i run ./configure: ` checking for OS
Configuration summary
using system zlib library
nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx modules path: "/usr/local/nginx/modules" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp" `
and when i run make modules:
make -f objs/Makefile modules make[1] : on entre dans le répertoire « /tmp/nginx-1.17.3 » cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \ -o objs/addon/naxsi_src/naxsi_runtime.o \ ../naxsi-0.56/naxsi_src//naxsi_runtime.c ../naxsi-0.56/naxsi_src//naxsi_runtime.c: In function ‘ngx_http_dummy_is_rule_whitelisted_n’: ../naxsi-0.56/naxsi_src//naxsi_runtime.c:728:5: error: ‘strncat’ specified bound 1 equals source length [-Werror=stringop-overflow=] strncat((char*)tmp_hashname.data, "#", 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../naxsi-0.56/naxsi_src//naxsi_runtime.c:731:3: error: ‘strncat’ specified bound 1 equals source length [-Werror=stringop-overflow=] strncat((char*)tmp_hashname.data, "#", 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [objs/Makefile:1235: objs/addon/naxsi_src/naxsi_runtime.o] Error 1 make[1] : on quitte le répertoire « /tmp/nginx-1.17.3 » make: *** [Makefile:14: modules] Error 2
So how i can patch this to build naxsi ?
Thanks, Guillaume F