编译错误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