Cru*_*der 5 linux vim ncurses cross-compiling
我正在使用arm-linux-gnueabi并尝试为我的设备编译vim。经过一段时间的搜索和研究,我成功了,但是当我从设备启动它时,我看到了这一点:
# /usr/tmp/vim/bin/vim
~
...
~
~VIM - Vi IMprovedversion 7.4.873by Bram Moolenaar et al.Vim is open source and freely distributableSponsor Vim development!type :help sponsor<Enter> for informationtype :q<Enter>to exittype :help<Enter> or <F1> for on-line helptype :help version7<Enter> for version infoRunning in Vi compatible modetype :set nocp<Enter>for Vim defaultstype :help cp-default<Enter> for info on this
Run Code Online (Sandbox Code Playgroud)
光标不会向任何方向移动,并且我输入的文本进入最后一行。Vim 命令运行良好。
如果重要的话,在编译过程中我编译了ncurses库并使用标志来定位它:
export LD_LIBRARY_PATH="<my_path>/lib/"
export CPPFLAGS="-L<my_path>/ncurses"
export LDFLAGS="-L<my_path>/lib"
Run Code Online (Sandbox Code Playgroud)
但如果没有--with-tlib=ncurses我有一个错误:
checking for tgetent in -lncurses... yes
ncurses library is not usable
Run Code Online (Sandbox Code Playgroud)
我使用安装手册来交叉编译vim源,根据我设置了一些变量:
export vim_cv_terminfo=yes
export vim_cv_tty_group=world
export vim_cv_getcwd_broken=no
export vim_cv_stat_ignores_slash=yes
export vim_cv_memmove_handles_overlap=yes
export vim_cv_bcopy_handles_overlap=yes
export vim_cv_memcpy_handles_overlap=yes
export vim_cv_tgetent=non-zero
Run Code Online (Sandbox Code Playgroud)
我不太确定他们的情况...
我做了一些更多的研究,但没有找到任何有用的信息。这个问题可能与错误的术语检测或 ncurses 编译有关......
也许我在编译期间必须设置一些标志?有没有人见过这个?
想出解决办法。
看来 vim 需要terminfo数据库(ncurses lib 创建它)才能正常工作。
我将部分数据库添加到带有我使用的终端(vt100 和 xterm)的设备中,现在工作正常。为了找出 terminfo 数据库的位置,我使用了strace命令:
strace vim
...
stat64("/root/.terminfo", 0xc7a4c8) = -1 ENOENT (No such file or directory)
stat64("/opt/share/terminfo", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1778 次 |
| 最近记录: |