• Bug#1066556: libdrpm: FTBFS: drpm_write.c:94:20: error: implicit declar

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:50:02 2024
    Source: libdrpm
    Version: 0.5.1-1
    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):
    cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test && /usr/bin/cc -fvisibility=hidden -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-
    protection -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -MD -MT test/CMakeFiles/drpm_api_tests.dir/__/src/drpm_apply.c.o -MF CMakeFiles/drpm_api_tests.dir/__/src/
    drpm_apply.c.o.d -o CMakeFiles/drpm_api_tests.dir/__/src/drpm_apply.c.o -c /<<PKGBUILDDIR>>/src/drpm_apply.c
    /<<PKGBUILDDIR>>/src/drpm_utils.c:38:41: warning: argument 1 of type ‘const unsigned char[2]’ with mismatched bound [-Warray-parameter=]
    38 | uint16_t parse_be16(const unsigned char buffer[2])
    | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
    In file included from /<<PKGBUILDDIR>>/src/drpm_utils.c:23: /<<PKGBUILDDIR>>/src/drpm_private.h:237:21: note: previously declared as ‘const unsigned char *’
    237 | uint16_t parse_be16(const unsigned char *);
    | ^~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_utils.c:44:41: warning: argument 1 of type ‘const unsigned char[4]’ with mismatched bound [-Warray-parameter=]
    44 | uint32_t parse_be32(const unsigned char buffer[4])
    | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_private.h:238:21: note: previously declared as ‘const unsigned char *’
    238 | uint32_t parse_be32(const unsigned char *);
    | ^~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_utils.c:53:41: warning: argument 1 of type ‘const unsigned char[8]’ with mismatched bound [-Warray-parameter=]
    53 | uint64_t parse_be64(const unsigned char buffer[8])
    | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_private.h:239:21: note: previously declared as ‘const unsigned char *’
    239 | uint64_t parse_be64(const unsigned char *);
    | ^~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_utils.c:66:45: warning: argument 2 of type ‘unsigned char[4]’ with mismatched bound [-Warray-parameter=]
    66 | void create_be32(uint32_t in, unsigned char out[4])
    | ~~~~~~~~~~~~~~^~~~~~ /<<PKGBUILDDIR>>/src/drpm_private.h:233:28: note: previously declared as ‘unsigned char *’
    233 | void create_be32(uint32_t, unsigned char *);
    | ^~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_utils.c:75:45: warning: argument 2 of type ‘unsigned char[8]’ with mismatched bound [-Warray-parameter=]
    75 | void create_be64(uint64_t in, unsigned char out[8])
    | ~~~~~~~~~~~~~~^~~~~~ /<<PKGBUILDDIR>>/src/drpm_private.h:234:28: note: previously declared as ‘unsigned char *’
    234 | void create_be64(uint64_t, unsigned char *);
    | ^~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/src/drpm_write.c: In function ‘write_deltarpm’: /<<PKGBUILDDIR>>/src/drpm_write.c:94:20: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
    94 | src_nevr_len = strlen(delta->src_nevr) + 1;
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/drpm_write.c:30:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
    29 | #include <rpm/rpmlib.h>
    +++ |+#include <string.h>
    30 |
    /<<PKGBUILDDIR>>/src/drpm_write.c:94:20: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
    94 | src_nevr_len = strlen(delta->src_nevr) + 1;
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/drpm_write.c:94:20: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
    /<<PKGBUILDDIR>>/src/drpm_write.c: In function ‘compstrm_wrapper_write’: /<<PKGBUILDDIR>>/src/drpm_write.c:364:9: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
    364 | memcpy(csw->uncomp_data + csw->uncomp_len - csw->uncomp_left, buffer, write_len);
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/drpm_write.c:364:9: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
    /<<PKGBUILDDIR>>/src/drpm_write.c:364:9: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch]
    /<<PKGBUILDDIR>>/src/drpm_write.c:364:9: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
    /<<PKGBUILDDIR>>/src/drpm_write.c: In function ‘compstrm_wrapper_finish’: /<<PKGBUILDDIR>>/src/drpm_write.c:389:5: error: implicit declaration of function ‘memmove’ [-Werror=implicit-function-declaration]
    389 | memmove(data_tmp + csw->uncomp_len, data_tmp, *data_len);
    | ^~~~~~~
    /<<PKGBUILDDIR>>/src/drpm_write.c:389:5: note: include ‘<string.h>’ or provide a declaration of ‘memmove’
    /<<PKGBUILDDIR>>/src/drpm_write.c:389:5: warning: incompatible implicit declaration of built-in function ‘memmove’ [-Wbuiltin-declaration-mismatch]
    /<<PKGBUILDDIR>>/src/drpm_write.c:389:5: note: include ‘<string.h>’ or provide a declaration of ‘memmove’
    /<<PKGBUILDDIR>>/src/drpm_write.c:390:5: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch]
    390 | memcpy(data_tmp, csw->uncomp_data, csw->uncomp_len);
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/drpm_write.c:390:5: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
    [ 58%] Building C object test/CMakeFiles/drpm_api_tests.dir/__/src/drpm_block.c.o
    cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test && /usr/bin/cc -fvisibility=hidden -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-
    protection -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -MD -MT test/CMakeFiles/drpm_api_tests.dir/__/src/drpm_block.c.o -MF CMakeFiles/drpm_api_tests.dir/__/src/
    drpm_block.c.o.d -o CMakeFiles/drpm_api_tests.dir/__/src/drpm_block.c.o -c /<<PKGBUILDDIR>>/src/drpm_block.c
    [ 61%] Building C object test/CMakeFiles/drpm_api_tests.dir/__/src/drpm_compstrm.c.o
    cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test && /usr/bin/cc -fvisibility=hidden -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-
    protection -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -MD -MT test/CMakeFiles/drpm_api_tests.dir/__/src/drpm_compstrm.c.o -MF CMakeFiles/drpm_api_tests.dir/__/
    src/drpm_compstrm.c.o.d -o CMakeFiles/drpm_api_tests.dir/__/src/drpm_compstrm.c.o -c /<<PKGBUILDDIR>>/src/drpm_compstrm.c
    /<<PKGBUILDDIR>>/src/drpm_block.c:285:52: warning: argument 2 of type ‘unsigned char[8192]’ with mismatched bound [-Warray-parameter=]
    285 | int blocks_next(struct blocks *blks, unsigned char buffer[BLOCK_SIZE], size_t *buffer_len,
    | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /<<PKGBUILDDIR>>/src/drpm_block.c:23: /<<PKGBUILDDIR>>/src/drpm_private.h:143:34: note: previously declared as ‘unsigned char *’
    143 | int blocks_next(struct blocks *, unsigned char *, size_t *, uint64_t, size_t,
    | ^~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[3]: *** [src/CMakeFiles/drpm.dir/build.make:261: src/CMakeFiles/drpm.dir/drpm_write.c.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/libdrpm_0.5.1-1_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 Debian Bug Tracking System@21:1/5 to All on Sat Mar 16 16:30:01 2024
    Processing control commands:

    tags 1066556 + patch
    Bug #1066556 [src:libdrpm] libdrpm: FTBFS: drpm_write.c:94:20: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
    Added tag(s) patch.
    tags 1066556 + pending
    Bug #1066556 [src:libdrpm] libdrpm: FTBFS: drpm_write.c:94:20: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
    Added tag(s) pending.

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to All on Sat Mar 16 16:30:01 2024
    --eDXs/ipF8eHPQuaO
    Content-Type: text/plain; charset=utf-8
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Control: tags 1066556 + patch
    Control: tags 1066556 + pending

    Dear maintainer,

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

    Regards.


    --
    WBR, wRAR

    --eDXs/ipF8eHPQuaO
    Content-Type: text/x-diff; charset=utf-8
    Content-Disposition: attachment; filename="libdrpm-0.5.1-1.1-nmu.diff" Content-Transfer-Encoding: quoted-printable

    diff -Nru libdrpm-0.5.1/debian/changelog libdrpm-0.5.1/debian/changelog
    --- libdrpm-0.5.1/debian/changelog 2022-09-09 11:08:12.000000000 +0500
    +++ libdrpm-0.5.1/debian/changelog 2024-03-16 20:17:44.000000000 +0500
    @@ -1,3 +1,10 @@
    +libdrpm (0.5.1-1.1) unstable; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTBFS with -Werror=implicit-function-declaration (Closes: #1066556).
    +
    + -- Andrey Rakhmatullin <wrar@debian.org> Sat, 16 Mar 2024 20:17:44 +0500
    +
    libdrpm (0.5.1-1) unstable; urgency=medium

    * Declare compliance with Policy 4.6.1 with no changes.
    diff -Nru libdrpm-0.5.1/debian/patches/fix-implicit-function-declaration.patch libdrpm-0.5.1/debian/patches/fix-implicit-function-declaration.patch
    --- libdrpm-0.5.1/debian/patches/fix-implicit-function-declaration.patch 1970-01-01 05:00:00
  • From Debian Bug Tracking System@21:1/5 to All on Wed Mar 20 17:10:02 2024
    This is a multi-part message in MIME format...

    Your message dated Wed, 20 Mar 2024 16:06:10 +0000
    with message-id <E1rmySA-007ctR-I4@fasolo.debian.org>
    and subject line Bug#1066556: fixed in libdrpm 0.5.1-1.1
    has caused the Debian Bug report #1066556,
    regarding libdrpm: FTBFS: drpm_write.c:94:20: error: implicit declaration of function ‘strlen’ [-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.)


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

    Received: (at submit) by bugs.debian.org; 13 Mar 2024 12:42:46 +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.2 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,
    FVGT_m_MULTI_ODD,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, 68; hammy, 150; neutral, 215; 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.debia