• Bug#1066503: sucrack: FTBFS: rewriter.c:74:31: error: implicit declarat

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:30:02 2024
    Source: sucrack
    Version: 1.2.3-6
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@debian.org
    Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

    Hi,

    During a rebuild of all packages in sid, your package failed to build
    on amd64.

    This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

    Relevant part (hopefully):
    gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -O2 -D_GNU_SOURCE -DSTATIC_BUFFER -DLINUX -DSUCRACK_TITLE="\"sucrack 1.2.3 (LINUX)\"" -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-
    protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DSTATISTICS -c -o sucrack-stat.o `test -f 'stat.c' || echo './'`stat.c
    rewriter.c: In function ‘rewr_get_rules’:
    rewriter.c:74:31: error: implicit declaration of function ‘malloc’ [-Werror=implicit-function-declaration]
    74 | rule_set = (rule_set_t *) malloc(sizeof(rule_set_t));
    | ^~~~~~
    rewriter.c:34:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
    33 | #include "rules.h"
    +++ |+#include <stdlib.h>
    34 | #include "stat.h"
    rewriter.c:74:31: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
    74 | rule_set = (rule_set_t *) malloc(sizeof(rule_set_t));
    | ^~~~~~
    rewriter.c:74:31: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
    stat.c: In function ‘stat_display’:
    stat.c:92:24: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
    92 | printf("\33[0;%iH\33[1m%s\33[0m\n\n\n", (ws.ws_col / 2) - ((strlen(SUCRACK_TITLE) + 7)/ 2), SUCRACK_TITLE);
    | ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | | |
    | int size_t {aka long unsigned int}
    | %li
    In file included from sucrack.c:41:
    rules.h:59:20: warning: ‘rules_map’ defined but not used [-Wunused-variable]
    59 | static rules_map_t rules_map[] = {
    | ^~~~~~~~~
    worker.c: In function ‘worker_run’:
    worker.c:152:9: warning: variable ‘rs’ set but not used [-Wunused-but-set-variable]
    152 | int rs;
    | ^~
    cc1: some warnings being treated as errors
    make[3]: *** [Makefile:481: sucrack-rewriter.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/sucrack_1.2.3-6_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

    A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

    If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects

    If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)