linux – 用于ARM的vim交叉编译教程
我正在使用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
光标不向任何方向移动,文本I类型单行最后一行. Vim命令工作正常.
如果重要的话,在编译期间我编译了ncurses库并用标志来定位它:
export LD_LIBRARY_PATH="<my_path>/lib/"
export CPPFLAGS="-L<my_path>/ncurses"
export LDFLAGS="-L<my_path>/lib"
但没有–with-tlib = ncurses我有一个错误:
checking for tgetent in -lncurses... yes
ncurses library is not usable
我使用安装手册来交叉编译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
我不太确定他们……
我做了一些更多的研究,但没有找到任何有用的信息.
这个问题可能与错误的术语检测或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
...