• Bug#1066294: kcc: FTBFS: kcc.c:181:25: error: implicit declaration of f

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:00:02 2024
    Source: kcc
    Version: 2.3+really-0.1
    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):
    cc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -c -o kcc.o kcc.c
    kcc.c:148:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    148 | main(c, v)
    | ^~~~
    kcc.c: In function ‘main’:
    kcc.c:181:25: error: implicit declaration of function ‘atoi’ [-Werror=implicit-function-declaration]
    181 | if ((size = atoi(*v)) <= 0)
    | ^~~~
    kcc.c:306:17: error: implicit declaration of function ‘isatty’ [-Werror=implicit-function-declaration]
    306 | if (isatty(fileno(stdin)) && feof(stdin))
    | ^~~~~~
    kcc.c: In function ‘error’:
    kcc.c:378:5: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
    378 | exit(1);
    | ^~~~
    kcc.c:368:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
    367 | #include <stdarg.h>
    +++ |+#include <stdlib.h>
    368 |
    kcc.c:378:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
    378 | exit(1);
    | ^~~~
    kcc.c:378:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
    kcc.c: In function ‘filter’:
    kcc.c:419:18: error: implicit declaration of function ‘getstr’ [-Werror=implicit-function-declaration]
    419 | while (len = getstr(str, sizeof str, fp)) {
    | ^~~~~~
    kcc.c: In function ‘buffalloc’:
    kcc.c:640:36: error: implicit declaration of function ‘malloc’ [-Werror=implicit-function-declaration]
    640 | if ((bufp = holdbuf = (char *) malloc(len)) == NULL)
    | ^~~~~~
    kcc.c:640:36: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
    kcc.c:640:36: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
    kcc.c:640:36: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
    cc1: some warnings being treated as errors
    make[1]: *** [<builtin>: kcc.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/kcc_2.3+really-0.1_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)