#1066538 - netrw: FTBFS: netread.c:69:5: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration] - Debian Bug report logs

Debian Bug report logs - #1066538
netrw: FTBFS: netread.c:69:5: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration]

version graph

Package: src:netrw; Maintainer for src:netrw is Giovanni Mascellani <gio@debian.org>;

Reported by: Lucas Nussbaum <lucas@debian.org>

Date: Wed, 13 Mar 2024 12:39:14 UTC

Severity: serious

Tags: ftbfs, sid, trixie

Found in version netrw/1.3.2-3

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Giovanni Mascellani <gio@debian.org>:
Bug#1066538; Package src:netrw. (Wed, 13 Mar 2024 12:39:17 GMT) (full text, mbox, link).


Acknowledgement sent to Lucas Nussbaum <lucas@debian.org>:
New Bug report received and forwarded. Copy sent to Giovanni Mascellani <gio@debian.org>. (Wed, 13 Mar 2024 12:39:17 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Lucas Nussbaum <lucas@debian.org>
To: submit@bugs.debian.org
Subject: netrw: FTBFS: netread.c:69:5: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration]
Date: Wed, 13 Mar 2024 12:54:02 +0100
Source: netrw
Version: 1.3.2-3
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. -I..   -Wdate-time -D_FORTIFY_SOURCE=2  -O3 -g -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c `test -f 'netread.c' || echo './'`netread.c
> netread.c: In function ‘usage’:
> netread.c:69:5: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration]
>    69 |     fprintf(stderr,
>       |     ^~~~~~~
> netread.c:66:1: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
>    65 | #include "version.h"
>   +++ |+#include <stdio.h>
>    66 | 
> netread.c:69:5: warning: incompatible implicit declaration of built-in function ‘fprintf’ [-Wbuiltin-declaration-mismatch]
>    69 |     fprintf(stderr,
>       |     ^~~~~~~
> netread.c:69:5: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
> netread.c:69:13: error: ‘stderr’ undeclared (first use in this function)
>    69 |     fprintf(stderr,
>       |             ^~~~~~
> netread.c:69:13: note: ‘stderr’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
> netread.c:69:13: note: each undeclared identifier is reported only once for each function it appears in
> netread.c:89:5: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
>    89 |     exit(1);
>       |     ^~~~
> netread.c:66:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
>    65 | #include "version.h"
>   +++ |+#include <stdlib.h>
>    66 | 
> netread.c:89:5: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
>    89 |     exit(1);
>       |     ^~~~
> netread.c:89:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
> In file included from netread.c:65:
> netread.c: In function ‘main’:
> ../version.h:37:9: error: implicit declaration of function ‘puts’ [-Werror=implicit-function-declaration]
>    37 |         puts("netrw tools version " VERSION " (" DATE ")\n"             \
>       |         ^~~~
> netread.c:137:9: note: in expansion of macro ‘VERSION_CASE’
>   137 |         VERSION_CASE        /* version */
>       |         ^~~~~~~~~~~~
> ../version.h:37:9: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’
>    37 |         puts("netrw tools version " VERSION " (" DATE ")\n"             \
>       |         ^~~~
> netread.c:137:9: note: in expansion of macro ‘VERSION_CASE’
>   137 |         VERSION_CASE        /* version */
>       |         ^~~~~~~~~~~~
> In file included from netread.c:59:
> progress.h:47:29: error: implicit declaration of function ‘atoi’ [-Werror=implicit-function-declaration]
>    47 |         progress_hash_after(atoi(optarg) * 1024 * 1024);    \
>       |                             ^~~~
> netread.c:139:9: note: in expansion of macro ‘HASH_CASE’
>   139 |         HASH_CASE           /* hash printing options */
>       |         ^~~~~~~~~
> netread.c:155:15: error: implicit declaration of function ‘strerror’ [-Werror=implicit-function-declaration]
>   155 |               strerror(errno), file);
>       |               ^~~~~~~~
> cc1: some warnings being treated as errors
> make[3]: *** [Makefile:229: netread.o] Error 1


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



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Nov 28 12:19:10 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.