编译busybox的时候出现error: field 'in' has incomplete type
2014-01-12 20:35
447 查看
编译错误1:
applets/applets.c:15:2: warning: #warning Static linking against glibc
produces buggy executables
applets/applets.c:16:2: warning: #warning (glibc
does not cope well with ld –gc-sections).
applets/applets.c:17:2: warning:
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:18:2: warning: #warning Note that glibc is unsuitable for
static linking anyway.
applets/applets.c:19:2: warning: #warning If you
still want to do it, remove -Wl,–gc-sections
applets/applets.c:20:2:
warning: #warning from scripts/trylink and remove this warning.
applets/applets.c:21:2: error: #error Aborting compilation.
make[1]: ***
[applets/applets.o] Error 1
解决办法:
修改文件 applets/applets.c 第 21 行, 将
#error Aborting compilation.
注释掉:
/*#error Aborting compilation.*/
编译错误2:
warn_unused_result
CC init/mesg.o
AR init/lib.a
LD
ipsvd/built-in.o
CC ipsvd/ipsvd_perhost.o
CC
ipsvd/tcpudp.o
In file included from
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter_ipv4.h:8,
from
ipsvd/tcpudp.c:33:
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:55:
error: field ‘in’ has incomplete
type
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:56:
error: field ‘in6′ has incomplete type
ipsvd/tcpudp.c: In function
‘tcpudpsvd_main’:
ipsvd/tcpudp.c:314: warning: ignoring return value of
‘write’, declared with attribute warn_unused_result
make[1]: ***
[ipsvd/tcpudp.o] 错误 1
make: *** [ipsvd] 错误 2
解决办法:
arm-linux 交叉编译工具链
在 usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h 头文件的开头
添加缺少的头文件:
#include <netinet/in.h>
applets/applets.c:15:2: warning: #warning Static linking against glibc
produces buggy executables
applets/applets.c:16:2: warning: #warning (glibc
does not cope well with ld –gc-sections).
applets/applets.c:17:2: warning:
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:18:2: warning: #warning Note that glibc is unsuitable for
static linking anyway.
applets/applets.c:19:2: warning: #warning If you
still want to do it, remove -Wl,–gc-sections
applets/applets.c:20:2:
warning: #warning from scripts/trylink and remove this warning.
applets/applets.c:21:2: error: #error Aborting compilation.
make[1]: ***
[applets/applets.o] Error 1
解决办法:
修改文件 applets/applets.c 第 21 行, 将
#error Aborting compilation.
注释掉:
/*#error Aborting compilation.*/
编译错误2:
warn_unused_result
CC init/mesg.o
AR init/lib.a
LD
ipsvd/built-in.o
CC ipsvd/ipsvd_perhost.o
CC
ipsvd/tcpudp.o
In file included from
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter_ipv4.h:8,
from
ipsvd/tcpudp.c:33:
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:55:
error: field ‘in’ has incomplete
type
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:56:
error: field ‘in6′ has incomplete type
ipsvd/tcpudp.c: In function
‘tcpudpsvd_main’:
ipsvd/tcpudp.c:314: warning: ignoring return value of
‘write’, declared with attribute warn_unused_result
make[1]: ***
[ipsvd/tcpudp.o] 错误 1
make: *** [ipsvd] 错误 2
解决办法:
arm-linux 交叉编译工具链
在 usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h 头文件的开头
添加缺少的头文件:
#include <netinet/in.h>
相关文章推荐
- 编译busybox的时候出现error: field 'in' has incomplete type
- 程序编译是出现"field has incomplete type"问题的解决
- 前向定义导致 程序编译出现"field has incomplete type"问题的解决
- 程序编译是出现"field has incomplete type"问题的解决
- 程序编译是出现"field has incomplete type"问题的解决
- Qt程序编译是出现"field has incomplete type"问题的解决(转)
- gcc编译出现field 'xxx' has incomplete type的问题
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
- gcc编译出现:error: dereferencing pointer to incomplete type
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- gcc编译出现:error: dereferencing pointer to incomplete type
- error: field ‘?’ has incomplete type
- [C++编译]field has incomplete type
- 两个C++编译异常及解决方法-does not name a type和field `XX' has incomplete type
- Error 1 Inconsistent accessibility: parameter type C#编译时候出错
- Error : field has incomplete type
- error: field `list' has incomplete type的解决!:) [复制链接] 00
- Redhat编译php-5.2.9出现error dereferencing pointer to incomplete type
- 编译错误 --- does not name a type和field `XX' has incomplete type
- 编译代码时出现/usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"错