Bug#1066214: cyrus-sasl2: FTBFS: gssapi.c:1600:9: error: implicit declaration of function ‘gsskrb5_register_acceptor_identity’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Thorsten Glaser
Andrey Rakhmatullin dixit:

>On Wed, Mar 13, 2024 at 12:36:37PM +0100, Lucas Nussbaum wrote:
>> > gssapi.c:1600:9: error: implicit declaration of function 
>> > ‘gsskrb5_register_acceptor_identity’ 
>> > [-Werror=implicit-function-declaration]
>> >  1600 | gsskrb5_register_acceptor_identity(keytab_path);
>> >   | ^~
>The function should be declared in , in this case it's
>/usr/include/heimdal/gssapi/gssapi_krb5.h from heimdal-multidev, but
>build-heimdal/config.h defines HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY but
>doesn't define HAVE_GSSAPI_GSSAPI_KRB5_H, so  is not
>included but the code is compiled.

That’s because m4/sasl2.m4…

  AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
  if test "$ac_cv_func_gsskrb5_register_acceptor_identity" = no ; then
AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)
if test "$ac_cv_header_gssapi_gssapi_krb5_h" = "yes"; then
  AC_CHECK_DECL(gsskrb5_register_acceptor_identity,
[AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,1,
   [Define if your GSSAPI implementation defines 
gsskrb5_register_acceptor_identity])],,
[
AC_INCLUDES_DEFAULT
#include 
])
fi
  fi

… only checks for the header file if gsskrb5_register_acceptor_identity
is not found without it included.

Suggested fix:

+ AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)
  AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
  if test "$ac_cv_func_gsskrb5_register_acceptor_identity" = no ; then
-   AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)

If it’s really that, anyway.

bye,
//mirabilos
-- 
When he found out that the m68k port was in a pretty bad shape, he did
not, like many before him, shrug and move on; instead, he took it upon
himself to start compiling things, just so he could compile his shell.
How's that for dedication. -- Wouter, about my Debian/m68k revival



Bug#1066214: cyrus-sasl2: FTBFS: gssapi.c:1600:9: error: implicit declaration of function ‘gsskrb5_register_acceptor_identity’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Andrey Rakhmatullin
On Wed, Mar 13, 2024 at 12:36:37PM +0100, Lucas Nussbaum wrote:
> > gssapi.c:1600:9: error: implicit declaration of function 
> > ‘gsskrb5_register_acceptor_identity’ [-Werror=implicit-function-declaration]
> >  1600 | gsskrb5_register_acceptor_identity(keytab_path);
> >   | ^~
The function should be declared in , in this case it's
/usr/include/heimdal/gssapi/gssapi_krb5.h from heimdal-multidev, but
build-heimdal/config.h defines HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY but
doesn't define HAVE_GSSAPI_GSSAPI_KRB5_H, so  is not
included but the code is compiled.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1066214: cyrus-sasl2: FTBFS: gssapi.c:1600:9: error: implicit declaration of function ‘gsskrb5_register_acceptor_identity’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: cyrus-sasl2
Version: 2.1.28+dfsg1-4
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):
> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../lib -I..  
> -DLIBSASL_EXPORTS=1 -I../../include -I../../plugins -I../include 
> -I../../sasldb -I../../common 
> -DCONFIGDIR='"/etc/sasl2:/etc/sasl:/usr/lib/x86_64-linux-gnu/sasl2:/usr/lib/sasl2"'
>  -DPLUGINDIR='"/usr/lib/x86_64-linux-gnu/sasl2"' -Wdate-time 
> -D_FORTIFY_SOURCE=2  -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1  
> -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include  
> -Wall -W -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -Wall -pedantic -I/usr/include/heimdal -c -o gs2.o gs2.c
> gssapi.c: In function ‘gssapi_server_mech_authneg’:
> gssapi.c:909:35: warning: assignment discards ‘const’ qualifier from pointer 
> target type [-Wdiscarded-qualifiers]
>   909 | cb.application_data.value = params->cbinding->data;
>   |   ^
> gssapi.c: In function ‘gssapiv2_server_plug_init’:
> gssapi.c:1588:58: warning: ISO C does not support the ‘%m’ gnu_printf format 
> [-Wformat=]
>  1588 |"Could not find keytab file: %s: %m", keytab);
>   |  ^
> gssapi.c:1600:9: error: implicit declaration of function 
> ‘gsskrb5_register_acceptor_identity’ [-Werror=implicit-function-declaration]
>  1600 | gsskrb5_register_acceptor_identity(keytab_path);
>   | ^~
> gssapi.c: In function ‘gssapi_client_mech_step’:
> gssapi.c:1842:39: warning: assignment discards ‘const’ qualifier from pointer 
> target type [-Wdiscarded-qualifiers]
>  1842 | cb.application_data.value = params->cbinding->data;
>   |   ^
> otp.c: In function ‘parse_secret’:
> otp.c:709:32: warning: format ‘%d’ expects argument of type ‘int *’, but 
> argument 4 has type ‘unsigned int *’ [-Wformat=]
>   709 | sscanf(secret, "%s\t%04d\t%s\t%s\t%020ld",
>   | ~~~^
>   ||
>   |int *
>   | %04d
>   710 |alg, seq, seed, buf, timeout);
>   | ~~~ 
>   | |
>   | unsigned int *
> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../lib -I..  
> -DLIBSASL_EXPORTS=1 -I../../include -I../../plugins -I../include 
> -I../../sasldb -I../../common 
> -DCONFIGDIR='"/etc/sasl2:/etc/sasl:/usr/lib/x86_64-linux-gnu/sasl2:/usr/lib/sasl2"'
>  -DPLUGINDIR='"/usr/lib/x86_64-linux-gnu/sasl2"' -Wdate-time 
> -D_FORTIFY_SOURCE=2  -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1  
> -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include  
> -Wall -W -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -Wall -pedantic -I/usr/include/heimdal -c -o plain.o plain.c
> libtool: compile:  x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. 
> -DLIBSASL_EXPORTS=1 -I../../include -I../../plugins -I../include 
> -I../../sasldb -I../../common 
> -DCONFIGDIR=\"/etc/sasl2:/etc/sasl:/usr/lib/x86_64-linux-gnu/sasl2:/usr/lib/sasl2\"
>  -DPLUGINDIR=\"/usr/lib/x86_64-linux-gnu/sasl2\" -Wdate-time 
> -D_FORTIFY_SOURCE=2 -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1 
> -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include 
> -Wall -W -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -Wall -pedantic -I/usr/include/heimdal -c ../../lib/server.c -o server.o 
> >/dev/null 2>&1
> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../lib -I..  
> -DLIBSASL_EXPORTS=1 -I../../include -I../../plugins -I../include 
> -I../../sasldb -I../../common 
> -DCONFIGDIR='"/etc/sasl2:/etc/sasl:/usr/lib/x86_64-linux-gnu/sasl2:/usr/lib/sasl2"'
>  -DPLUGINDIR='"/usr/lib/x86_64-linux-gnu/sasl2"' -Wdate-time 
> -D_FORTIFY_SOURCE=2  -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1  
> -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include  
> -Wall -W -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=.