Bug#1066475: libpsortb: FTBFS: debug_funcs.c:320:38: error: implicit declaration of function ‘get_mtx_index’ [-Werror=implicit-function-declaration]

2024-03-17 Thread Andrey Rakhmatullin
On Wed, Mar 13, 2024 at 12:52:40PM +0100, Lucas Nussbaum wrote:
> > debug_funcs.c:320:38: error: implicit declaration of function 
> > ‘get_mtx_index’ [-Werror=implicit-function-declaration]
An obvious solution would be including funcs.h into debug_funcs.c but this
dead code is so bad that the prototypes in funcs.h for the functions
defined in debug_funcs.c itself are different from the function
definitions so this isn't possible. Probably nobody actually calls those
functions so nothing breaks at the run time but to be able to actually
compile them the prototypes in funcs.h should probably be fixed.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1066475: libpsortb: FTBFS: debug_funcs.c:320:38: error: implicit declaration of function ‘get_mtx_index’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: libpsortb
Version: 1.0+dfsg-5
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):
> /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
>  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -c -o std_funcs.lo std_funcs.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> debug_funcs.c  -fPIC -DPIC -o .libs/debug_funcs.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> readseqs_multialpha.c  -fPIC -DPIC -o .libs/readseqs_multialpha.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> readhmm.c  -fPIC -DPIC -o .libs/readhmm.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> hmmsearch.c  -fPIC -DPIC -o .libs/hmmsearch.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> std_calculation_funcs.c  -fPIC -DPIC -o .libs/std_calculation_funcs.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> readhmm_multialpha.c  -fPIC -DPIC -o .libs/readhmm_multialpha.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> core_algorithms_multialpha.c  -fPIC -DPIC -o 
> .libs/core_algorithms_multialpha.o
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time 
> -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c 
> std_funcs.c  -fPIC -DPIC -o .libs/std_funcs.o
> debug_funcs.c: In function ‘dump_viterbi_path’:
> debug_funcs.c:320:38: error: implicit declaration of function ‘get_mtx_index’ 
> [-Werror=implicit-function-declaration]
>   320 | dump_viterbi_path(viterbi_mtxp + get_mtx_index(row-1, cur->prev, 
> row_size), hmmp,
>   |  ^
> debug_funcs.c: In function ‘dump_replacement_letters’:
> debug_funcs.c:861:14: warning: format ‘%c’ expects argument of type ‘int’, 
> but argument 2 has type ‘struct letter_s’ [-Wformat=]
>   861 | printf("%c ", (*(replacement_letters->letters + i)));
>   | ~^~
>   |  | |
>   |  int   struct letter_s
> debug_funcs.c: In function ‘dump_replacement_letters_multi’:
> debug_funcs.c:915:16: warning: format ‘%c’ expects argument of type ‘int’, 
> but argument 2 has type ‘struct letter_s’ [-Wformat=]
>   915 |   printf("%c ", (*(replacement_letters->letters_1 + i)));
>   |   ~^~~~
>   || |
>   |int   struct letter_s
> debug_funcs.c:918:16: warning: format ‘%c’ expects argument of type ‘int’, 
> but argument 2 has type ‘struct letter_s’ [-Wformat=]
>   918 |   printf("%c ", (*(replacement_letters->letters_2 + i)));
>   |   ~^~~~
>   || |
>   |int   struct letter_s
> debug_funcs.c:921:16: warning: format ‘%c’ expects arg