Re: ncurses 6.6-20260314 can no longer read xterm_256color extended attributes on redhat 8+ systems

Sven Joachim <[email protected]> Tue, 21 Jul 2026 20:56:59 +0200
Newsgroups gmane.comp.lib.ncurses.bugs
Message-ID <[email protected]>
On 2026-07-20 17:56 -0400, Thomas Dickey wrote:

> On Mon, Jul 20, 2026 at 10:22:10PM +0200, Sven Joachim wrote:
>> On 2026-07-16 17:17 -0400, Thomas Dickey wrote:
>>=20
>> > On Thu, Jul 16, 2026 at 05:15:42PM -0400, Thomas Dickey wrote:
>> >>=20
>> >> Reading that, there's no compile changes (attaching diff, for conven=
ience)
>> >
>> > adding it...
>>=20
>> > Index: ncurses/tinfo/read_entry.c
>> > Prereq:  1.175=20
>> > --- ncurses-6.6-20260301+/ncurses/tinfo/read_entry.c	2025-01-11 23:52=
:18.000000000 +0000
>> > +++ ncurses-6.6-20260307/ncurses/tinfo/read_entry.c	2026-03-07 17:49:=
54.000000000 +0000
>> > @@ -517,13 +517,8 @@
>> >  				    _nc_visbuf(ptr->Strings[i + STRCOUNT])));
>> >  	    }
>> >  	    TR(TRACE_DATABASE, ("Check table-size: %d/%d", check, ext_str_u=
sage));
>> > -#if 0
>> > -	    /*
>> > -	     * Phasing in a proper check will be done "later".
>> > -	     */
>> >  	    if (check !=3D ext_str_usage)
>> >  		returnDB(TGETENT_NO);
>> > -#endif
>> >  	}
>> > =20
>> >  	if (need) {
>>=20
>> I suspect it is this check which fails with the old terminfo files buil=
t
>> by tic 6.1, but have not tested that.  Todd might want to revert this
>> change and see if it helps.
>
> He replied off-list regarding the two .c changes, and I indicated this
> was more likely.
>
> (I didn't happen to see how to reproduce the issue as described, otherwi=
se
> I'd have made some change this weekend).

I could reproduce the problem with the following steps in Debian
testing/unstable:

,----
| $ wget https://snapshot.debian.org/archive/debian/20180227T161438Z/pool/=
main/n/ncurses/ncurses-base_6.1%2B20180210-1_all.deb
| $ dpkg-deb -x ncurses-base_6.1+20180210-1_all.deb /tmp/test
| $ infocmp -x -A /tmp/test/lib/terminfo -B /usr/share/terminfo xterm xter=
m
| infocmp: error: no match in terminfo database for terminal type "xterm"
`----

Reverting the 20260307 change to ncurses/tinfo/read_entry.c fixes it.

In the NEWS file there is the following entry:

,----
| 20180331
| 	+ improve terminfo write/read by modifying the fourth item of the
| 	  extended header to denote the number of valid strings in the extended
| 	  string table (prompted by a comment in unibilium's sources).
`----

Perhaps you noticed at the time that the check breaks reading terminfo
entries compiled by older tic versions, but forgot it eight years later
when you enabled it?

Cheers,
       Sven