[Debian-med-packaging] Bug#1066485: volpack: FTBFS: scalevolume.c:63:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
Lucas Nussbaum
lucas at debian.org
Wed Mar 13 11:57:55 GMT 2024
Source: volpack
Version: 1.0b3-9
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 -DHAVE_CONFIG_H -I. -I.. -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 denfile.o denfile.c
> scalevolume.c:42:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 42 | main(argc, argv)
> | ^~~~
> scalevolume.c: In function ‘main’:
> scalevolume.c:63:9: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
> 63 | exit(1);
> | ^~~~
> scalevolume.c:41:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> 40 | #include <malloc.h>
> +++ |+#include <stdlib.h>
> 41 |
> scalevolume.c:63:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 63 | exit(1);
> | ^~~~
> scalevolume.c:63:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:72:14: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
> 72 | if (!strcmp(argv[6], "-b")) {
> | ^~~~~~
> scalevolume.c:41:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
> 40 | #include <malloc.h>
> +++ |+#include <string.h>
> 41 |
> scalevolume.c:84:13: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 84 | exit(1);
> | ^~~~
> scalevolume.c:84:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:91:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 91 | exit(1);
> | ^~~~
> scalevolume.c:91:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:101:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 101 | exit(1);
> | ^~~~
> scalevolume.c:101:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:109:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 109 | exit(1);
> | ^~~~
> scalevolume.c:109:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:113:10: error: implicit declaration of function ‘write_den’ [-Werror=implicit-function-declaration]
> 113 | if (!write_den(dst_file, dst_volume, dst_xlen, dst_ylen, dst_zlen))
> | ^~~~~~~~~
> scalevolume.c:114:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 114 | exit(1);
> | ^~~~
> scalevolume.c:114:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> scalevolume.c:116:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
> 116 | exit(0);
> | ^~~~
> scalevolume.c:116:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> denfile.c: In function ‘read_den’:
> denfile.c:51:15: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> 51 | if ((fd = open(filename, 0)) < 0) {
> | ^~~~
> | popen
> denfile.c:57:10: error: implicit declaration of function ‘read_shorts’ [-Werror=implicit-function-declaration]
> 57 | if (!read_shorts(fd, &map_version, 1, 0)) {
> | ^~~~~~~~~~~
> denfile.c:81:10: error: implicit declaration of function ‘read_words’ [-Werror=implicit-function-declaration]
> 81 | !read_words(fd, &map_length, 1, swapbytes)) {
> | ^~~~~~~~~~
> denfile.c:92:29: error: implicit declaration of function ‘malloc’ [-Werror=implicit-function-declaration]
> 92 | data = (unsigned char *)malloc(map_length);
> | ^~~~~~
> denfile.c:9:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
> 8 | #include <stdio.h>
> +++ |+#include <stdlib.h>
> 9 |
> denfile.c:92:29: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
> 92 | data = (unsigned char *)malloc(map_length);
> | ^~~~~~
> denfile.c:92:29: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
> denfile.c:99:10: error: implicit declaration of function ‘read_bytes’; did you mean ‘read_den’? [-Werror=implicit-function-declaration]
> 99 | if (!read_bytes(fd, (char *)data, map_length)) {
> | ^~~~~~~~~~
> | read_den
> denfile.c:101:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 101 | close(fd);
> | ^~~~~
> | pclose
> denfile.c:102:9: error: implicit declaration of function ‘free’ [-Werror=implicit-function-declaration]
> 102 | free(data);
> | ^~~~
> denfile.c:102:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
> denfile.c:102:9: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
> denfile.c:102:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
> denfile.c: In function ‘write_den’:
> denfile.c:145:15: error: implicit declaration of function ‘creat’ [-Werror=implicit-function-declaration]
> 145 | if ((fd = creat(filename, 0644)) < 0) {
> | ^~~~~
> denfile.c:181:10: error: implicit declaration of function ‘write_bytes’; did you mean ‘write_den’? [-Werror=implicit-function-declaration]
> 181 | if (!write_bytes(fd, (char *)&map_version, sizeof(short)) ||
> | ^~~~~~~~~~~
> | write_den
> denfile.c: At top level:
> denfile.c:213:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 213 | read_bytes(fd, buf, bytecount)
> | ^~~~~~~~~~
> denfile.c: In function ‘read_bytes’:
> denfile.c:222:13: error: implicit declaration of function ‘read’; did you mean ‘fread’? [-Werror=implicit-function-declaration]
> 222 | if (read(fd, buf, n) != n)
> | ^~~~
> | fread
> denfile.c: At top level:
> denfile.c:241:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 241 | read_shorts(fd, sbuf, shortcount, swap)
> | ^~~~~~~~~~~
> denfile.c:289:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 289 | read_words(fd, wbuf, wordcount, swap)
> | ^~~~~~~~~~
> denfile.c:337:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 337 | write_bytes(fd, buf, bytecount)
> | ^~~~~~~~~~~
> denfile.c: In function ‘write_bytes’:
> denfile.c:346:13: error: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Werror=implicit-function-declaration]
> 346 | if (write(fd, buf, n) != n)
> | ^~~~~
> | fwrite
> makevolume.c:34:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 34 | main()
> | ^~~~
> makevolume.c: In function ‘main’:
> makevolume.c:72:23: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> 72 | if ((density_fd = open(BRAIN_FILE, 0)) < 0) {
> | ^~~~
> | popen
> makevolume.c:77:9: error: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Werror=implicit-function-declaration]
> 77 | if (lseek(density_fd, BRAIN_HEADER, 0) < 0) {
> | ^~~~~
> | fseek
> makevolume.c:82:9: error: implicit declaration of function ‘read’; did you mean ‘fread’? [-Werror=implicit-function-declaration]
> 82 | if (read(density_fd, density, density_size) != density_size) {
> | ^~~~
> | fread
> makevolume.c:87:5: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 87 | close(density_fd);
> | ^~~~~
> | pclose
> makevolume.c:99:22: error: implicit declaration of function ‘creat’ [-Werror=implicit-function-declaration]
> 99 | if ((volume_fd = creat(VOLUME_FILE, 0644)) < 0) {
> | ^~~~~
> makeoctree.c:34:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 34 | main()
> | ^~~~
> makeoctree.c: In function ‘main’:
> makeoctree.c:44:22: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> 44 | if ((volume_fd = open(VOLUME_FILE, 0)) < 0) {
> | ^~~~
> | popen
> makeoctree.c:56:5: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 56 | close(volume_fd);
> | ^~~~~
> | pclose
> makeoctree.c:70:22: error: implicit declaration of function ‘creat’ [-Werror=implicit-function-declaration]
> 70 | if ((octree_fd = creat(OCTREE_FILE, 0644)) < 0) {
> | ^~~~~
> classifyvolume.c:34:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 34 | main(argc, argv)
> | ^~~~
> classifyvolume.c: In function ‘main’:
> classifyvolume.c:56:14: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
> 56 | if (!strcmp(argv[1], "-octree"))
> | ^~~~~~
> classifyvolume.c:33:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
> 32 | #include "volume.h"
> +++ |+#include <string.h>
> 33 |
> rendervolume.c:34:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 34 | main(argc, argv)
> | ^~~~
> rendervolume.c: In function ‘main’:
> rendervolume.c:59:14: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
> 59 | if (!strcmp(*argv, "-octree"))
> | ^~~~~~
> rendervolume.c:33:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
> 32 | #include "volume.h"
> +++ |+#include <string.h>
> 33 |
> classifyvolume.c:92:27: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> 92 | if ((density_fd = open(BRAIN_FILE, 0)) < 0) {
> | ^~~~
> | popen
> rendervolume.c:79:28: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Werror=implicit-function-declaration]
> 79 | if ((clvolume_fd = open(CLVOLUME_FILE, 0)) < 0) {
> | ^~~~
> | popen
> classifyvolume.c:97:13: error: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Werror=implicit-function-declaration]
> 97 | if (lseek(density_fd, BRAIN_HEADER, 0) < 0) {
> | ^~~~~
> | fseek
> rendervolume.c:92:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 92 | close(clvolume_fd);
> | ^~~~~
> | pclose
> classifyvolume.c:102:13: error: implicit declaration of function ‘read’; did you mean ‘fread’? [-Werror=implicit-function-declaration]
> 102 | if (read(density_fd, density, density_size) != density_size) {
> | ^~~~
> | fread
> classifyvolume.c:107:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 107 | close(density_fd);
> | ^~~~~
> | pclose
> rendervolume.c:194:13: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
> 194 | strcpy(filename, "brainsmall.ppm");
> | ^~~~~~
> rendervolume.c:194:13: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> rendervolume.c:194:13: warning: incompatible implicit declaration of built-in function ‘strcpy’ [-Wbuiltin-declaration-mismatch]
> rendervolume.c:194:13: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> classifyvolume.c:171:22: error: implicit declaration of function ‘creat’ [-Werror=implicit-function-declaration]
> 171 | if ((output_fd = creat(CLVOLUME_FILE, 0644)) < 0) {
> | ^~~~~
> rendervolume.c:197:9: error: implicit declaration of function ‘StorePGM’ [-Werror=implicit-function-declaration]
> 197 | StorePGM(image, IMAGE_WIDTH, IMAGE_HEIGHT, filename);
> | ^~~~~~~~
> rendervolume.c: At top level:
> rendervolume.c:206:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
> 206 | StorePGM(image, width, height, filename)
> | ^~~~~~~~
> cc1: some warnings being treated as errors
> make[3]: *** [Makefile:423: scalevolume.o] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/volpack_1.0b3-9_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-med-packaging
mailing list