Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2997949
  • 博文数量: 674
  • 博客积分: 17881
  • 博客等级: 上将
  • 技术积分: 4849
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 10:15
文章分类

全部博文(674)

文章存档

2013年(34)

2012年(146)

2011年(197)

2010年(297)

分类: LINUX

2011-12-23 17:14:15

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

阅读(2179) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~