FRR编译错误

版本是2021年5月9号的主线版本分支,本来一直用的都不错,但是从昨天起编译出错:

oot@pml_v:/home/pml/frrouting/frr# make
git suffix: -g34723b2fa-dirty
git branches: local:master, github/FRRouting/frr.git/master
Files lib/gitversion.h.tmp and lib/gitversion.h are identical
make  all-am
make[1]: Entering directory '/home/pml/frrouting/frr'
  CC       bgpd/bgp_addpath.o
In file included from ./lib/zebra.h:28:0,
                 from bgpd/bgp_addpath.h:24,
                 from bgpd/bgp_addpath.c:24:
./lib/compiler.h:155:12: error: expected declaration specifiers or ‘...’ before string constant
 CPP_NOTICE("time to remove this CONFDATE block")
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./lib/compiler.h:361:0,
                 from ./lib/zebra.h:28,
                 from bgpd/bgp_addpath.h:24,
                 from bgpd/bgp_addpath.c:24:
/usr/include/inttypes.h:305:34: error: unknown type name ‘__gwchar_t’
 extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
                                  ^~~~~~~~~~
/usr/include/inttypes.h:306:7: error: unknown type name ‘__gwchar_t’; did you mean ‘__u_char’?
       __gwchar_t **__restrict __endptr, int __base)
       ^~~~~~~~~~
       __u_char
/usr/include/inttypes.h:310:35: error: unknown type name ‘__gwchar_t’
 extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
                                   ^~~~~~~~~~
/usr/include/inttypes.h:311:8: error: unknown type name ‘__gwchar_t’; did you mean ‘__u_char’?
        __gwchar_t ** __restrict __endptr, int __base)
        ^~~~~~~~~~
        __u_char
/usr/include/inttypes.h:342:42: error: unknown type name ‘__gwchar_t’
 extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
                                          ^~~~~~~~~~
/usr/include/inttypes.h:343:8: error: unknown type name ‘__gwchar_t’; did you mean ‘__u_char’?
        __gwchar_t **__restrict __endptr,
        ^~~~~~~~~~
        __u_char
In file included from /usr/include/features.h:424:0,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from

经查,发现是frr的lib/compiler.h中有段代码是临时性的代码,有一个日期限制,限制时间为2021年6月1号。

这里记录一下解决方案,原本怀疑是一些工具问题,后来发现不是,还是需要上预编译的大法,找到Makefile中具体的编译问题:【使用make --trace】看到详细信息,然后增加了生成预处理的语句,通过预处理文件对比查看。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值