交叉编译vim for armv7

时间:2017-09-03 16:12:42

标签: vim arm cross-compiling

我想在Ubuntu 16.04 LTS上为armv7交叉编译vim。当我尝试配置时,我收到错误:

…
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

因此,我交叉编译了ncurses,并在〜/ work / ncurses / install 中为arm安装了ncurses:

#~/work/ncurses/install# l
insgesamt 12K
drwxrwxr-x 2 root root 4,0K Sep  3 16:56 bin
drwxrwxr-x 2 root root 4,0K Sep  3 16:56 lib
drwxrwxr-x 5 root root 4,0K Sep  3 16:56 usr
#~/work/ncurses/install# cd bin
#~/work/ncurses/install/bin# l
insgesamt 192K
lrwxrwxrwx 1 root root   23 Sep  3 16:56 arm-linux-gnueabihf-captoinfo -> arm-linux-gnueabihf-tic
-rwxr-xr-x 1 root root 8,3K Sep  3 16:56 arm-linux-gnueabihf-clear
-rwxr-xr-x 1 root root  47K Sep  3 16:56 arm-linux-gnueabihf-infocmp
lrwxrwxrwx 1 root root   23 Sep  3 16:56 arm-linux-gnueabihf-infotocap -> arm-linux-gnueabihf-tic
lrwxrwxrwx 1 root root   24 Sep  3 16:56 arm-linux-gnueabihf-reset -> arm-linux-gnueabihf-tset
-rwxr-xr-x 1 root root  14K Sep  3 16:56 arm-linux-gnueabihf-tabs
-rwxr-xr-x 1 root root  51K Sep  3 16:56 arm-linux-gnueabihf-tic
-rwxr-xr-x 1 root root  14K Sep  3 16:56 arm-linux-gnueabihf-toe
-rwxr-xr-x 1 root root  14K Sep  3 16:56 arm-linux-gnueabihf-tput
-rwxr-xr-x 1 root root  20K Sep  3 16:56 arm-linux-gnueabihf-tset
-rwxr-xr-x 1 root root 5,2K Sep  3 16:56 ncurses5-config
#~/work/ncurses/install/bin# l ../lib
insgesamt 1004K
lrwxrwxrwx 1 root root   12 Sep  3 16:56 libcurses.a -> libncurses.a
lrwxrwxrwx 1 root root   17 Sep  3 16:56 libcurses.so -> libncurses.so.5.9
-rw-r--r-- 1 root root  79K Sep  3 16:56 libform.a
lrwxrwxrwx 1 root root   12 Sep  3 16:56 libform.so -> libform.so.5
lrwxrwxrwx 1 root root   14 Sep  3 16:56 libform.so.5 -> libform.so.5.9
-rwxrwxr-x 1 root root  49K Sep  3 16:56 libform.so.5.9
-rw-r--r-- 1 root root  44K Sep  3 16:56 libmenu.a
lrwxrwxrwx 1 root root   12 Sep  3 16:56 libmenu.so -> libmenu.so.5
lrwxrwxrwx 1 root root   14 Sep  3 16:56 libmenu.so.5 -> libmenu.so.5.9
-rwxrwxr-x 1 root root  30K Sep  3 16:56 libmenu.so.5.9
-rw-r--r-- 1 root root 377K Sep  3 16:56 libncurses.a
-rw-r--r-- 1 root root 128K Sep  3 16:56 libncurses++.a
lrwxrwxrwx 1 root root   15 Sep  3 16:56 libncurses.so -> libncurses.so.5
lrwxrwxrwx 1 root root   17 Sep  3 16:56 libncurses.so.5 -> libncurses.so.5.9
-rwxrwxr-x 1 root root 230K Sep  3 16:56 libncurses.so.5.9
-rw-r--r-- 1 root root  19K Sep  3 16:56 libpanel.a
lrwxrwxrwx 1 root root   13 Sep  3 16:56 libpanel.so -> libpanel.so.5
lrwxrwxrwx 1 root root   15 Sep  3 16:56 libpanel.so.5 -> libpanel.so.5.9
-rwxrwxr-x 1 root root  13K Sep  3 16:56 libpanel.so.5.9
#~/work/ncurses/install/bin# l ../usr
insgesamt 12K
drwxrwxr-x 2 root root 4,0K Sep  3 16:56 include
drwxrwxr-x 6 root root 4,0K Sep  3 16:56 man
drwxrwxr-x 4 root root 4,0K Sep  3 16:56 share

我现在尝试配置 - with -tlib =〜/ work / ncurses / install / lib 但是我收到错误:

…
checking for stack_t... yes
checking whether stack_t has an ss_base field... no
checking --with-tlib argument... ~/work/ncurses/install/lib
checking for linking with ~/work/ncurses/install/lib library... configure: error: FAILED

我怎样才能让它发挥作用? 提前谢谢。

完整配置:

export TARGET=arm-linux-gnueabihf
LDFLAGS=-L~/work/ncurses/install/lib ./configure --target=$TARGET --prefix=$PREFIX --with-sysroot=$TARGET --with-arch=$TARGET CC=arm-linux-gnueabihf-gcc --host=$TARGET --with-tlib=ncurses

最后我成功了:

export TARGET=arm
export LDFLAGS=-L$HOME/work/ncurses/install/lib
export PREFIX=$HOME/work/vim2/build
./configure --build=$TARGET --host=$TARGET    --prefix=/usr --enable-multibyte --enable-gui=no -disable-gtktest --disable-xim --with-features=normal     --disable-gpm --without-x --disable-netbeans --with-tlib=ncurses
make -j4 CC=arm-linux-gnueabihf-gcc
make DESTDIR=/root/work/vim2/install CC=arm-linux-gnueabihf-gcc install

0 个答案:

没有答案