2016-06-28 235 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」! 非常相似...但他們不是。