Bug#1068207: [Pkg-nginx-maintainers] Bug#1068207:
Hi Jan, On Tue, Apr 23, 2024 at 07:29:37PM +0200, Jan Mojzis wrote: > Hi, > > 'https://wiki.debian.org/qa.debian.org/FTBFS' > see: > 2024-03-13 -Werror=implicit-function-declaration > ... In dpkg version 1.22.6, the compiler flag > -Werror=implicit-function-declaration was enabled by default for all > architectures in build flags > ... > ... oh, thanks, this is what I was looking for... > You need to patch libnginx-mod-http-modsecurity source code: > > ~~~ > diff --git a/config b/config > index c6e7467..3bf06a8 100644 > --- a/config > +++ b/config > @@ -10,7 +10,8 @@ > > ngx_feature_name= > ngx_feature_run=no > -ngx_feature_incs="#include " > +ngx_feature_incs="#include > +#include " > ngx_feature_libs="-lmodsecurity" > ngx_feature_test='printf("hello");' > ngx_modsecurity_opt_I= > ~~~ yes, this is how my patch looks like. Perhaps I will add this to the upstream too. Many thanks. a.
Bug#1068207:
Hi, 'https://wiki.debian.org/qa.debian.org/FTBFS' see: 2024-03-13 -Werror=implicit-function-declaration ... In dpkg version 1.22.6, the compiler flag -Werror=implicit-function-declaration was enabled by default for all architectures in build flags ... ... You need to patch libnginx-mod-http-modsecurity source code: ~~~ diff --git a/config b/config index c6e7467..3bf06a8 100644 --- a/config +++ b/config @@ -10,7 +10,8 @@ ngx_feature_name= ngx_feature_run=no -ngx_feature_incs="#include " +ngx_feature_incs="#include +#include " ngx_feature_libs="-lmodsecurity" ngx_feature_test='printf("hello");' ngx_modsecurity_opt_I= ~~~ Jan
Bug#1068207: Problem appeared in other architecture
The mentioned problem has appeared in other architecture too: https://buildd.debian.org/status/fetch.php?pkg=libnginx-mod-http-modsecurity=riscv64=1.0.3-1%2Bb1=1712870226=log a.
Bug#1068207: Missing header from ngx_feature_test='printf("hello");'
Package: libnginx-mod-http-ndk-dev Version: 1:0.3.3-1 There is a module package for Nginx, which worked as well since this FTBFS bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067364 The upstream contains this section in config: https://github.com/owasp-modsecurity/ModSecurity-nginx/blob/master/config#L15 ngx_feature_test='printf("hello");' The problem is when the buildpackage process starts, I got this error: hecking for ModSecurity library ... not found checking for ModSecurity library in /usr/local/modsecurity ... not found ./configure: error: ngx_http_modsecurity_module requires the ModSecurity library. see sbuild.log: http://qa-logs.debian.net/2024/03/19/libnginx-mod-http-modsecurity_1.0.3-1_unstable.log I investigated the root issue, and I found this message in obj-x86_64-linux-gnu/autoconf.err: /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c:7:5: note: include '' or provide a declaration of 'printf' cc1: some warnings being treated as errors -- #include #include #include int main(void) { printf("hello");; return 0; } ... checking for ModSecurity library in /usr/local/modsecurity /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c: In function 'main': /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c:7:5: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration] 7 | printf("hello");; | ^~ /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c:5:1: note: include '' or provide a declaration of 'printf' 4 | #include +++ |+#include 5 | /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 7 | printf("hello");; | ^~ /home/airween/src/libnginx-mod-http-modsecurity-1.0.3/obj-x86_64-linux-gnu/autotest.c:7:5: note: include '' or provide a declaration of 'printf' cc1: some warnings being treated as errors -- #include #include #include int main(void) { printf("hello");; return 0; } If I add a patch (via d/series) which adds this header correctly, then everything is fine, the package builds as well. The upstream isn't touched since 6 years (the mentioned file), so I guess something is changed in libnginx-mod-http-ndk-dev (if it is responsible to produce the test codes - I guess). Note, that there isn't any user report in upstream regarding this problem, actually I can reproduce this only in Debian. Sorry if I'm wrong. Thanks, a.