Bug#868328: libtinfo5: ABI break: _nc_read_entry symbol dropped
On Fri, Jul 14, 2017 at 09:45:50PM +0200, Sven Joachim wrote: > On 2017-07-14 18:57 +0200, Sven Joachim wrote: > > > On 2017-07-14 16:13 +0200, Sven Joachim wrote: > > > >> The symbol _nc_read_entry got inadvertently dropped in favor of > >> _nc_read_entry2, and this breaks reverse dependencies (ncurses-bin > >> before 6.0+20170701-1 and tack): > > > > This happened because _nc_read_entry is only compiled in if > > NCURSES_EXT_NUMBERS is #defined and not 0. There's probably a good reason > > for this, since when I take out this condition infocmp from stretch > > segfaults. > > > > Bringing back the previous implementation of _nc_read_entry instead > > seems to work, as in the attached patch. While this might to be good > > enough for Debian, upstream likely want a better solution that works > > with other configure flags as well. > > Another point interesting for upstream here, although it does not affect > the current Debian package: even when building --with-abi-version=6 > (i.e. the default), _nc_read_entry is still missing from the tinfo > library unless --enable-widec is also given. The (small) fix I made yesterday seems to fix both configurations. If it doesn't, I'll investigate further, given the relevant configure options. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net signature.asc Description: Digital signature
Bug#868328: libtinfo5: ABI break: _nc_read_entry symbol dropped
On 2017-07-14 18:57 +0200, Sven Joachim wrote: > On 2017-07-14 16:13 +0200, Sven Joachim wrote: > >> The symbol _nc_read_entry got inadvertently dropped in favor of >> _nc_read_entry2, and this breaks reverse dependencies (ncurses-bin >> before 6.0+20170701-1 and tack): > > This happened because _nc_read_entry is only compiled in if > NCURSES_EXT_NUMBERS is #defined and not 0. There's probably a good reason > for this, since when I take out this condition infocmp from stretch > segfaults. > > Bringing back the previous implementation of _nc_read_entry instead > seems to work, as in the attached patch. While this might to be good > enough for Debian, upstream likely want a better solution that works > with other configure flags as well. Another point interesting for upstream here, although it does not affect the current Debian package: even when building --with-abi-version=6 (i.e. the default), _nc_read_entry is still missing from the tinfo library unless --enable-widec is also given. That happens because NCURSES_EXT_NUMBERS is only #defined as 1 in curses.priv.h if NCURSES_EXT_COLORS is also not 0, but for the non-wide build it will be 0. Sven
Bug#868328: libtinfo5: ABI break: _nc_read_entry symbol dropped
On 2017-07-14 16:13 +0200, Sven Joachim wrote: > Package: libtinfo5 > Version: 6.0+20170701-1 > Severity: serious > > The symbol _nc_read_entry got inadvertently dropped in favor of > _nc_read_entry2, and this breaks reverse dependencies (ncurses-bin > before 6.0+20170701-1 and tack): This happened because _nc_read_entry is only compiled in if NCURSES_EXT_NUMBERS is #defined and not 0. There's probably a good reason for this, since when I take out this condition infocmp from stretch segfaults. Bringing back the previous implementation of _nc_read_entry instead seems to work, as in the attached patch. While this might to be good enough for Debian, upstream likely want a better solution that works with other configure flags as well. Sven --- ncurses/tinfo/read_entry.c | 40 1 file changed, 40 insertions(+) --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -766,4 +766,44 @@ _nc_read_entry(const char *const name, c _nc_export_termtype2(tp, &dummy); return rc; } +#else +NCURSES_EXPORT(int) +_nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp) +{ +int code = TGETENT_NO; + +_nc_SPRINTF(filename, _nc_SLIMIT(PATH_MAX) + "%.*s", PATH_MAX - 1, name); + +if (strlen(name) == 0 + || strcmp(name, ".") == 0 + || strcmp(name, "..") == 0 + || _nc_pathlast(name) != 0 + || strchr(name, NCURSES_PATHSEP) != 0) { + TR(TRACE_DATABASE, ("illegal or missing entry name '%s'", name)); +} else { +#if NCURSES_USE_DATABASE + DBDIRS state; + int offset; + const char *path; + + _nc_first_db(&state, &offset); + code = TGETENT_ERR; + while ((path = _nc_next_db(&state, &offset)) != 0) { + code = _nc_read_tic_entry(filename, PATH_MAX, path, name, tp); + if (code == TGETENT_YES) { + _nc_last_db(); + break; + } + } +#elif NCURSES_USE_TERMCAP + if (code != TGETENT_YES) { + code = _nc_read_termcap_entry(name, tp); + _nc_SPRINTF(filename, _nc_SLIMIT(PATH_MAX) + "%.*s", PATH_MAX - 1, _nc_get_source()); + } +#endif +} +return code; +} #endif
Bug#868328: libtinfo5: ABI break: _nc_read_entry symbol dropped
On 2017-07-14 16:13 +0200, Sven Joachim wrote: > Package: libtinfo5 > Version: 6.0+20170701-1 > Severity: serious > > The symbol _nc_read_entry got inadvertently dropped in favor of > _nc_read_entry2, and this breaks reverse dependencies (ncurses-bin > before 6.0+20170701-1 and tack): > > , > | $ infocmp > | infocmp: relocation error: infocmp: symbol _nc_read_entry, version > | NCURSES_TINFO_5.0.19991023 not defined in file libtinfo.so.5 with > | link time reference > | $ tack > | tack: relocation error: tack: symbol _nc_read_entry, version > | NCURSES_TINFO_5.0.19991023 not defined in file libtinfo.so.5 with > | link time reference > ` In addition, this change makes tack unbuildable: to work around #862472, I added "export DEB_CPPFLAGS_MAINT_APPEND = -DNCURSES_INTERNALS" to tack's debian/rules, and later linking failed: , | ../tack-1.07/init.o: In function `curses_setup': | ./init.c:203: undefined reference to `_nc_read_entry' | collect2: error: ld returned 1 exit status ` Ouch.
Bug#868328: libtinfo5: ABI break: _nc_read_entry symbol dropped
Package: libtinfo5 Version: 6.0+20170701-1 Severity: serious The symbol _nc_read_entry got inadvertently dropped in favor of _nc_read_entry2, and this breaks reverse dependencies (ncurses-bin before 6.0+20170701-1 and tack): , | $ infocmp | infocmp: relocation error: infocmp: symbol _nc_read_entry, version NCURSES_TINFO_5.0.19991023 not defined in file libtinfo.so.5 with link time reference | $ tack | tack: relocation error: tack: symbol _nc_read_entry, version NCURSES_TINFO_5.0.19991023 not defined in file libtinfo.so.5 with link time reference ` -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (101, 'experimental') Architecture: i386 (x86_64) Foreign Architectures: amd64 Kernel: Linux 4.12.1-nouveau (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libtinfo5 depends on: ii libc6 2.24-12 libtinfo5 recommends no packages. libtinfo5 suggests no packages. -- no debconf information