I cross-compiled ncurses for ARM. Wrote a sample application that links to it. While trying to run the binary on ARM, I am getting this error.
Error opening terminal: vt100.
Looks like I am missing some terminfo installation, but not entirely sure how to do that. Can someone please help me with that?
This is the ./configure command - ./configure --host arm64-linux-gnu --prefix=/sw/nic/third-party/ncurses-6.1/arm64/ -with-termlib --enable-termcap --with-caps --disable-database --with-fallbacks --without-xterm-new
** Configuration summary for NCURSES 6.1 20180127:
extended funcs: yes
xterm terminfo: xterm-old
bin directory: /ncurses-6.1/arm64//bin
lib directory: /ncurses-6.1/arm64//lib
include directory: /ncurses-6.1/arm64//include/ncurses
man directory: /ncurses-6.1/arm64//share/man
** Include-directory is not in a standard location After this, I am doing make, I am packaging the following and loading it on the ARM board. ncurses-6.1/lib/* /usr/share/terminfo/*
Thanks in advance.
Regards, Sai
The
INSTALL
file in the ncurses source tells what you need to know:The command shown in the question does not list any fallback terminal descriptions (such as vt100).
The command should list the descriptions that you want to build into the library, e.g.,
Because you disabled the database, there is no point in copying
/usr/share/terminfo/*
, and because this uses (the default) static library, there is no need for copying the libncursesw.a to the embedded system (except in the rare case where you actually use a compiler/linker toolset running on the arm64 machine)....responding to the followup on November 18: the fallback support in the ncurses library is only used in the case where
setupterm
is called (or its callersnewterm
,initscr
)—see source code. For instance, programs such asclear
will run, but notinfocmp
.In a quick check, I ran this to build a test-copy, turning on ncurses' trace feature:
and then in ./progs
(doing the
unset
's to avoid picking up my environment). The trace file does not tell where the resulting description comes from. That's done before theset_curterm
call. If it were read from a file, that would show up. But theclear
command works. Here's the complete trace, showing the failed calls for the file-accesses, and finally thetputs
call with the expected data:Running
strings
onclear
shows this:which is the complete line from the terminfo source-file.