2

I am working on Debian. I ran this command:

./configure && make && sudo make install

and I got this error:

./etc/rxvt-unicode.terminfo", line 57, col 20, terminal 'rxvt-unicode': unknown capability 'kDC5'
./etc/rxvt-unicode.terminfo", line 58, col 19, terminal 'rxvt-unicode': unknown capability 'kDC6'
./etc/rxvt-unicode.terminfo", line 59, col 17, terminal 'rxvt-unicode': unknown capability 'kDN'
./etc/rxvt-unicode.terminfo", line 60, col 18, terminal 'rxvt-unicode': unknown capability 'kDN5'
./etc/rxvt-unicode.terminfo", line 62, col 20, terminal 'rxvt-unicode': unknown capability 'kIC5'
./etc/rxvt-unicode.terminfo", line 63, col 19, terminal 'rxvt-unicode': unknown capability 'kIC6'
./etc/rxvt-unicode.terminfo", line 65, col 21, terminal 'rxvt-unicode': unknown capability 'kEND5'
./etc/rxvt-unicode.terminfo", line 66, col 20, terminal 'rxvt-unicode': unknown capability 'kEND6'
./etc/rxvt-unicode.terminfo", line 68, col 21, terminal 'rxvt-unicode': unknown capability 'kFND5'
./etc/rxvt-unicode.terminfo", line 69, col 20, terminal 'rxvt-unicode': unknown capability 'kFND6'
./etc/rxvt-unicode.terminfo", line 71, col 21, terminal 'rxvt-unicode': unknown capability 'kHOM5'
./etc/rxvt-unicode.terminfo", line 72, col 20, terminal 'rxvt-unicode': unknown capability 'kHOM6'
./etc/rxvt-unicode.terminfo", line 74, col 19, terminal 'rxvt-unicode': unknown capability 'kLFT5'
./etc/rxvt-unicode.terminfo", line 76, col 21, terminal 'rxvt-unicode': unknown capability 'kNXT5'
./etc/rxvt-unicode.terminfo", line 77, col 20, terminal 'rxvt-unicode': unknown capability 'kNXT6'
./etc/rxvt-unicode.terminfo", line 79, col 21, terminal 'rxvt-unicode': unknown capability 'kPRV5'
./etc/rxvt-unicode.terminfo", line 80, col 20, terminal 'rxvt-unicode': unknown capability 'kPRV6'
./etc/rxvt-unicode.terminfo", line 82, col 19, terminal 'rxvt-unicode': unknown capability 'kRIT5'
./etc/rxvt-unicode.terminfo", line 83, col 17, terminal 'rxvt-unicode': unknown capability 'kUP'
./etc/rxvt-unicode.terminfo", line 84, col 18, terminal 'rxvt-unicode': unknown capability 'kUP5'

Does anyone know how to fix it?

torvim
  • 21

3 Answers3

6

The tic program is reporting that the capabilities are unknown. Use the -x option to tell tic to treat those as user-defined capabilities.

The ad hoc fix to make is in doc/Makefile, where it says something like

tic $(srcdir)/etc/rxvt-unicode.terminfo

change that to

tic -x $(srcdir)/etc/rxvt-unicode.terminfo

There are other ways to achieve the same goal, as mentioned in comments.

User-defined capabilities are an extension introduced in ncurses 5.0. Because it is an extension (and compatibility with other implementations is always an issue), you need the option to make this work.

Thomas Dickey
  • 76,765
2

Build it from the Debian source package.

The problem that you are having is in part because you are building directly from the original source. That is the wrong thing to do, here. Obtain the Debian source package; at the very least copy its debian/ directory tree; and use that.

Why one should use the Debian build process

As I just recently pointed out at https://unix.stackexchange.com/a/468218/5132 , to which Stephen Kitt added step-by-step instructions on how to do this, building from the Debian source gains one all of the fixes that Debian people have put into packages so that they work on Debian, or (as in this case) simply work at all.

One of the several patches that Debian carries against the original rxvt-unicode source (others of which you will no doubt find that you need on Debian as well) is a patch that simply turns off building the terminfo entry from the source for it that comes with rxvt-unicode.

What is going on when you do not

There's a lot of history behind this, some of which you can find in the ncurses doco and what it hyperlinks to. But the brief gloss for the purpose of this answer is this:

The terminfo entry supplied with rxvt-unicode is problematic, and what you are seeing are the several build-time messages resulting from one of its problems. There was a whole hoo-hah over changing anything relating to its terminfo record, over a decade ago, with Marc Lehmann claiming that it "is as accurate as it gets" already. What people like the Debian people have quietly done because of this years-long impasse is to simply drop Marc Lehmann's terminfo record entirely, with the aforementioned patch, and package and use the one that comes with ncurses instead.

The problem in the supplied terminfo that is relevant here is that it defines non-standard capabilities such as kDC5. One of the long-known problems with the terminfo database mechanism is that it has a fixed system of capability names, as documented in its user_caps manual page. The terminfo record supplied with rxvt-unicode contains extra capabilities that are not parts of this fixed system. Without the -x option, the tic command complains about such capabilities.

The problem that these non-standard capabilities are addressing in the first place is another long-standing problem with terminfo, namely that it is not really up to the job when it comes to adequately representing how terminals send input. In particular here, it cannot as standard represent keystroke control sequences that contain keyboard modifier state information (permitting, say, + to be distinguished from ), requiring these non-standard extensions to be invented. But there are more problems than that, as its fundamental model is different to how terminals and terminal emulators actually work in reality. That is beyond the scope of this answer, though. (You can read more in the further reading.)

Other operating systems

People experience this error on other operating systems as well.

FreeBSD people have, for example. FreeBSD, like Debian, contains sets of corrective patches in its "ports" tree. And indeed one such patch is to drop Marc Lehmann's terminfo record.

Gentoo has quietly done the same also. The ebuild for rxvt-unicode also drops Marc Lehmann's terminfo record.

OpenSUSE dropped Marc Lehmann's terminfo record in 2015.

Even Arch Linux has had to workaround the build+install process of rxvt-unicode's terminfo record, albeit that Arch chose not to simply drop it entirely, as the others have.

So build from the port/ebuild/PKGBUILD on these systems, not directly from the original source.

Further reading

JdeBP
  • 68,745
1

It seems to be a bug issue in the package urxvt.git. The package itself has been rebuilt. Please follow the instructions in this link. They provided the same error message.