On Wed, 03 Jul 2024 at 12:50:04 +0000, Matthias Klose wrote: > The package fails to build in a test rebuild on at least amd64 with > gcc-14/g++-14, but succeeds to build with gcc-13/g++-13. ... > ../../../Src/Modules/termcap.c:45:14: error: conflicting types for > ‘boolcodes’; have ‘char *[]’ > 45 | static char *boolcodes[] = { > | ^~~~~~~~~ > In file included from ../../Src/zshterm.h:1, > from ../../../Src/zsh_system.h:932, > from ./../../Src/zsh.mdh:15, > from ./termcap.mdh:15, > from ../../../Src/Modules/termcap.c:38: > /usr/include/term.h:783:56: note: previous declaration of ‘boolcodes’ with > type ‘const char * const[]’ > 783 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[]; > | ^~~~~~~~~
Please consider applying the attached patch, taken from upstream git. gcc 14 also produces several compiler warnings which I think would be useful to look into, but those don't break the build and hopefully don't indicate serious bugs. I tried compiling this in my usual build environment (sbuild inside an amd64 Debian 12 VM) and on the amd64 porterbox barriere, and the dh_auto_build step finishes successfully. Unfortunately, while this patch fixes the issue that Matthias reported, it doesn't seem to be a complete solution to making zsh build successfully: there are at least two other reasons why it fails to build from source with `debuild -B`, described below. `debuild -A` (Architecture: all only) does succeed with the attached patch. Hang during build-time tests ============================ During dh_auto_test, the test hangs for a significant time, with no obvious CPU load, and this output: > debian/rules override_dh_auto_test-arch > make[1]: Entering directory '/home/smcv/zsh' > if dpkg-architecture -qDEB_BUILD_ARCH_OS | grep -qv hurd; then \ > HOME="/home/smcv/zsh/obj/testhome" ZTST_verbose=1 dh_auto_test -B > obj; \ > fi > cd obj && make -j4 test "TESTSUITEFLAGS=-j4 --verbose" VERBOSE=1 > make[2]: Entering directory '/home/smcv/zsh/obj' > cd Test ; make check > make[3]: Entering directory '/home/smcv/zsh/obj/Test' > if test -n "ld"; then \ > cd .. && DESTDIR= \ > make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \ > fi > if test -z "$ZTST_handler"; then \ > ZTST_handler=runtests.zsh; \ > fi; \ > if ZTST_testlist="`for f in ../../Test/*.ztst; \ > do echo $f; done`" \ > ZTST_srcdir="../../Test" \ > ZTST_exe=../Src/zsh \ > ../Src/zsh +Z -f ../../Test/$ZTST_handler; then \ > stat=0; \ > else \ > stat=1; \ > fi; \ > sleep 1; \ > rm -rf Modules .zcompdump; \ > exit $stat > ../../Test/A01grammar.ztst: starting. > Running test: Test skipping if ZTST_test_skip is set This is reproducible on barriere. I see that there is already a patch applied, debian/patches/further-mitigate-test-suite-hangs.patch. Perhaps it will be necessary to further further mitigate test-suite hangs... Or perhaps the affected tests could be skipped without harming coverage too much? missing files: obj/Src/Modules/*.h ================================== If I skip the build-time tests with DEB_BUILD_OPTIONS=nocheck, instead I get this build failure: > dh_install > dh_install: warning: Cannot find (any matches for) "obj/Src/Modules/*.h" > (tried in ., debian/tmp) > > dh_install: warning: zsh-dev missing files: obj/Src/Modules/*.h > dh_install: error: missing files, aborting This is also reproducible on barriere. I don't know what has changed to stop these headers from being generated. I'm sorry I couldn't fully fix the build of this package, but I hope the patch I attached is a useful step in the right direction. smcv
From: Florian Weimer <fwei...@redhat.com> Date: Fri, 8 Dec 2023 21:58:07 +0100 Subject: 52383: Avoid incompatible pointer types in terminfo global variable checks Origin: upstream, commit:https://sourceforge.net/p/zsh/code/ci/4c89849c98172c951a9def3690e8647dae76308f/ Bug-Debian: https://bugs.debian.org/1075708 --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index f810052..928b467 100644 --- a/configure.ac +++ b/configure.ac @@ -1771,27 +1771,27 @@ if test x$zsh_cv_path_term_header != xnone; then fi AC_MSG_CHECKING(if boolcodes is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) AC_MSG_RESULT($boolcodes) AC_MSG_CHECKING(if numcodes is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) AC_MSG_RESULT($numcodes) AC_MSG_CHECKING(if strcodes is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) AC_MSG_RESULT($strcodes) AC_MSG_CHECKING(if boolnames is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) AC_MSG_RESULT($boolnames) AC_MSG_CHECKING(if numnames is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) AC_MSG_RESULT($numnames) AC_MSG_CHECKING(if strnames is available) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) AC_MSG_RESULT($strnames) dnl There are apparently defective terminal library headers on some