姚承明 发表于 2010-6-10 15:03:39

iptunnel.o Error

In file included from /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/if_tunnel.h:5,
               from /opt/EmbedSky/BusyBox-1.2.0/networking/libiproute/iptunnel.c:32:
/opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'
make: *** Error 1
make: *** Error 2

│ [ ]   ip tunnel      
结果还是一样的~~咋回事呢?谢谢大家帮帮忙

亚瑟王 发表于 2010-6-10 17:49:06

屏蔽掉busybox中的iptunnel选项,然后重新编译即可。

woai2008 发表于 2010-6-10 19:42:20

那个IPtunnel 不编译就行了

yeqishi 发表于 2010-6-30 09:15:15

struct iphdr有两个地方有定义
一个是/opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h
一个是/opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netinet
将ip.h中的iphdr名字改掉也可以编译通过

亚瑟王 发表于 2010-6-30 21:08:50

呵呵,终于有人找到了最终的解答了。
错误提示信息:
In file included from /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/if_tunnel.h:5,
               from /opt/EmbedSky/BusyBox-1.2.0/networking/libiproute/iptunnel.c:32:
/opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'
make: *** Error 1
make: *** Error 2

这句话讲了:In file included from /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/if_tunnel.h:5,在头文件if_tunnel.h第五行调用了ip.h这个头文件;
下面这句话:
/opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'在头文件ip.h的85行又redefinition(翻译成中文是:重复定义)了结构体 iphdr。
iphdr结构在另外一个头文件中定义了:arm-none-linux-gnueabi/libc/usr/include/netinet/ip.h的45行。而这个头文件正好现在iptunnel.c文件的17行调用了。linux/if_tunnel.h头文件在24行调用的。

最合理的解决方法:修改busybox的源码:把busybox-1.13.0\networking\libiproute\iptunnel.c文件的24行屏蔽掉就行了。

luolovecici 发表于 2010-8-20 11:20:37

/*#include <linux/if_tunnel.h>*/把这行屏蔽就又出现新的错误了
networking/libiproute/iptunnel.c:438: warning: unused variable 'p1'
networking/libiproute/iptunnel.c: In function 'do_show':
networking/libiproute/iptunnel.c:492: error: storage size of 'p' isn't known
networking/libiproute/iptunnel.c:494: error: 'SIOCGETTUNNEL' undeclared (first use in this function)
networking/libiproute/iptunnel.c:492: warning: unused variable 'p'
networking/libiproute/iptunnel.c: In function 'do_iptunnel':
networking/libiproute/iptunnel.c:532: error: 'SIOCADDTUNNEL' undeclared (first use in this function)
networking/libiproute/iptunnel.c:534: error: 'SIOCCHGTUNNEL' undeclared (first use in this function)
make: *** 错误 1
make: *** 错误 2
楼上这样好像不行哦!!!

wuchguang 发表于 2010-8-31 23:58:01

还是把networking utilites   ->ip tunnel 屏蔽

realmaverick 发表于 2010-10-20 19:18:31

6# luolovecici

hello,how did the error fixed finally? I got the same problem with you,thanks!

天嵌_support1 发表于 2010-10-21 12:07:34

8# realmaverick


Cancel this item bellow when you make menu configuration.


Networking Utilities ---->
         [*] ip tunnel

kp03 发表于 2011-4-12 15:30:15

大家好,networking utilites   ->ip tunnel 屏蔽不了阿
我按 了“N”屏幕闪以下 ,但没有屏蔽阿
怎么操作才可以 屏蔽呢?

shufexiu 发表于 2011-4-13 10:27:52

利用空格键来选择或者取消

天嵌_support1 发表于 2011-4-13 10:37:07

楼上正解

piglet135 发表于 2011-4-13 11:35:22

10# kp03

找到ip tunnel项,用空格选择,将[*]变成[ ],然后退出保存,记得保存!

chchao 发表于 2011-8-17 19:11:57

用空格键也不能取消ip tunnel项,请问下这该怎么办啊?

chchao 发表于 2011-8-22 10:40:54

我最近才知道那是什么原因,是那个系统的gcc编译器出现问题,我用ubuntu的系统换成了redhat系统在安装下gcc就好了。这个问题可让我足足头痛了好久。
页: [1] 2
查看完整版本: iptunnel.o Error