• Bug#1066484: tcpxtract: FTBFS: confy.c:494:16: error: implicit declarat

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:20:02 2024
    Source: tcpxtract
    Version: 1.0.1-17
    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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"tcpxtract\" -DVERSION=\"1.0.1\" -DYYTEXT_POINTER=1 -DHAVE_LIBPCAP=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -
    DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -D_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g -O2 -Werror=implicit-
    function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DDEFAULT_CONFIG_FILE=\"/etc/tcpxtract.conf\" -c -o extract.o extract.c
    confy.c: In function ‘yyparse’:
    confy.c:494:16: error: implicit declaration of function ‘yylex’ [-Werror=implicit-function-declaration]
    494 | # define YYLEX yylex ()
    | ^~~~~
    confy.c:950:16: note: in expansion of macro ‘YYLEX’
    950 | yychar = YYLEX;
    | ^~~~~
    confy.c:1188:9: error: implicit declaration of function ‘yyerror’; did you mean ‘yyerrok’? [-Werror=implicit-function-declaration]
    1188 | yyerror ("syntax error");
    | ^~~~~~~
    | yyerrok
    confy.y: At top level:
    confy.y:58:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    58 | yyerror(char *s)
    | ^~~~~~~
    confl.l: In function ‘yylex’:
    confl.l:28:47: error: implicit declaration of function ‘strdup’ [-Werror=implicit-function-declaration]
    28 | [0-9]+ {yylval.string = strdup(yytext); return NUMBER;}
    | ^~~~~~
    confl.l:28:47: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch]
    confl.l:29:18: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch]
    29 | [a-zA-Z][a-zA-Z0-9]* {yylval.string = strdup(yytext); return WORD;}
    | ^~~~~~~~~
    confl.l:30:32: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch]
    30 | [a-zA-Z0-9\\\?]+ {yylval.string = strdup(yytext); return SPECIFIER;}
    | ^~~~~~~~~~~~~
    In file included from /usr/include/inttypes.h:25,
    from /usr/include/pcap/pcap-inttypes.h:98,
    from /usr/include/pcap/pcap.h:117,
    from /usr/include/pcap.h:43,
    from tcpxtract.c:25:
    /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
    195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
    | ^~~~~~~
    tcpxtract.c: In function ‘main’:
    tcpxtract.c:312:5: error: implicit declaration of function ‘yyparse’ [-Werror=implicit-function-declaration]
    312 | yyparse();
    | ^~~~~~~
    tcpxtract.c:320:9: warning: ‘pcap_lookupdev’ is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
    320 | dev = pcap_lookupdev(errbuf);
    | ^~~
    /usr/include/pcap/pcap.h:395:18: note: declared here
    395 | PCAP_API char *pcap_lookupdev(char *);
    | ^~~~~~~~~~~~~~
    tcpxtract.c:355:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘struct bpf_program’ [-Wformat=]
    355 | fprintf(stderr, "Couldn't parse filter %s: %s\n", filter, pcap_geterr(handle));
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
    | |
    | struct bpf_program
    tcpxtract.c:359:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘struct bpf_program’ [-Wformat=]
    359 | fprintf(stderr, "Couldn't install filter %s: %s\n", filter, pcap_geterr(handle));
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
    | |
    | struct bpf_program
    cc1: some warnings being treated as errors
    make[1]: *** [Makefile:462: confy.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/tcpxtract_1.0.1-17_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 Zixing Liu@21:1/5 to All on Mon Apr 15 21:40:01 2024
    This is a multi-part MIME message sent by reportbug.


    Package: tcpxtract
    Followup-For: Bug #1066484
    User: ubuntu-devel@lists.ubuntu.com
    Usertags: origin-ubuntu noble ubuntu-patch
    Control: tags -1 patch

    Dear Maintainer,

    In Ubuntu, the attached patch was applied to achieve the following:

    * debian/patches/70_fix-implicit-declarations.patch: Add missing
    includes and function prototypes. Closes #1066484, LP: #2061589.


    Thanks for considering the patch.


    -- System Information:
    Debian Release: bookworm/sid
    APT prefers jammy-updates
    APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.5.0-27-generic (SMP w/10 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
    Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    diff -Nru tcpxtract-1.0.1/debian/patches/70_fix-implicit-declarations.patch tcpxtract-1.0.1/debian/patches/70_fix-implicit-declarations.patch
    --- tcpxtract-1.0.1/debian/patches/70_fix-implicit-declarations.patch 1969-12-31 17:00:00.000000000 -0700
    +++ tcpxtract-1.0.1/debian/patches/70_fix-implicit-declarations.patch 2024-04-15 10:41:14.000000000 -0600
    @@ -0,0 +1,57 @@
    +Description: Add missing includes and function prototypes
    + This fixes the FTBFS on armhf
    +Author: Zixing Liu <zixing.liu@canonical.com>
    +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066484 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2061589
    +Forwarded: no
    +Last-Update: 2024-04-15
    +---
    +Index: tcpxtract/conf.h +===================================================================
    +--- tcpxtract.orig/conf.h
    ++++ tcpxtract/conf.h
    +@@ -24,5 +24,8 @@
    + #define CONF_H
    +
    + extern void config_type(char *, char *, char *, char *);
    ++int yyparse (void);
    ++int yyerror(char *s);
    ++int yylex (void);
    +
    + #endif /* CONF_H */
    +Index: tcpxtract/confl.l +===================================================================
    +--- tcpxtract.orig/confl.l
    ++++ tcp
  • From Debian Bug Tracking System@21:1/5 to All on Mon Apr 15 21:40:02 2024
    Processing control commands:

    tags -1 patch
    Bug #1066484 [src:tcpxtract] tcpxtract: FTBFS: confy.c:494:16: error: implicit declaration of function ‘yylex’ [-Werror=implicit-function-declaration]
    Added tag(s) patch.

    --
    1066484: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066484
    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 Tue Apr 16 18:30:01 2024
    This is a multi-part message in MIME format...

    Your message dated Tue, 16 Apr 2024 16:25:11 +0000
    with message-id <E1rwlcN-00A6g1-Pc@fasolo.debian.org>
    and subject line Bug#1066484: fixed in tcpxtract 1.0.1-18
    has caused the Debian Bug report #1066484,
    regarding tcpxtract: FTBFS: confy.c:494:16: error: implicit declaration of function ‘yylex’ [-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.)


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

    Received: (at submit) by bugs.debian.org; 13 Mar 2024 12:17:19 +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,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, 50; hammy, 150; neutral, 286; 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 stravins