On Fri, 2020-09-18 at 18:26:34 +0200, Sven Joachim wrote: > Am 18.09.2020 um 13:43 schrieb Helmut Grohne: > > Source: dpkg > > Version: 1.20.5 > > Severity: serious > > Tags: ftbfs > > > > dpkg FTBFS as of today: > > > > | In file included from ../../dselect/curkeys.cc:30: > > | ./curkeys.h:168:5: error: ‘KEY_EVENT’ was not declared in this scope; did > > you mean ‘KEY_OPEN’? > > | 168 | { KEY_EVENT, "Event" }, > > | | ^~~~~~~~~ > > | | KEY_OPEN
> > I suppose this is connected to a ncurses upload. > Quoting the ncurses NEWS file: > > ,---- > | 20200817 > | + prevent KEY_EVENT from appearing in curses.h unless the configure > | option --enable-wgetch-events is used (report by Werner Fink). > `---- Right, thanks for the confirmation, that's along the lines of what I had gathered from checking the header. Even though the problem here is that the macro is there, but just behind a conditional, I suppose that's still expected? > See the thread at > https://lists.gnu.org/archive/html/bug-ncurses/2020-08/threads.html#00017 > for a discussion that motivated this change. I'll check this later, but no matter what, I think it is still worth fixing the dpkg build system to handle this kind of case more robustly. I've prepared the attached patch which seems to work with gcc and clang, and I'll try to upload either later today or tomorrow. Thanks, Guillem
diff --git i/dselect/Makefile.am w/dselect/Makefile.am index 9206603a2..8195fe414 100644 --- i/dselect/Makefile.am +++ w/dselect/Makefile.am @@ -57,18 +57,14 @@ dselect_LDADD = \ EXTRA_DIST = keyoverride mkcurkeys.pl -CLEANFILES = curkeys.h +CLEANFILES = curkeys.hpp curkeys.h curkeys.$(OBJEXT): curkeys.h -curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl - $(AM_V_GEN) cursesfile=`echo '#include "dselect-curses.h"' | \ - $(CPP) $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - | \ - grep '[^-]curses\.h' | head -n 1 | \ - sed -e 's/^[^"]*"//; s/".*$$//'`; \ - if [ "$$cursesfile" = "" ]; then \ - echo "can't find curses file"; exit 1; \ - fi; \ - $(PERL) $(srcdir)/mkcurkeys.pl $< $$cursesfile >$@ +curkeys.hpp: dselect-curses.h + $(AM_V_GEN) echo '#include "dselect-curses.h"' | \ + $(CPP) -dD $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - > $@ +curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl curkeys.hpp + $(PERL) $(srcdir)/mkcurkeys.pl $< curkeys.hpp >$@ install-data-local: $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/dselect.cfg.d