Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4137009
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Android平台

2017-02-22 11:11:35

使用gcc5.3编译libgpg-error-1.12出现
gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
{ , "GPG_ERR_E2BIG" },

gcc 4.8.3 编译没有问题
使用下面补丁
libgpg.diff
--- a/src/Makefile.am	2015-09-12 20:15:03.707121022 +0300
+++ b/src/Makefile.am	2015-09-12 20:03:05.000000000 +0300
@@ -140,7 +140,7 @@
 # It is correct to use $(CPP).  We want the host's idea of the error codes.
 mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
 	$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
-	$(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
+	$(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
                $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
 	-rm _$@
 
--- a/src/Makefile.in	2015-09-12 20:15:16.858120992 +0300
+++ b/src/Makefile.in	2015-09-12 20:11:52.000000000 +0300
@@ -979,7 +979,7 @@
 # It is correct to use $(CPP).  We want the host's idea of the error codes.
 mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
 	$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
-	$(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
+	$(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
                $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
 	-rm _$@



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