简体   繁体   English

ARM的vim交叉编译

[英]vim cross-compiling for ARM

I'm using arm-linux-gnueabi and trying to compile vim for my device. 我正在使用arm-linux-gnueabi并尝试为我的设备编译vim After some time searching and studying I'm succeeded, but when I started it from device I see this: 经过一段时间的搜索和学习,我成功了,但当我从设备开始时,我看到了这个:

# /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

cursor does not move at any direction and text I type goes in single last line. 光标不向任何方向移动,文本I类型单行最后一行。 Vim commands works fine. Vim命令工作正常。

If it matters, during compilation I compiled ncurses library and target it with flags: 如果重要的话,在编译期间我编译了ncurses库并用标志来定位它:

export LD_LIBRARY_PATH="<my_path>/lib/"
export CPPFLAGS="-L<my_path>/ncurses"
export LDFLAGS="-L<my_path>/lib"

but without --with-tlib=ncurses i had an error: 但没有--with-tlib=ncurses我有一个错误:

checking for tgetent in -lncurses... yes
ncurses library is not usable

I used installation manual for cross-compiling vim sources, according to witch I set some variables: 我使用安装手册来交叉编译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

I'm not really sure about them... 我不太确定他们......

I did some more research, but did not find any usable information. 我做了一些更多的研究,但没有找到任何有用的信息。 This issue maybe relative to wrong term detection or ncurses compilation... 这个问题可能与错误的术语检测或ncurses编译有关...

Maybe there is some flag I must set during compilation? 也许在编译期间我必须设置一些标志? Has anyone seen this before? 谁看过这个吗?

Figure this out. 把这个想出来(解决;计算出;弄明白。

It's seems that vim needed terminfo database (ncurses lib creates it) to work properly. 似乎vim需要terminfo数据库(ncurses lib创建它)才能正常工作。

I added part of the database to the device with terminals I use (vt100 and xterm) and it works fine now. 我将部分数据库添加到我使用的终端设备(vt100和xterm),现在工作正常。 To find out location for terminfo database, I used strace command: 为了找到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
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM