tcpxtract: FTBFS: confy.c:494:16: error: implicit declaration of function ‘yylex’ [-Werror=implicit-function-declaration]

Bug #2061589 reported by Zixing Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tcpxtract (Debian)
Fix Released
Unknown
tcpxtract (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1066484:

Source: tcpxtract
Version: 1.0.1-17
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: <email address hidden>
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;<email address hidden>
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&<email address hidden>&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.

Changed in tcpxtract (Debian):
importance: Undecided → Unknown
Changed in tcpxtract (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tcpxtract - 1.0.1-17ubuntu3

---------------
tcpxtract (1.0.1-17ubuntu3) noble; urgency=medium

  * Update configuration parser to resolve autopkgtest crash (LP: #2063015):
    - d/p/90_terminate_lexem.patch: enable verbose parser errors,
      terminate comment line lexem, match '(' ' ',' and ')' explicitly.
  * d/rules: run smoke test at the build time.

 -- Vladimir Petko <email address hidden> Tue, 23 Apr 2024 15:14:54 +1200

Changed in tcpxtract (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.