FS#57300 - [ncurses] [slang] most of color terminals break mc start

Attached to Project: Arch Linux
Opened by Vladimir (_v_l) - Wednesday, 31 January 2018, 01:19 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Thursday, 08 February 2018, 18:40 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Jelle van der Waa (jelly)
Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description: after updating ncurses to ver. 6.1 MC (midnight-commander) refuses to start with most '-256color' terminals with message:
```
Unknown terminal: tmux-256color
Check the TERM environment variable.
Also make sure that the terminal is defined in the terminfo database.
Alternatively, set the TERMCAP environment variable to the desired
termcap entry.
```

Checked with 'screen-256color', 'xterm-256color' and 'st-256color'.

ncurses 6.0 (6.0+20170902-3) from core allows MC to start and works fine.

Additional info:
* mc 4.8.20, slang 2.3.1a, ncurses 6.0+20170902-3 vs ncurses 6.1-3

Steps to reproduce:
- start MC like that (I tried in rxvt-unicode terminal, but think it is unrelated to the terminal emulator):
```
$ TERM=tmux-256color mc
```
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Thursday, 08 February 2018, 18:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  slang 2.3.1a-2
Comment by Vladimir (_v_l) - Wednesday, 31 January 2018, 01:27 GMT
Also I tried to compare terminal type 'tmux-256color' from ncurses 6.0 and ncurses 6.1 but they seem to be incompatible: 'infocmp' from ncurses 6.0 "can't find" 'tmux-256color' from ncurses 6.1, while 'infocmp' from ncurses 6.1 finds both terminal types (I copied them into ~/tmp/6.{0,1}/t and run 'infocmp' using -A option).
Comment by Vladimir (_v_l) - Wednesday, 31 January 2018, 13:35 GMT
I made a bug report (about 'infocmp' behavior) https://lists.gnu.org/archive/html/bug-ncurses/2018-01/msg00052.html and got answer https://lists.gnu.org/archive/html/bug-ncurses/2018-01/msg00053.html . Now I don't know what to do. According to the reply, it is s-lang misbehavior so it is s-lang that must be changed. On the other hand I compiled locally MC with '--with-screen=ncurses' and it works fine. Should I open request to rebuild MC vs 'ncurses' then?
Comment by Federico Cuello (fedux) - Friday, 02 February 2018, 14:41 GMT
> On the other hand I compiled locally MC with '--with-screen=ncurses' and it works fine

Also works for me.
Comment by Mathieu Pasquet (mathieui) - Monday, 05 February 2018, 00:44 GMT
I have to add that the consequences are more widely than it seems from the title as it makes any application (about anything using ncurses, including for example less or tmux) not run under specific TERM values (such as screen-256color). Priority should probably be higher.
Comment by Vladimir (_v_l) - Monday, 05 February 2018, 02:23 GMT
> it makes any application (about anything using ncurses, including for example less or tmux) not run under specific TERM values

I doubt because MC compiled vs ncurses works fine, but the one compiled with slang --- shows the problem.

I tried to run less on sample text file with TERM=rxvt-unicode-256color and TERM=screen-256color, TERM=tmux-256color but it works fine (ncurses 6.1-3). Do you have a recipe how to show a problem with less? (I locally build tmux from git but I don't see problem with tmux too).
Comment by Bartłomiej Piotrowski (Barthalion) - Monday, 05 February 2018, 07:19 GMT
Pushing fixed mc to [community-testing], but I'm not going to keep new ncurses in [testing] forever.
Comment by Laurențiu Nicola (lnicola) - Monday, 05 February 2018, 08:46 GMT
mc seems to be working fine for me with xterm-256color.
Comment by Hugo Osvaldo Barrera (hobarrera) - Thursday, 08 February 2018, 04:01 GMT
The same issue is present when trying to run `nmtui`.

Also started being after that same ncurses update.

Is this the exact same issue, or would it require a separate fix?
Comment by AK (Andreaskem) - Thursday, 08 February 2018, 12:19 GMT
nmtui seems to use libnewt which seems to use slang. The issue would appear to be the same but I do not think that libnewt can be compiled against ncurses.
Comment by AK (Andreaskem) - Thursday, 08 February 2018, 12:56 GMT
slang 2.3.1a-1 was last updated on 2016-12-09 20:46 UTC. The slang git repository has a recent commit:

***
commit 6dd5ade9a97b52ace4ac033779a6d3c1c51db4d1
Author: John E. Davis <jed@jedsoft.org>
Date: Tue Jan 30 04:04:17 2018 -0500

pre2.3.2-19: Added support for the new ncurses 32-bit terminfo database entries.
***

So maybe slang should be bumped to a more recent git commit?
Comment by Hugo Osvaldo Barrera (hobarrera) - Thursday, 08 February 2018, 15:12 GMT
I'm not sure I entirely follow; should I open a separate issue my nmcli case? Or report this upstream?

I can't see the above link (https://invisible-island.net/ncurses/announce.html), so I can't really understand where the issue stands; I get:

> Access from your Country was disabled by the administrator.
Comment by Eli Schwartz (eschwartz) - Thursday, 08 February 2018, 15:41 GMT
No, it is the same issue, the issue is that the slang package as an alternative to ncurses is broken. If you want to report it upstream, well, apparently slang already got fixed but they didn't release an updated version with the fix -_-

Loading...