Bug#1066202: rubiks: FTBFS: dik/cube.c:20:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]

Lucas Nussbaum lucas at debian.org
Wed Mar 13 11:44:29 GMT 2024


Source: rubiks
Version: 20070912-6
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas at 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 -DPACKAGE_NAME=\"rubiks\" -DPACKAGE_TARNAME=\"rubiks\" -DPACKAGE_VERSION=\"20070912\" -DPACKAGE_STRING=\"rubiks\ 20070912\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"rubiks\" -DVERSION=\"20070912\" -I.   -Wdate-time -D_FORTIFY_SOURCE=2 -DLARGE_MEM -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o dik/rubiks_dikcube-phase2.o `test -f 'dik/phase2.c' || echo './'`dik/phase2.c
> dik/cube.c:9:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
>     9 | main(argc, argv)
>       | ^~~~
> dik/cube.c: In function ‘main’:
> dik/cube.c:20:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
>    20 |         exit(1);
>       |         ^~~~
> dik/cube.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
>     1 | #include "globals.h"
>   +++ |+#include <stdlib.h>
>     2 | 
> dik/cube.c:20:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    20 |         exit(1);
>       |         ^~~~
> dik/cube.c:20:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c:23:13: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
>    23 |         if(!strcmp(argv[1], "-t")) {
>       |             ^~~~~~
> gcc -DPACKAGE_NAME=\"rubiks\" -DPACKAGE_TARNAME=\"rubiks\" -DPACKAGE_VERSION=\"20070912\" -DPACKAGE_STRING=\"rubiks\ 20070912\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"rubiks\" -DVERSION=\"20070912\" -I.   -Wdate-time -D_FORTIFY_SOURCE=2 -DLARGE_MEM -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o dik/rubiks_dikcube-prntsol.o `test -f 'dik/prntsol.c' || echo './'`dik/prntsol.c
> dik/cube.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
>     1 | #include "globals.h"
>   +++ |+#include <string.h>
>     2 | 
> dik/cube.c:42:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    42 |         exit(1);
>       |         ^~~~
> dik/cube.c:42:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c:51:5: error: implicit declaration of function ‘init_phase1’ [-Werror=implicit-function-declaration]
>    51 |     init_phase1();
>       |     ^~~~~~~~~~~
> dik/permcube.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
>     3 | perm_cube()
>       | ^~~~~~~~~
> dik/cube.c:53:5: error: implicit declaration of function ‘init_phase2’ [-Werror=implicit-function-declaration]
>    53 |     init_phase2();
>       |     ^~~~~~~~~~~
> dik/cube.c:64:9: error: implicit declaration of function ‘set_cube’; did you mean ‘def_cube’? [-Werror=implicit-function-declaration]
>    64 |         set_cube();
>       |         ^~~~~~~~
>       |         def_cube
> dik/cube.c:68:17: error: implicit declaration of function ‘init_phase1_cube’ [-Werror=implicit-function-declaration]
>    68 |     do_phase1 = init_phase1_cube();
>       |                 ^~~~~~~~~~~~~~~~
> dik/cube.c:75:13: error: implicit declaration of function ‘phase1’ [-Werror=implicit-function-declaration]
>    75 |             phase1(i++);
>       |             ^~~~~~
> dik/cube.c:81:9: error: implicit declaration of function ‘perm_cube’; did you mean ‘read_cube’? [-Werror=implicit-function-declaration]
>    81 |         perm_cube();
>       |         ^~~~~~~~~
>       |         read_cube
> dik/cube.c:82:21: error: implicit declaration of function ‘init_phase2_cube’ [-Werror=implicit-function-declaration]
>    82 |         do_phase2 = init_phase2_cube();
>       |                     ^~~~~~~~~~~~~~~~
> dik/cube.c:90:17: error: implicit declaration of function ‘phase2’ [-Werror=implicit-function-declaration]
>    90 |                 phase2(i++, -1, -1);
>       |                 ^~~~~~
> dik/cube.c:99:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    99 |     exit(0);
>       |     ^~~~
> dik/cube.c:99:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c: In function ‘read_position’:
> dik/cube.c:188:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   188 |             exit(1);
>       |             ^~~~
> dik/cube.c:188:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase2.c: In function ‘do_phase2’:
> dik/cube.c:195:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   195 |         exit(1);
>       |         ^~~~
> dik/phase2.c:107:9: error: implicit declaration of function ‘prnt_sol’ [-Werror=implicit-function-declaration]
>   107 |         prnt_sol();
>       |         ^~~~~~~~
> dik/phase2.c:140:16: error: implicit declaration of function ‘abs’ [-Werror=implicit-function-declaration]
>   140 |             if(abs(i - dont1) == 3) {
>       |                ^~~
> dik/phase2.c:11:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’
>    10 | #include "trans/mixed2.a"
>   +++ |+#include <stdlib.h>
>    11 | #endif /* LARGE_MEM */
> dik/cube.c:195:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c:200:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   200 |             exit(1);
>       |             ^~~~
> dik/cube.c:200:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c: In function ‘read_cube’:
> dik/cube.c:275:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   275 |             exit(0);
>       |             ^~~~
> dik/cube.c:275:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/cube.c:286:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   286 |             exit(1);
>       |             ^~~~
> dik/cube.c:286:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c: In function ‘init_phase1_cube’:
> dik/phase1.c:55:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
>    55 |         exit(1);
>       |         ^~~~
> dik/phase1.c:9:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
>     8 | #include "trans/mixed1.a"
>   +++ |+#include <stdlib.h>
>     9 | #endif /* LARGE_MEM */
> dik/phase1.c:55:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    55 |         exit(1);
>       |         ^~~~
> dik/phase1.c:55:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c:74:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    74 |         exit(1);
>       |         ^~~~
> dik/phase1.c:74:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c:103:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   103 |                 exit(1);
>       |                 ^~~~
> dik/phase1.c:103:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c:114:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   114 |                 exit(1);
>       |                 ^~~~
> dik/phase1.c:114:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c:123:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>   123 |         exit(1);
>       |         ^~~~
> dik/phase1.c:123:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/phase1.c: In function ‘do_phase1’:
> dik/phase1.c:190:9: error: implicit declaration of function ‘perm_cube’ [-Werror=implicit-function-declaration]
>   190 |         perm_cube();
>       |         ^~~~~~~~~
> dik/phase1.c:191:21: error: implicit declaration of function ‘init_phase2_cube’; did you mean ‘init_phase1_cube’? [-Werror=implicit-function-declaration]
>   191 |         do_phase2 = init_phase2_cube();
>       |                     ^~~~~~~~~~~~~~~~
>       |                     init_phase1_cube
> dik/prntsol.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
>     5 | prnt_sol()
>       | ^~~~~~~~
> dik/phase1.c:198:17: error: implicit declaration of function ‘phase2’ [-Werror=implicit-function-declaration]
>   198 |                 phase2(i++ - cur_move, dont1, dont2);
>       |                 ^~~~~~
> dik/phase1.c:204:13: error: implicit declaration of function ‘prnt_sol’ [-Werror=implicit-function-declaration]
>   204 |             prnt_sol();
>       |             ^~~~~~~~
> dik/phase1.c:240:16: error: implicit declaration of function ‘abs’ [-Werror=implicit-function-declaration]
>   240 |             if(abs(dont1 - i) == 3) {
>       |                ^~~
> dik/phase1.c:240:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’
> gcc -DPACKAGE_NAME=\"rubiks\" -DPACKAGE_TARNAME=\"rubiks\" -DPACKAGE_VERSION=\"20070912\" -DPACKAGE_STRING=\"rubiks\ 20070912\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"rubiks\" -DVERSION=\"20070912\" -I.   -Wdate-time -D_FORTIFY_SOURCE=2 -DLARGE_MEM -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o dik/rubiks_dikcube-setcube.o `test -f 'dik/setcube.c' || echo './'`dik/setcube.c
> dik/setcube.c:27:8: warning: type defaults to ‘int’ in declaration of ‘cube_found’ [-Wimplicit-int]
>    27 | static cube_found, orient_found;
>       |        ^~~~~~~~~~
> dik/setcube.c:27:20: warning: type defaults to ‘int’ in declaration of ‘orient_found’ [-Wimplicit-int]
>    27 | static cube_found, orient_found;
>       |                    ^~~~~~~~~~~~
> dik/setcube.c: In function ‘find_corner’:
> dik/setcube.c:36:17: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
>    36 |             if(!strncmp(corners[i][j], c, 3)) {
>       |                 ^~~~~~~
> dik/setcube.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
>     1 | #include "globals.h"
>   +++ |+#include <string.h>
>     2 | 
> dik/setcube.c:36:43: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘long unsigned int’ is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
>    36 |             if(!strncmp(corners[i][j], c, 3)) {
>       |                                           ^
> <built-in>: note: built-in ‘strncmp’ declared here
> dik/setcube.c:44:5: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
>    44 |     exit(1);
>       |     ^~~~
> dik/setcube.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
>     1 | #include "globals.h"
>   +++ |+#include <stdlib.h>
>     2 | 
> dik/setcube.c:44:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    44 |     exit(1);
>       |     ^~~~
> dik/setcube.c:44:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> dik/setcube.c: In function ‘find_edge’:
> dik/setcube.c:54:41: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘long unsigned int’ is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
>    54 |             if(!strncmp(edges[i][j], c, 2)) {
>       |                                         ^
> <built-in>: note: built-in ‘strncmp’ declared here
> dik/setcube.c:62:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    62 |     exit(1);
>       |     ^~~~
> dik/setcube.c:62:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> gcc -DPACKAGE_NAME=\"rubiks\" -DPACKAGE_TARNAME=\"rubiks\" -DPACKAGE_VERSION=\"20070912\" -DPACKAGE_STRING=\"rubiks\ 20070912\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"rubiks\" -DVERSION=\"20070912\" -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o reid/optimal.o reid/optimal.c
> cc1: some warnings being treated as errors
> make[1]: *** [GNUmakefile:598: dik/rubiks_dikcube-setcube.o] Error 1


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



More information about the debian-science-maintainers mailing list