【发布时间】:2015-09-23 12:13:50
【问题描述】:
我正在使用 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
光标不会向任何方向移动,并且我输入的文本在最后一行。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
我不太确定他们...
我做了更多的研究,但没有找到任何有用的信息。 此问题可能与错误的 term 检测或 ncurses 编译有关...
也许在编译期间我必须设置一些标志?有人见过这个吗?
【问题讨论】:
-
您能否提供您使用的资源的链接或完成此操作的说明或工作脚本?我猜你也必须从源代码交叉编译所有依赖项?根据您下面的回答,terminfo 数据库是否只需要在运行时出现在目标上?
-
据我所知,我只交叉编译 ncurses lib。我在 vim 的源代码中找到了编译 vim 的说明。是的,必须在目标机器上提供带有术语文件的 terminfo 目录。它有点大,但你只能留下你需要的文件。如果您卡住了 - 请随时向我寻求帮助。也许我能记住一些有用的东西。
标签: linux vim cross-compiling ncurses