Bug#1066653: prime-phylo: FTBFS: gb.tab.c:1096:16: error: implicit declaration of function ‘yylex’ [-Werror=implicit-function-declaration]
Package: prime-phylo Followup-For: Bug #1066653 User: ubuntu-de...@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/fix-ftbfs-with-gcc13.patch: Fix missing headers and missing prototypes. Closes LP: #2061032. 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-26-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 prime-phylo-1.0.11/debian/patches/fix-ftbfs-with-gcc13.patch prime-phylo-1.0.11/debian/patches/fix-ftbfs-with-gcc13.patch --- prime-phylo-1.0.11/debian/patches/fix-ftbfs-with-gcc13.patch 1969-12-31 17:00:00.0 -0700 +++ prime-phylo-1.0.11/debian/patches/fix-ftbfs-with-gcc13.patch 2024-04-11 16:13:25.0 -0600 @@ -0,0 +1,54 @@ +Description: Fix missing headers and missing prototypes +Author: Zixing Liu +Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/prime-phylo/+bug/2061032 +Forwarded: no +Last-Update: 2024-04-11 +Index: prime-phylo/src/cxx/libraries/prime/NHXparse.y +=== +--- prime-phylo.orig/src/cxx/libraries/prime/NHXparse.y prime-phylo/src/cxx/libraries/prime/NHXparse.y +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "NHXnode.h" + #include "NHXtree.h" + #include "NHXannotation.h" +@@ -14,7 +15,9 @@ + /* #define YYERROR_VERBOSE */ + + /* Here comes some C declarations */ +- ++extern int yylex (void); ++extern void read_from_string(char *str); ++extern void close_string_buffer(); + extern FILE *yytree_in; + extern char *yytree_text; + extern unsigned int lineno; /* Current line number in input file */ +Index: prime-phylo/src/cxx/libraries/sfile/gb.y +=== +--- prime-phylo.orig/src/cxx/libraries/sfile/gb.y prime-phylo/src/cxx/libraries/sfile/gb.y +@@ -23,7 +23,8 @@ + #include "entry.h" + #include "sfile.h" + +- ++extern int yylex (void); ++unsigned linenumber(); + static int yyerror(); + + #define YYDEBUG 1 +Index: prime-phylo/src/cxx/libraries/sfile/gbread.c +=== +--- prime-phylo.orig/src/cxx/libraries/sfile/gbread.c prime-phylo/src/cxx/libraries/sfile/gbread.c +@@ -3,6 +3,7 @@ + + extern int yydebug; + ++#include + #include "sfile.h" + #include "gb.tab.h" + diff -Nru prime-phylo-1.0.11/debian/patches/series prime-phylo-1.0.11/debian/patches/series --- prime-phylo-1.0.11/debian/patches/series2021-05-20 05:51:42.0 -0600 +++ prime-phylo-1.0.11/debian/patches/series2024-04-11 16:10:29.0 -0600 @@ -3,3 +3,4 @@ fix-gcc-8.patch 0003-Fix-build-with-Boost-1.67.patch 0004-fix-gcc10-build.patch +fix-ftbfs-with-gcc13.patch
Bug#1066653: prime-phylo: FTBFS: gb.tab.c:1096:16: error: implicit declaration of function ‘yylex’ [-Werror=implicit-function-declaration]
Source: prime-phylo Version: 1.0.11-10 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@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 /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile && > /usr/bin/cc -DONLY_ONE_TIMESAMPLE -DPERTURBED_NODE > -Dprime_phylo_sfile_EXPORTS > -I/<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile > -I/<>/src/cxx/libraries/sfile > -I/usr/lib/x86_64-linux-gnu/openmpi/include > -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi > -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx > -I/usr/include/libxml2 -I/<>/src/cxx/libraries/prime > -I/<>/obj-x86_64-linux-gnu/src/cxx/libraries/prime > -I/<>/src/cxx/libraries -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wall > -fexceptions -g -fPIC -MD -MT > src/cxx/libraries/sfile/CMakeFiles/prime-phylo-sfile.dir/sfile.c.o -MF > CMakeFiles/prime-phylo-sfile.dir/sfile.c.o.d -o > CMakeFiles/prime-phylo-sfile.dir/sfile.c.o -c > /<>/src/cxx/libraries/sfile/sfile.c > /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile/gb.tab.c: In > function ‘yyparse’: > /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile/gb.tab.c:1096:16: > error: implicit declaration of function ‘yylex’ > [-Werror=implicit-function-declaration] > 1096 | yychar = yylex (); > |^ > gb.y: In function ‘yyerror’: > gb.y:291:70: error: implicit declaration of function ‘linenumber’ > [-Werror=implicit-function-declaration] > gb.y: In function ‘add_to_seq’: > gb.y:402:9: warning: unused variable ‘new_buf’ [-Wunused-variable] > /<>/src/cxx/libraries/sfile/gbread.c: In function ‘main’: > /<>/src/cxx/libraries/sfile/gbread.c:17:10: error: implicit > declaration of function ‘strcmp’ [-Werror=implicit-function-declaration] >17 | if (!strcmp(argv[opt], "-d")) { > | ^~ > /<>/src/cxx/libraries/sfile/gbread.c:8:1: note: include > ‘’ or provide a declaration of ‘strcmp’ > 7 | #include "gb.tab.h" > +++ |+#include > 8 | > seqreader.l: In function ‘seq_read’: > seqreader.l:270:9: warning: unused variable ‘code’ [-Wunused-variable] > /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile/lexer.c: At top > level: > /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile/lexer.c:1864:16: > warning: ‘input’ defined but not used [-Wunused-function] > 1864 | static int input (void) > |^ > /<>/obj-x86_64-linux-gnu/src/cxx/libraries/sfile/lexer.c:1821:17: > warning: ‘yyunput’ defined but not used [-Wunused-function] > 1821 | static void yyunput (int c, char * yy_bp ) > | ^~~ > /<>/src/cxx/libraries/sfile/sfile.c: In function ‘seq_print’: > /<>/src/cxx/libraries/sfile/sfile.c:265:14: warning: format ‘%d’ > expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] > 265 | printf("%9d", char_counter + 1); > | ^ > | | > | long int > /<>/src/cxx/libraries/sfile/sfile.c:212:15: warning: variable > ‘date’ set but not used [-Wunused-but-set-variable] > 212 | char *top, *date; > | ^~~~ > cc1: some warnings being treated as errors > make[3]: *** > [src/cxx/libraries/sfile/CMakeFiles/prime-phylo-sfile.dir/build.make:90: > src/cxx/libraries/sfile/CMakeFiles/prime-phylo-sfile.dir/gbread.c.o] Error 1 The full build log is available from: http://qa-logs.debian.net/2024/03/13/prime-phylo_1.0.11-10_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=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.