首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > Wireless >

关于交叉编译的有关问题

2012-09-27 
关于交叉编译的问题我在移植iproute2,下载的源码包在linux下可以直接make通过,但是我修改了Makefile的CCm

关于交叉编译的问题
我在移植iproute2,下载的源码包在linux下可以直接make通过,但是我修改了Makefile的CC=mips-linux-gcc后编译不通过
由于我的错误时保存的截图,但是csdn不能上传本地图片,在网上找到了类似的错误,请大侠帮忙看看是怎么回事
下面的错误的连接是http://comments.gmane.org/gmane.comp.embedded.openwrt.devel/13801
但是他的错误时uclibc的版本问题,不知道我的问题是哪儿?
对了 原来的旧的iproute2是2.24的现在移植的是iproute2-3.5.0的,内核都是在linux2.6.21x
ipnetns.o: In function `netns_exec':
ipnetns.c:(.text+0xfc): undefined reference to `unshare'
ipnetns.o: In function `netns_add':
ipnetns.c:(.text+0x54c): undefined reference to `unshare'
collect2: ld returned 1 exit status
make[5]: *** [ip] Error 1
make[5]: Leaving directory `/home/jhenderson/Downloads/openwrt/build_dir/
target-mips_r2_uClibc-0.9.32/iproute2-3.2.0/ip'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/jhenderson/Downloads/openwrt/build_dir/
target-mips_r2_uClibc-0.9.32/iproute2-3.2.0'
make[3]: *** [/home/jhenderson/Downloads/openwrt/build_dir/target-
mips_r2_uClibc-0.9.32/iproute2-3.2.0/.built] Error 2
make[3]: Leaving directory `/home/jhenderson/Downloads/openwrt/package/
iproute2'
make[2]: *** [package/iproute2/compile] Error 2
make[2]: Leaving directory `/home/jhenderson/Downloads/openwrt'
make[1]: *** [/home/jhenderson/Downloads/openwrt/staging_dir/target-
mips_r2_uClibc-0.9.32/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/jhenderson/Downloads/openwrt'
make: *** [world] Error 2

[解决办法]
ipnetns.c:5:25: sys/inotify.h: No such file or directory

头文件目录不对或没有指定。

1、你的inotify.h会不会是自带的头文件?
2、查看你系统上的inotify.h路径,
3、在Makefile某个地方用-I指定inotify.h所在目录。

热点排行