Your message dated Tue, 23 Apr 2024 19:49:40 +0200
with message-id <[email protected]>
and subject line Issue is solved
has caused the Debian Bug report #1068207,
regarding Missing header from ngx_feature_test='printf("hello");'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1068207: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068207
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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 '<stdio.h>' or provide a declaration of 'printf'
cc1: some warnings being treated as errors
----------

#include <sys/types.h>
#include <unistd.h>
#include <modsecurity/modsecurity.h>

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 '<stdio.h>' or provide a declaration of 'printf'
    4 | #include <modsecurity/modsecurity.h>
  +++ |+#include <stdio.h>
    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 '<stdio.h>' or provide a declaration of 'printf'
cc1: some warnings being treated as errors
----------

#include <sys/types.h>
#include <unistd.h>
#include <modsecurity/modsecurity.h>

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.

--- End Message ---
--- Begin Message ---
The issue is solved, in dpkg version 1.22.6, the compiler flag
-Werror=implicit-function-declaration was enabled by default for
all architectures in build flags.

We need to handle the FTBFS issue in bug 1067364 with adding a
patch to the package.

Btw it should be fixed in upstream too.

Thanks for all.


a.

--- End Message ---

Reply via email to