Bug#1066686: xflip: FTBFS: meltdown.c:75:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
Source: xflip
Version: 1.01-30
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 -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 meltdown.o meltdown.c
> meltdown.c:72:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 72 | usage()
> | ^~~~~
> meltdown.c: In function ‘usage’:
> meltdown.c:75:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
> 75 | exit(1);
> | ^~~~
> meltdown.c:41:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> 40 | #include <stdio.h>
> +++ |+#include <stdlib.h>
> 41 |
> meltdown.c:75:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 75 | exit(1);
> | ^~~~
> meltdown.c:75:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> meltdown.c: At top level:
> meltdown.c:78:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 78 | main(argc, argv)
> | ^~~~
> meltdown.c: In function ‘main’:
> meltdown.c:89:9: error: implicit declaration of function ‘srandom’ [-Werror=implicit-function-declaration]
> 89 | srandom(getpid());
> | ^~~~~~~
> meltdown.c:89:17: error: implicit declaration of function ‘getpid’ [-Werror=implicit-function-declaration]
> 89 | srandom(getpid());
> | ^~~~~~
> meltdown.c:92:21: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
> 92 | if (strncmp(argv[i], "-dis", 4) == 0) {
> | ^~~~~~~
> meltdown.c:41:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
> 40 | #include <stdio.h>
> +++ |+#include <string.h>
> 41 |
> meltdown.c:92:46: 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]
> 92 | if (strncmp(argv[i], "-dis", 4) == 0) {
> | ^
> <built-in>: note: built-in ‘strncmp’ declared here
> meltdown.c:97:51: 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]
> 97 | } else if (strncmp(argv[i], "-p", 2) == 0) {
> | ^
> <built-in>: note: built-in ‘strncmp’ declared here
> meltdown.c:99:53: 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]
> 99 | } else if (strncmp(argv[i], "-del", 4) == 0) {
> | ^
> <built-in>: note: built-in ‘strncmp’ declared here
> meltdown.c:101:39: error: implicit declaration of function ‘atoi’ [-Werror=implicit-function-declaration]
> 101 | delay=atoi(argv[++i]);
> | ^~~~
> meltdown.c:104:54: 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]
> 104 | } else if (strncmp(argv[i], "-wait", 5) == 0) {
> | ^
> <built-in>: note: built-in ‘strncmp’ declared here
> meltdown.c:115:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 115 | exit(0);
> | ^~~~
> meltdown.c:115:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> meltdown.c:142:9: error: implicit declaration of function ‘sleep’ [-Werror=implicit-function-declaration]
> 142 | sleep(1);
> | ^~~~~
> meltdown.c:145:17: error: implicit declaration of function ‘do_planes’ [-Werror=implicit-function-declaration]
> 145 | do_planes();
> | ^~~~~~~~~
> meltdown.c:147:17: error: implicit declaration of function ‘do_all’ [-Werror=implicit-function-declaration]
> 147 | do_all();
> | ^~~~~~
> meltdown.c:151:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 151 | exit(0);
> | ^~~~
> meltdown.c:151:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> meltdown.c: At top level:
> meltdown.c:154:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 154 | finish()
> | ^~~~~~
> meltdown.c: In function ‘finish’:
> meltdown.c:171:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 171 | exit(0);
> | ^~~~
> meltdown.c:171:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> meltdown.c: At top level:
> meltdown.c:174:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 174 | do_planes()
> | ^~~~~~~~~
> meltdown.c: In function ‘do_planes’:
> meltdown.c:180:30: error: implicit declaration of function ‘malloc’ [-Werror=implicit-function-declaration]
> 180 | heights = (short **) malloc(DisplayPlanes(dpy, screen));
> | ^~~~~~
> meltdown.c:180:30: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
> meltdown.c:180:30: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
> meltdown.c:180:30: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
> meltdown.c:182:40: error: implicit declaration of function ‘calloc’ [-Werror=implicit-function-declaration]
> 182 | heights[i] = (short *) calloc(sizeof(short),
> | ^~~~~~
> meltdown.c:182:40: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
> meltdown.c:182:40: warning: incompatible implicit declaration of built-in function ‘calloc’ [-Wbuiltin-declaration-mismatch]
> meltdown.c:182:40: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
> meltdown.c:57:18: error: implicit declaration of function ‘random’ [-Werror=implicit-function-declaration]
> 57 | #define rnd(x) (random() % (x))
> | ^~~~~~
> meltdown.c:185:25: note: in expansion of macro ‘rnd’
> 185 | depth = rnd(DisplayPlanes(dpy, screen));
> | ^~~
> meltdown.c:188:24: error: implicit declaration of function ‘calc_xloc’ [-Werror=implicit-function-declaration]
> 188 | xloc = calc_xloc(width);
> | ^~~~~~~~~
> meltdown.c: At top level:
> meltdown.c:222:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 222 | do_all()
> | ^~~~~~
> meltdown.c: In function ‘do_all’:
> meltdown.c:228:29: warning: incompatible implicit declaration of built-in function ‘calloc’ [-Wbuiltin-declaration-mismatch]
> 228 | heights = (short *) calloc(sizeof(short), DisplayWidth(dpy, screen));
> | ^~~~~~
> meltdown.c:228:29: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
> meltdown.c:265:25: error: implicit declaration of function ‘usleep’ [-Werror=implicit-function-declaration]
> 265 | usleep(1);
> | ^~~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [<builtin>: meltdown.o] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/xflip_1.01-30_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.
Reply to: