2016-06-28 165 views
0

我尝试使用Linaro为我的ARM板交叉编译“nano-2.5.3”程序。 我的搭建平台是linux ubuntu 12.04。我使用这些命令Linux交叉编译库

export PATH=$PATH:/project/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin 
export CROSS_COMPILE=arm-linux-gnueabihf- 
export ARCH=arm 

./configure --host=arm-linux-gnueabihf --prefix=/project/nano 

每一件事情都很顺利,然后我尝试使用使

make 

后有一个错误:

/usr/include/ncursesw/curses.h:60:34: fatal error: ncursesw/ncurses_dll.h: No such file or directory 

,所以我编了ncurses库我在路径“/ project/ncurses”中交叉编译并添加包含:

export CPPFLAGS=-I/project/ncurses/include/ncurses 

再做一遍。但没有运气 我什么都试过,但交叉编译继续检查原始路径 这里有完整的错误文本:

make all-recursive 
make[1]: Entering directory `/project/nano-2.5.3' 
Making all in doc 
make[2]: Entering directory `/project/nano-2.5.3/doc' 
Making all in man 
make[3]: Entering directory `/project/nano-2.5.3/doc/man' 
make all-recursive 
make[4]: Entering directory `/project/nano-2.5.3/doc/man' 
Making all in fr 
make[5]: Entering directory `/project/nano-2.5.3/doc/man/fr' 
make all-am 
make[6]: Entering directory `/project/nano-2.5.3/doc/man/fr' 
make[6]: Nothing to be done for `all-am'. 
make[6]: Leaving directory `/project/nano-2.5.3/doc/man/fr' 
make[5]: Leaving directory `/project/nano-2.5.3/doc/man/fr' 
make[5]: Entering directory `/project/nano-2.5.3/doc/man' 
make[5]: Nothing to be done for `all-am'. 
make[5]: Leaving directory `/project/nano-2.5.3/doc/man' 
make[4]: Leaving directory `/project/nano-2.5.3/doc/man' 
make[3]: Leaving directory `/project/nano-2.5.3/doc/man' 
Making all in texinfo 
make[3]: Entering directory `/project/nano-2.5.3/doc/texinfo' 
make all-am 
make[4]: Entering directory `/project/nano-2.5.3/doc/texinfo' 
make[4]: Nothing to be done for `all-am'. 
make[4]: Leaving directory `/project/nano-2.5.3/doc/texinfo' 
make[3]: Leaving directory `/project/nano-2.5.3/doc/texinfo' 
Making all in syntax 
make[3]: Entering directory `/project/nano-2.5.3/doc/syntax' 
make[3]: Nothing to be done for `all'. 
make[3]: Leaving directory `/project/nano-2.5.3/doc/syntax' 
make[3]: Entering directory `/project/nano-2.5.3/doc' 
make[3]: Nothing to be done for `all-am'. 
make[3]: Leaving directory `/project/nano-2.5.3/doc' 
make[2]: Leaving directory `/project/nano-2.5.3/doc' 
Making all in m4 
make[2]: Entering directory `/project/nano-2.5.3/m4' 
make[2]: Nothing to be done for `all'. 
make[2]: Leaving directory `/project/nano-2.5.3/m4' 
Making all in po 
make[2]: Entering directory `/project/nano-2.5.3/po' 
make[2]: Nothing to be done for `all'. 
make[2]: Leaving directory `/project/nano-2.5.3/po' 
Making all in src 
make[2]: Entering directory `/project/nano-2.5.3/src' 
arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/project/nano/share/locale\" -DSYSCONFDIR=\"/project/nano/etc\" -I/usr/include/ncursesw -I/project/ncurses/include/ncurses -g -O2 -Wall -MT browser.o -MD -MP -MF .deps/browser.Tpo -c -o browser.o browser.c 
In file included from nano.h:93:0, 
       from proto.h:27, 
       from browser.c:25: 
/usr/include/ncursesw/curses.h:60:34: fatal error: ncursesw/ncurses_dll.h: No such file or directory 
compilation terminated. 
make[2]: *** [browser.o] Error 1 
make[2]: Leaving directory `/project/nano-2.5.3/src' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory `/project/nano-2.5.3' 
make: *** [all] Error 2 
+0

所以有/project/ncurses/include/ncurses/ncursesw/ncurses_dll.h? –

+0

在/project/ncurses/include/ncurses/ncurses_dll.h中有一个 –

+0

您必须以某种方式摆脱您在构建命令中仍然存在的“-I/usr/include/ncursesw”。 – dbrank0

回答

0

找到了! 问题来自库名相似。 我编译“ncurses”库,但我搜索库名称是“ncursesw”! 非常相似...但他们不是。