Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
Ok, the problem was that CFLAGS now contains -Werror=implicit-function-declaration by default, set by dpkg-buildflags in unstable. The minimal fix is to drop such option, by adding this line to debian/rules: export DEB_CFLAGS_MAINT_STRIP = -Werror=implicit-function-declaration I'm Cc:ing Andrey Rakhmatullin, who was kind enough to look at this and try to diagnose it. Thanks.
Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
On Wed, 27 Mar 2024 at 20:25, Santiago Vila wrote: > > When I had already a bunch of them, I realized there is a macro > STDC_HEADERS which is not properly detected. Ah, I suspect the configure code is too old. Regenerating configure etc. (autoreconf) might help. -#if STDC_HEADERS > +#if STDC_HEADERS || 1 > But this is a good test to see if you've identified the problem. -- https://rrt.sc3d.org
Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
I saw this go past, and it seemed that the solution was indeed just to #include ; are you saying it's more complicated than that? It depends on how much good we want the fix to be. I started to add such includes every time the C compiler suggested it. When I had already a bunch of them, I realized there is a macro STDC_HEADERS which is not properly detected. That seems the proper solution. So, I tried to override such variable but didn't find the way. Now my current idea is to change the code in this way wherever needed: -#if STDC_HEADERS +#if STDC_HEADERS || 1 Will tell you how it goes. That would be the easy fix. For a more proper fix, I'd like to know why STDC_HEADERS is not properly detected, but I don't know enough autoconf to debug that. Thanks.
Bug#1066203: Fwd: Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
Hello. I've received this report from the Debian BTS. Have not had time to look at it. I guess I need help. Thanks. Mensaje reenviado Asunto: Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration] Resent-Date: Wed, 13 Mar 2024 11:51:31 + Resent-From: Lucas Nussbaum Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Santiago Vila Fecha: Wed, 13 Mar 2024 12:44:18 +0100 De: Lucas Nussbaum Responder a: Lucas Nussbaum , 1066...@bugs.debian.org Para: sub...@bugs.debian.org Source: recode Version: 3.6-25 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@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.. -I.. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c realloc.c error.c: In function ‘error_at_line’: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration] 197 | (file_name == old_file_name || !strcmp (old_file_name, file_name))) | ^~ error.c:51:1: note: include ‘’ or provide a declaration of ‘strcmp’ 50 | #include "error.h" +++ |+#include 51 | realloc.c:28:7: warning: conflicting types for built-in function ‘realloc’; expected ‘void *(void *, long unsigned int)’ [-Wbuiltin-declaration-mismatch] 28 | char *realloc (); | ^~~ realloc.c:26:1: note: ‘realloc’ is declared in header ‘’ 25 | #include +++ |+#include 26 | malloc.c:27:7: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch] 27 | char *malloc (); | ^~ malloc.c:26:1: note: ‘malloc’ is declared in header ‘’ 25 | #include +++ |+#include 26 | cc1: some warnings being treated as errors make[4]: *** [Makefile:172: error.o] Error 1 The full build log is available from: http://qa-logs.debian.net/2024/03/13/recode_3.6-25_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=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.
Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
On Wed, Mar 13, 2024 at 12:44:18PM +0100, Lucas Nussbaum wrote: > > error.c:197:43: error: implicit declaration of function ‘strcmp’ > > [-Werror=implicit-function-declaration] > > 197 | (file_name == old_file_name || !strcmp (old_file_name, > > file_name))) > > | ^~ is included in that file under #if STDC_HEADERS || _LIBC. No idea what is _LIBC as it's only mentioned in various .c files, but STDC_HEADERS is set/unset by configure via AC_HEADER_STDC, and in this case it's unset ("checking for ANSI C header files... no"): configure:6168: gcc -o conftest -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/recode-ConsAw/recode-3.6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro conftest.c 1>&5 configure: In function 'main': configure:6163:67: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration] -- WBR, wRAR signature.asc Description: PGP signature
Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
Source: recode Version: 3.6-25 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@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.. -I.. -I. -Wdate-time -D_FORTIFY_SOURCE=2 > -g -O2 -Werror=implicit-function-declaration > -ffile-prefix-map=/<>=. -fstack-protector-strong > -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c > realloc.c > error.c: In function ‘error_at_line’: > error.c:197:43: error: implicit declaration of function ‘strcmp’ > [-Werror=implicit-function-declaration] > 197 | (file_name == old_file_name || !strcmp (old_file_name, > file_name))) > | ^~ > error.c:51:1: note: include ‘’ or provide a declaration of ‘strcmp’ >50 | #include "error.h" > +++ |+#include >51 | > realloc.c:28:7: warning: conflicting types for built-in function ‘realloc’; > expected ‘void *(void *, long unsigned int)’ [-Wbuiltin-declaration-mismatch] >28 | char *realloc (); > | ^~~ > realloc.c:26:1: note: ‘realloc’ is declared in header ‘’ >25 | #include > +++ |+#include >26 | > malloc.c:27:7: warning: conflicting types for built-in function ‘malloc’; > expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch] >27 | char *malloc (); > | ^~ > malloc.c:26:1: note: ‘malloc’ is declared in header ‘’ >25 | #include > +++ |+#include >26 | > cc1: some warnings being treated as errors > make[4]: *** [Makefile:172: error.o] Error 1 The full build log is available from: http://qa-logs.debian.net/2024/03/13/recode_3.6-25_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=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.