cannot run test program while cross compiling问题

今天从服务器pull了一个份代码,当编译到/lftp-4.3.6报错

checking whether posix_fallocate() works...

cannot run test program while cross compiling

在网上搜了一下,在CONFIGURE中有很多的测试程序是不可以在HOST上运行的就会出现这个错误,所以在configue中找到“ posix_fallocate()”这个输出的位置,比较了一下能编译通过的版本,将这段注释掉就OK了,

重新编译工程出现如下错误:

make[2]: Entering directory `/home/yangz/6856/source/user/lftp-4.3.6'

make[2]: *** 没有规则可以创建目标“romfs”。 停止。

make[2]: Leaving directory `/home/yangz/6856/source/user/lftp-4.3.6'


再比较makefile,添加如下一段后OK

romfs:

$(ROMFSINST) src/lftp /bin/fsync

对于我这种菜鸟有一份能编译过的工程做比较太重要了

参考:http://tassardge.blog.163.com/blog/static/1723017082010111554018645/

http://blog.csdn.net/lzx_322/article/details/15693109

http://blog.chinaunix.net/uid-14735472-id-4021786.html


你可能感兴趣的:(cannot run test program while cross compiling问题)