• Bug#1066617: xfrisk: FTBFS: aiStubs.c:88:45: error: implicit declaratio

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 14:20:02 2024
    Source: xfrisk
    Version: 1.2-8
    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 -Wl,-z,relro -Wl,-z,now client.o network.o gui.o callbacks.o utils.o dice.o cards.o game.o colormap.o help.o riskgame.o debug.o clientMain.o colorEdit.o registerPlayers.o addPlayer.o viewStats.o viewCards.o viewLog.o viewChat.o viewFeedback.o
    xgethostname.o -I/usr/X11R6/include -L/usr/X11R6/lib -lXaw3d -lXext -lXmu -lXt -lSM -lICE -lX11 -o xfrisk
    aiStubs.c: In function ‘UTIL_ExitProgram’:
    aiStubs.c:88:45: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
    88 | void UTIL_ExitProgram(Int32 iExitValue) { exit(iExitValue); }
    | ^~~~
    aiStubs.c:28:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
    27 | #include "utils.h"
    +++ |+#include <stdlib.h>
    28 |
    aiStubs.c:88:45: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
    88 | void UTIL_ExitProgram(Int32 iExitValue) { exit(iExitValue); }
    | ^~~~
    aiStubs.c:88:45: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
    aiClientMain.c: In function ‘AI_Start’:
    aiClientMain.c:353:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    353 | __AI_Callback(NULL, AI_INIT_ONCE, (void *)iSpeciesID);
    | ^
    aiClientMain.c: In function ‘CBK_IncomingMessage’:
    aiClientMain.c:500:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    500 | __AI_Callback(NULL, AI_INIT_GAME, (void *)iSpeciesID);
    | ^
    aiConway.c: In function ‘CNT_WorstDefended’:
    aiConway.c:334:25: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    334 | CLIST_Evaluate (have, (EvalFunc)CNT_Vulnerability);
    | ^
    aiConway.c: In function ‘CNT_BestDefended’:
    aiConway.c:343:25: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    343 | CLIST_Evaluate (have, (EvalFunc)CNT_Vulnerability);
    | ^
    aiConway.c: In function ‘find_nearest’:
    aiConway.c:485:34: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    485 | CLIST_Evaluate (pAllCountries, (EvalFunc)CNT_SetZeroFlag);
    | ^
    aiConway.c:502:23: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    502 | (EvalFunc)CNT_AddIfConquerable);
    | ^
    aiConway.c: In function ‘find_destination’:
    aiConway.c:552:38: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    552 | CLIST_Evaluate (pDesiredCountries, (EvalFunc)CNT_IsNearest);
    | ^
    cc1: some warnings being treated as errors
    buildmap.c: In function ‘main’:
    buildmap.c:332:23: warning: too many arguments for format [-Wformat-extra-args]
    332 | fprintf(stdout, ".", i);
    | ^~~
    aiConway.c: In function ‘CLIST_CalculateUsefulness’:
    aiConway.c:700:34: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    700 | CLIST_Evaluate (pAllCountries, (EvalFunc)CNT_SetZeroNearness);
    | ^
    aiConway.c:701:38: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    701 | CLIST_Evaluate (pDesiredCountries, (EvalFunc)do_nearness);
    | ^
    aiConway.c:702:34: warning: cast between incompatible function types from ‘void (*)(COUNTRY *)’ {aka ‘void (*)(struct country *)’} to ‘int (*)(COUNTRY *)’ {aka ‘int (*)(struct country *)’} [-Wcast-function-type]
    702 | CLIST_Evaluate (pAllCountries, (EvalFunc)CNT_CalculateUsefulness);
    | ^
    aiConway.c: In function ‘make_wholelist’:
    make[1]: *** [<builtin>: aiStubs.o] Error 1


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