• Bug#1066510: hashrat: FTBFS: files.c:651:1: error: implicit declaration

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:30:03 2024
    Source: hashrat
    Version: 1.13-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):
    gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -
    DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_
    STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DUSE_XATTR=1 -c filesigning.c
    command-line-args.c: In function ‘CommandLineParseArgs’:
    files.c: In function ‘HashratHashSingleFile’:
    files.c:243:18: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
    243 | printf("cache %llu %llu %llu\n",XattrStat.st_mtime, FStat->st_mtime, XattrStat.st_mtime - FStat->st_mtime);
    | ~~~^
    | |
    | long long unsigned int
    | %lu
    command-line-args.c:279:66: warning: passing argument 1 of ‘IncludeExcludeLoadExcludesFromFile’ from incompatible pointer type [-Wincompatible-pointer-types]
    279 | else if (strcmp(arg,"-X")==0) IncludeExcludeLoadExcludesFromFile(Ctx, CommandLineNext(&CmdLine));
    | ^~~
    | |
    | HashratCtx *
    In file included from command-line-args.c:2:
    include-exclude.h:8:53: note: expected ‘const char *’ but argument is of type ‘HashratCtx *’
    8 | void IncludeExcludeLoadExcludesFromFile(const char *Path, HashratCtx *Ctx);
    | ~~~~~~~~~~~~^~~~ command-line-args.c:279:71: warning: passing argument 2 of ‘IncludeExcludeLoadExcludesFromFile’ from incompatible pointer type [-Wincompatible-pointer-types]
    279 | else if (strcmp(arg,"-X")==0) IncludeExcludeLoadExcludesFromFile(Ctx, CommandLineNext(&CmdLine));
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    | |
    | const char *
    include-exclude.h:8:71: note: expected ‘HashratCtx *’ but argument is of type ‘const char *’
    8 | void IncludeExcludeLoadExcludesFromFile(const char *Path, HashratCtx *Ctx);
    | ~~~~~~~~~~~~^~~
    files.c:243:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
    243 | printf("cache %llu %llu %llu\n",XattrStat.st_mtime, FStat->st_mtime, XattrStat.st_mtime - FStat->st_mtime);
    | ~~~^
    | |
    | long long unsigned int
    | %lu
    files.c:243:28: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘__time_t’ {aka ‘long int’} [-Wformat=]
    243 | printf("cache %llu %llu %llu\n",XattrStat.st_mtime, FStat->st_mtime, XattrStat.st_mtime - FStat->st_mtime);
    | ~~~^
    | |
    | long long unsigned int
    | %lu
    command-line-args.c: In function ‘HMACSetup’:
    command-line-args.c:20:7: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    20 | write(1, "Enter HMAC Key: ",16);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    command-line-args.c:33:7: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    33 | write(1,"ERROR: No HMAC Key given!\n",27);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    files.c: In function ‘ProcessItem’:
    files.c:651:1: error: implicit declaration of function ‘MapClear’; did you mean ‘MapCreate’? [-Werror=implicit-function-declaration]
    651 | MapClear(Visited, NULL);
    | ^~~~~~~~
    | MapCreate
    include-exclude.c: In function ‘IncludeExcludeCheckFilenames’: include-exclude.c:105:13: error: implicit declaration of function ‘fnmatch’; did you mean ‘pmatch’? [-Werror=implicit-function-declaration]
    105 | if (fnmatch(mptr,dptr,0)==0) result=CTX_INCLUDE;
    | ^~~~~~~
    | pmatch
    gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -
    DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_
    STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DUSE_XATTR=1 -c xattr.c
    gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -
    DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_
    STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DUSE_XATTR=1 -c cgi.c
    gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -
    DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_
    STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DUSE_XATTR=1 -c check-hash.c
    gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -
    DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_
    STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DUSE_XATTR=1 -c find.c
    cc1: some warnings being treated as errors
    make[1]: *** [Makefile:28: include-exclude.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/hashrat_1.13-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)