Bug#1066496: rdiff-backup-fs: FTBFS: gstats.h:44:30: error: implicit declaration of function ‘time’ [-Werror=implicit-function-declaration]
Source: rdiff-backup-fs
Version: 1.0.0-7
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 -DHAVE_CONFIG_H -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 -Wall -g -O3 -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 -c -o gutils.o gutils.c
> gutils.c: In function ‘gdesccopy’:
> gutils.c:9:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 9 | write(dest, buffer, result);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> gpath.c: In function ‘gpthcldptr’:
> gpath.c:82:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
> 82 | for (; (i >= 0) && (path[i] != '/'); i--);
> | ^~~
> gpath.c:83:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
> 83 | (*pointer) = path + i + 1;
> | ^
> grdiff.c: In function ‘snapshot_copy’:
> grdiff.c:305:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 305 | write(snapshot_desc, buffer, result);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> grdiff.c: In function ‘snapshot_append’:
> In file included from gtree.h:5,
> from gtree.c:3:
> gtree.c: In function ‘gtreenew’:
> grdiff.c:331:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 331 | write(snapshot_desc, buffer, 1);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gstats.h:44:30: error: implicit declaration of function ‘time’ [-Werror=implicit-function-declaration]
> 44 | (stats)->ctime = time(0); \
> | ^~~~
> gtree.c:42:5: note: in expansion of macro ‘set_directory_stats’
> 42 | set_directory_stats(stats);
> | ^~~~~~~~~~~~~~~~~~~
> gtree.c:5:1: note: ‘time’ is defined in header ‘<time.h>’; did you forget to ‘#include <time.h>’?
> 4 | #include "gutils.h"
> +++ |+#include <time.h>
> 5 |
> grdiff.c:333:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 333 | write(snapshot_desc, buffer, result);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gtree.c: In function ‘tree_save_node’:
> gtree.c:269:9: error: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]
> 269 | asprintf(&temp, "File %s\n", node->stats->internal);
> | ^~~~~~~~
> | vsprintf
> gtree.c:295:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 295 | write(desc, result, strlen(result));
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gstring.c: In function ‘__gstrcat’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> In function ‘gstrcpy’,
> inlined from ‘gstrcpy’ at gstring.c:67:5,
> inlined from ‘__gstrcat’ at gstring.c:23:5:
> gstring.c:73:18: note: length computed here
> 73 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> In file included from gstats.h:4,
> from grdiff.h:5,
> from grdiff.c:4:
> grdiff.c: In function ‘get_revs_dir’:
> ../headers.h:41:27: warning: ‘%02d’ directive writing between 2 and 11 bytes into a region of size between 8 and 15 [-Wformat-overflow=]
> 41 | #define ARCHFS_DIR_FORMAT "%4d-%02d-%02dT%02d:%02d:%02d"
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> grdiff.c:155:21: note: in expansion of macro ‘ARCHFS_DIR_FORMAT’
> 155 | sprintf(result, ARCHFS_DIR_FORMAT, rev_tm->tm_year + 1900,
> | ^~~~~~~~~~~~~~~~~
> ../headers.h:41:32: note: format string is defined here
> 41 | #define ARCHFS_DIR_FORMAT "%4d-%02d-%02dT%02d:%02d:%02d"
> | ^~~~
> ../headers.h:41:27: note: directive argument in the range [-2147483647, 2147483647]
> 41 | #define ARCHFS_DIR_FORMAT "%4d-%02d-%02dT%02d:%02d:%02d"
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> grdiff.c:155:21: note: in expansion of macro ‘ARCHFS_DIR_FORMAT’
> 155 | sprintf(result, ARCHFS_DIR_FORMAT, rev_tm->tm_year + 1900,
> | ^~~~~~~~~~~~~~~~~
> In file included from /usr/include/stdio.h:906,
> from gutils.h:2,
> from grdiff.h:4:
> In function ‘sprintf’,
> inlined from ‘get_revs_dir’ at grdiff.c:155:5:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 20 and 72 bytes into a destination of size 20
> 30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 31 | __glibc_objsize (__s), __fmt,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 32 | __va_arg_pack ());
> | ~~~~~~~~~~~~~~~~~
> gstring.c: In function ‘gstrcpy’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> In function ‘gstrcpy’,
> inlined from ‘gstrcpy’ at gstring.c:67:5:
> gstring.c:73:18: note: length computed here
> 73 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> gstring.c: In function ‘gstrncpy’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> gstring.c:84:18: note: length computed here
> 84 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> gstring.c: In function ‘gmstrcpy’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> In function ‘gstrcpy’,
> inlined from ‘gstrcpy’ at gstring.c:67:5,
> inlined from ‘gmstrcpy’ at gstring.c:115:5:
> gstring.c:73:18: note: length computed here
> 73 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> gstring.c: In function ‘gstrcat’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> In function ‘gstrcpy’,
> inlined from ‘gstrcpy’ at gstring.c:67:5,
> inlined from ‘gstrcat’ at gstring.c:147:10:
> gstring.c:73:18: note: length computed here
> 73 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> gstring.c: In function ‘gstrline’:
> gstring.c:60:5: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
> 60 | strncpy((*dest), source, count);
> | ^
> In function ‘gstrcpy’,
> inlined from ‘gstrcpy’ at gstring.c:67:5,
> inlined from ‘gstrline’ at gstring.c:234:4:
> gstring.c:73:18: note: length computed here
> 73 | int length = strlen(source);
> | ^~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[3]: *** [Makefile:343: gtree.o] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/rdiff-backup-fs_1.0.0-7_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: