Bug#1066437: libast: FTBFS: snprintf.c:45:22: error: unknown type name ‘size_t’
Source: libast
Version: 0.7-9.1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas@debian.org
Usertags: ftbfs-20240313 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include/libast -I../include -I../include/libast -I/usr/include -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 snprintf.lo snprintf.c
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include/libast -I../include -I../include/libast -I/usr/include -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 snprintf.c -fPIC -DPIC -o .libs/snprintf.o
> snprintf.c:45:22: error: unknown type name ‘size_t’
> 45 | vsnprintf(char *str, size_t count, const char *fmt, va_list args)
> | ^~~~~~
> snprintf.c:8:1: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
> 7 | # include <stdarg.h>
> +++ |+#include <stddef.h>
> 8 | #else
> snprintf.c:58:21: error: unknown type name ‘size_t’
> 58 | snprintf(char *str, size_t count, const char *fmt, ...)
> | ^~~~~~
> snprintf.c:58:21: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
> snprintf.c: In function ‘fmtstr’:
> snprintf.c:250:36: error: implicit declaration of function ‘iscntrl’ [-Werror=implicit-function-declaration]
> 250 | if (visible_control && iscntrl(c) && !isspace(c)) {
> | ^~~~~~~
> snprintf.c:8:1: note: include ‘<ctype.h>’ or provide a declaration of ‘iscntrl’
> 7 | # include <stdarg.h>
> +++ |+#include <ctype.h>
> 8 | #else
> snprintf.c:250:51: error: implicit declaration of function ‘isspace’ [-Werror=implicit-function-declaration]
> 250 | if (visible_control && iscntrl(c) && !isspace(c)) {
> | ^~~~~~~
> snprintf.c:250:51: note: include ‘<ctype.h>’ or provide a declaration of ‘isspace’
> snprintf.c: In function ‘fmtdouble’:
> snprintf.c:359:5: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
> 359 | strcpy(fmtstr, "%");
> | ^~~~~~
> snprintf.c:8:1: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> 7 | # include <stdarg.h>
> +++ |+#include <string.h>
> 8 | #else
> snprintf.c:359:5: warning: incompatible implicit declaration of built-in function ‘strcpy’ [-Wbuiltin-declaration-mismatch]
> 359 | strcpy(fmtstr, "%");
> | ^~~~~~
> snprintf.c:359:5: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> snprintf.c:361:9: error: implicit declaration of function ‘strcat’ [-Werror=implicit-function-declaration]
> 361 | strcat(fmtstr, "-");
> | ^~~~~~
> snprintf.c:361:9: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> snprintf.c:361:9: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
> snprintf.c:361:9: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> snprintf.c:363:9: error: implicit declaration of function ‘sprintf’ [-Werror=implicit-function-declaration]
> 363 | sprintf(fmtstr + strlen(fmtstr), "%d", len);
> | ^~~~~~~
> snprintf.c:8:1: note: include ‘<stdio.h>’ or provide a declaration of ‘sprintf’
> 7 | # include <stdarg.h>
> +++ |+#include <stdio.h>
> 8 | #else
> snprintf.c:363:9: warning: incompatible implicit declaration of built-in function ‘sprintf’ [-Wbuiltin-declaration-mismatch]
> 363 | sprintf(fmtstr + strlen(fmtstr), "%d", len);
> | ^~~~~~~
> snprintf.c:363:9: note: include ‘<stdio.h>’ or provide a declaration of ‘sprintf’
> snprintf.c:363:26: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
> 363 | sprintf(fmtstr + strlen(fmtstr), "%d", len);
> | ^~~~~~
> snprintf.c:363:26: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> snprintf.c:363:26: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
> snprintf.c:363:26: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> snprintf.c:366:9: warning: incompatible implicit declaration of built-in function ‘sprintf’ [-Wbuiltin-declaration-mismatch]
> 366 | sprintf(fmtstr + strlen(fmtstr), ".%d", precision);
> | ^~~~~~~
> snprintf.c:366:9: note: include ‘<stdio.h>’ or provide a declaration of ‘sprintf’
> snprintf.c:366:26: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
> 366 | sprintf(fmtstr + strlen(fmtstr), ".%d", precision);
> | ^~~~~~
> snprintf.c:366:26: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> snprintf.c:368:9: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
> 368 | l = strlen(fmtstr);
> | ^~~~~~
> snprintf.c:368:9: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> snprintf.c:371:5: warning: incompatible implicit declaration of built-in function ‘sprintf’ [-Wbuiltin-declaration-mismatch]
> 371 | sprintf(convert, fmtstr, value);
> | ^~~~~~~
> snprintf.c:371:5: note: include ‘<stdio.h>’ or provide a declaration of ‘sprintf’
> cc1: some warnings being treated as errors
> make[3]: *** [Makefile:501: snprintf.lo] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/libast_0.7-9.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.
Reply to: