• Bug#1066506: mcpp: FTBFS: system.c:2510:20: error: implicit declaration

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:30:03 2024
    Source: mcpp
    Version: 2.7.2-5
    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):
    /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -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 -o system.lo system.c
    libtool: compile: gcc -DHAVE_CONFIG_H -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 expand.c -fPIC -DPIC -o .libs/expand.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 support.c -fPIC -DPIC -o .libs/support.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 directive.c -fPIC -DPIC -o .libs/directive.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 eval.c -fPIC -DPIC -o .libs/eval.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 mbchar.c -fPIC -DPIC -o .libs/mbchar.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 system.c -fPIC -DPIC -o .libs/system.o
    libtool: compile: gcc -DHAVE_CONFIG_H -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 main.c -fPIC -DPIC -o .libs/main.o
    support.c: In function ‘get_ch’:
    support.c:1590:19: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    1590 | free( file->src_dir);
    | ~~~~^~~~~~~~~
    In file included from configed.H:374,
    from system.H:45,
    from support.c:76:
    /usr/include/stdlib.h:568:25: note: expected ‘void *’ but argument is of type ‘const char *’
    568 | extern void free (void *__ptr) __THROW;
    | ~~~~~~^~~~~
    support.c:1596:19: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    1596 | free( file->src_dir); /* Free src_dir */
    | ~~~~^~~~~~~~~
    /usr/include/stdlib.h:568:25: note: expected ‘void *’ but argument is of type ‘const char *’
    568 | extern void free (void *__ptr) __THROW;
    | ~~~~~~^~~~~
    support.c:1599:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    1599 | cur_fullname = infile->full_fname;
    | ^
    support.c: In function ‘get_file’:
    support.c:2308:21: warning: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    2308 | strcpy( file->src_dir, src_dir);
    | ~~~~^~~~~~~~~
    In file included from /usr/include/features.h:490,
    from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
    from /usr/include/limits.h:26,
    from /usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h:205,
    from /usr/lib/gcc/x86_64-linux-gnu/13/include/syslimits.h:7,
    from /usr/lib/gcc/x86_64-linux-gnu/13/include/limits.h:34,
    from configed.H:305: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘char * restrict’ but argument is of type ‘const char *’
    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
    | ^~~~~
    expand.c: In function ‘replace’:
    expand.c:713:21: warning: assignment to ‘char *’ from incompatible pointer type ‘LOCATION *’ {aka ‘struct location *’} [-Wincompatible-pointer-types]
    713 | m_inf->args = m_inf->loc_args = NULL; /* Default args */
    | ^
    expand.c: In function ‘rescan’:
    expand.c:1975:41: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    1975 | mgc_cleared = remove_magics(
    | ^
    system.c: In function ‘norm_path’:
    system.c:2510:20: error: implicit declaration of function ‘readlink’ [-Werror=implicit-function-declaration]
    2510 | if ((len = readlink( slbuf1, slbuf2, PATHMAX)) > 0) {
    | ^~~~~~~~
    system.c: In function ‘do_once’:
    system.c:4245:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    4245 | once_end->name = fullname;
    | ^
    system.c: In function ‘do_options’:
    system.c:452:5: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    452 | getcwd( cur_work_dir, PATHMAX);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    libtool: compile: gcc -DHAVE_CONFIG_H -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 main.c -o main.o >/dev/null 2>&1
    libtool: compile: gcc -DHAVE_CONFIG_H -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 mbchar.c -o mbchar.o >/dev/null 2>&1
    libtool: compile: gcc -DHAVE_CONFIG_H -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 directive.c -o directive.o >/dev/null 2>&1
    libtool: compile: gcc -DHAVE_CONFIG_H -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 eval.c -o eval.o >/dev/null 2>&1
    cc1: some warnings being treated as errors
    make[4]: *** [Makefile:590: system.lo] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/mcpp_2.7.2-5_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 All on Sat Mar 16 15:20:01 2024
    --sQUkYATQcbQJp4B4
    Content-Type: text/plain; charset=utf-8
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Control: tags 1066506 + patch
    Control: tags 1066506 + pending

    Dear maintainer,

    I've prepared an NMU for mcpp (versioned as 2.7.2-5.1) and
    uploaded it to DELAYED/4. Please feel free to tell me if I
    should delay it longer.

    Regards.


    --
    WBR, wRAR

    --sQUkYATQcbQJp4B4
    Content-Type: text/x-diff; charset=utf-8
    Content-Disposition: attachment; filename="mcpp-2.7.2-5.1-nmu.diff" Content-Transfer-Encoding: quoted-printable

    diff -Nru mcpp-2.7.2/debian/changelog mcpp-2.7.2/debian/changelog
    --- mcpp-2.7.2/debian/changelog 2019-08-15 11:50:38.000000000 +0500
    +++ mcpp-2.7.2/debian/changelog 2024-03-16 18:23:16.000000000 +0500
    @@ -1,3 +1,10 @@
    +mcpp (2.7.2-5.1) unstable; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTBFS with -Werror=implicit-function-declaration (Closes: #1066506).
    +
    + -- Andrey Rakhmatullin <wrar@debian.org> Sat, 16 Mar 2024 18:23:16 +0500
    +
    mcpp (2.7.2-5) unstable; urgency=medium

    * debian/compat: Require 10.
    diff -Nru mcpp-2.7.2/debian/patches/fix-implicit-function-declaration.patch mcpp-2.7.2/debian/patches/fix-implicit-function-declaration.patch
    --- mcpp-2.7.2/debian/patches/fix-implicit-function-declaration.patch 1970-01-01 05:00:00.000000000 +0500
    +++ mcpp-2.7.2/debian/patches/fix-impli
  • From Debian Bug Tracking System@21:1/5 to All on Sat Mar 16 15:20:01 2024
    Processing control commands:

    tags 1066506 + patch
    Bug #1066506 [src:mcpp] mcpp: FTBFS: system.c:2510:20: error: implicit declaration of function ‘readlink’ [-Werror=implicit-function-declaration]
    Added tag(s) patch.
    tags 1066506 + pending
    Bug #1066506 [src:mcpp] mcpp: FTBFS: system.c:2510:20: error: implicit declaration of function ‘readlink’ [-Werror=implicit-function-declaration]
    Added tag(s) pending.

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

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

    Your message dated Wed, 20 Mar 2024 14:46:27 +0000
    with message-id <E1rmxD1-007Obz-QZ@fasolo.debian.org>
    and subject line Bug#1066506: fixed in mcpp 2.7.2-5.1
    has caused the Debian Bug report #1066506,
    regarding mcpp: FTBFS: system.c:2510:20: error: implicit declaration of function ‘readlink’ [-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.)


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

    Received: (at submit) by bugs.debian.org; 13 Mar 2024 12:21:40 +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=-106.1 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,
    FROMDEVELOPER,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,
    UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 58; hammy, 150; neutral, 283; 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:108, 0.000-+--H*RT:311
    Return-path: <lucas@debian.org>
    Received: from stravinsky.debian.org ([20