Dear maintainer(s),
krb5 fails to build from source with glibc 2.43, currently in
experimental. From the build log:
| make[6]: Entering directory '/build/reproducible-path/krb5-1.22.1/build/lib/krb5/ccache'
| gcc -fPIC -DSHARED -DHAVE_CONFIG_H -I../../../include -I../../../../src/include -I../../../../src/lib/krb5/ccache/ccapi -I../../../../src/lib/krb5/ccache -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/krb5-1.22.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=strict-prototypes -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread -c ../../../../src/lib/krb5/ccache/ccapi_util.c -o ccapi_util.so.o && mv -f ccapi_util.so.o ccapi_util.so
| gcc -fPIC -DSHARED -DHAVE_CONFIG_H -I../../../include -I../../../../src/include -I../../../../src/lib/krb5/ccache/ccapi -I../../../../src/lib/krb5/ccache -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/krb5-1.22.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=strict-prototypes -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread -c ../../../../src/lib/krb5/ccache/ccbase.c -o ccbase.so.o && mv -f ccbase.so.o ccbase.so
| ../../../../src/lib/krb5/ccache/ccbase.c: In function ‘krb5_cc_resolve’:
| ../../../../src/lib/krb5/ccache/ccbase.c:213:8: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
| 213 | cp = strchr (name, ':');
| | ^
| cc1: some warnings being treated as errors
| make[6]: *** [Makefile:784: ccbase.so] Error 1
| make[6]: Leaving directory '/build/reproducible-path/krb5-1.22.1/build/lib/krb5/ccache'
| make[5]: *** [Makefile:1109: all-recurse] Error 1
| make[5]: Leaving directory '/build/reproducible-path/krb5-1.22.1/build/lib/krb5'
| make[4]: *** [Makefile:971: all-recurse] Error 1
| make[4]: Leaving directory '/build/reproducible-path/krb5-1.22.1/build/lib'
| make[3]: *** [Makefile:1537: all-recurse] Error 1
| make[3]: Leaving directory '/build/reproducible-path/krb5-1.22.1/build'
| dh_auto_build: error: cd build && make -j1 returned exit code 2
| make[2]: *** [debian/rules:58: override_dh_auto_build] Error 25
| make[2]: Leaving directory '/build/reproducible-path/krb5-1.22.1'
| make[1]: *** [debian/rules:161: build-arch] Error 2
| make[1]: Leaving directory '/build/reproducible-path/krb5-1.22.1'
| make: *** [debian/rules:161: binary] Error 2
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
The full build log is attached to this bug report.
The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
which now returns a pointer to a const-qualified type when the input
argument is a pointer to a const-qualified type [2]. I believe that the
issue is fixed upstream [3], but I haven't tested the patch.
Regards
Aurelien
[1] https://people.debian.org/~ema/glibc-2.43-rebuilds/output-1/krb5_arm64.build
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19
[3] https://github.com/krb5/krb5/commit/ad4dcf1856dadc4b352b5c8ff08e51c7290fb41f