• Bug#1066203: recode: FTBFS: error.c:197:43: error: implicit declaration

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:00:03 2024
    Source: recode
    Version: 3.6-25
    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.. -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 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 ‘<string.h>’ or provide a declaration of ‘strcmp’
    50 | #include "error.h"
    +++ |+#include <string.h>
    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 ‘<stdlib.h>’
    25 | #include <sys/types.h>
    +++ |+#include <stdlib.h>
    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 ‘<stdlib.h>’
    25 | #include <sys/types.h>
    +++ |+#include <stdlib.h>
    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=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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Lucas Nussbaum on Thu Mar 14 17:20:01 2024
    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)))
    | ^~~~~~
    <string.h> 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

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmXzIkMtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh g34P/2jHWnWIIGIV67DNyUEYXXC4S6x1UXTyH+uP/bj1biCIBIAN1pOCQmJHi17T 1eWaR309+jjOdYTMOWsqDvV2kkqtm1XRYpqFaDV13QqB0vVg07LCZNlk4iVuP+YF kUHtsh/VSqDvoalTXIMPF7tcjPgHzOMAYKMproSehA4IPUa7j0gG/QKxJv51Xfsm I2SY3JwPKdI/OgD9udofjIYNTu6PSQQgOWsyYQkL0baySEk2oTEasa/OsSQAMDY3 Qt4sub2zCmPo3r1CKtM6vV+l/VB3YfHFV1onxv/ITm1u5x2JS7QSfH1sR9pOh8qO J8S/3WF7yM4hdp5Bxt1Uv3JPed7YbamqQzTavxj40cywg2L0GNKTFCfrxyiHag9y ICID8oPfnDkCfUCulR3mtgeuILNkmdO7DMBASC8iYtr3BGrr+/ih0xXXhxFrJpr0 X3pWCFmbZhgNm3WxAQXtSpteFaONRKVLeIOE0sR9hrnR4nD7jTU7czRFg3A8jC8C Z7ZYh7JMe0sZuNKCmoMrOqDQ0G0Di2imHwFY2YWGb0zN6WKoMlCO3G6w8JaQdYj5 qK5NWpE2pj7bvXQL3rtgAU5sRES+IR1TGk97NGA38mucJ1ewaAsAjukgNgHPTalj pc+R+MhWwqGOdSog4nCafg7pQcljPISghK8obGO4N9yVW+rj
    =QIRb
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Wed Mar 27 13:20:01 2024
    This is a multi-part message in MIME format...

    Your message dated Wed, 27 Mar 2024 13:10:06 +0100
    with message-id <0d550a42-1a9d-4d9a-b254-b06b5644ec0c@debian.org>
    has caused the report #1066203,
    regarding recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
    to be marked as having been forwarded to the upstream software
    author(s)

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1066203: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066203
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at 1066203-forwarded) by bugs.debian.org; 27 Mar 2024 12:10:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-107.2 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,
    HAS_BUG_NUMBER,SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY,
    USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,WORD_WITHOUT_VOWELS
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 13; hammy, 150; neutral, 267; spammy,
    0. spammytokens:
    hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
    0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
    0.000-+--H*RT:311, 0.000-+--H*RT:108
    Return-path: <sanvila@debian.org>
    Received: from stravi
  • From Reuben Thomas@21:1/5 to Santiago Vila on Wed Mar 27 21:40:01 2024
    On Wed, 27 Mar 2024 at 20:25, Santiago Vila <sanvila@debian.org> 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

    <div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Mar 2024 at 20:25, Santiago Vila &lt;<a href="mailto:sanvila@debian.org">sanvila@debian.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px
    0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
    When I had already a bunch of them, I realized there is a macro<br> STDC_HEADERS which is not properly detected.</blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">Ah, I suspect the configure code is too old. Regenerating configure etc. (autoreconf)
    might help.<br></div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    -#if STDC_HEADERS<br>
    +#if STDC_HEADERS || 1<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">But this is a good test to see if you&#39;ve identified the problem.<br></div></div></div><br><span class=
    "gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><a href="https://rrt.sc3d.org" target="_blank">https://rrt.sc3d.org</a></div></div></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Santiago Vila@21:1/5 to All on Wed Mar 27 21:30:01 2024
    I saw this go past, and it seemed that the solution was indeed just to #include <string.h>; 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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Thu Mar 28 20:30:01 2024
    This is a multi-part message in MIME format...

    Your message dated Thu, 28 Mar 2024 19:22:15 +0000
    with message-id <E1rpvKJ-00CKdT-FM@fasolo.debian.org>
    and subject line Bug#1066203: fixed in recode 3.6-26
    has caused the Debian Bug report #1066203,
    regarding recode: FTBFS: error.c:197:43: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1066203: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066203
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 13 Mar 2024 11:48:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-105.2 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,
    SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,
    USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,WORD_WITHOUT_VOWELS
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 11; hammy, 150; neutral, 179; spammy,
    0. spammytokens:
    hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
    0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
    0.000-+--H*RT:311, 0.000-+--H*RT:108
    Return-path: <lucas@debian.org>
    Received: from stravinsky.de