【Keepalived】Keepalived 2.3.2版本编译报错

官方于2024年11月3日发布了 Keepalived 2.3.2 正式版本,带来了一些提升,并修复了一些上报的细微问题。相关发布文档,详见:

https://keepalived.org/release-notes/Release-2.3.2.html

该版本在 CentOS 7.9 系统里面编译时出现报错,报错信息如下:

objectivec 复制代码
# ./configure --prefix=/usr/local/keepalived --sysconfdir=/etc/keepalived
。。。省略相关信息(此步骤无报错或者告警)。。。

# make
Making all in lib
make[1]: 进入目录"/usr/local/src/keepalived/lib"
make  all-am
make[2]: 进入目录"/usr/local/src/keepalived/lib"
  CC       memory.o
  CC       utils.o
utils.c: 在函数'ctime_us_r'中:
utils.c:1021:32: 错误:expected ')' before 'PRI_tv_usec'
  snprintf(buf + 19, 8, ".%6.6" PRI_tv_usec, timep->tv_usec);
                                ^
utils.c:1021:32: 警告:格式字符串末尾的转换缺少类型 [-Wformat=]
utils.c:1021:32: 警告:格式字符串末尾的转换缺少类型 [-Wformat=]
utils.c: 在函数'log_stopping'中:
utils.c:1392:61: 错误:expected ')' before 'PRI_tv_sec'
    log_message(LOG_INFO, "Stopped - used (self/children) %" PRI_tv_sec ".%6.6" PRI_tv_usec "/%" PRI_tv_sec ".%6.6" PRI_tv_usec " user time,"
                                                             ^
utils.c:1395:6: 警告:格式字符串尾有可疑的'%' [-Wformat=]
      usage.ru_stime.tv_sec, usage.ru_stime.tv_usec, child_usage.ru_stime.tv_sec, child_usage.ru_stime.tv_usec);
      ^
utils.c:1397:45: 错误:expected ')' before 'PRI_tv_sec'
    log_message(LOG_INFO, "Stopped - used %" PRI_tv_sec ".%6.6" PRI_tv_usec " user time, %" PRI_tv_sec ".%6.6" PRI_tv_usec " system time",
                                             ^
utils.c:1398:6: 警告:格式字符串尾有可疑的'%' [-Wformat=]
      usage.ru_utime.tv_sec, usage.ru_utime.tv_usec, usage.ru_stime.tv_sec, usage.ru_stime.tv_usec);
      ^
make[2]: *** [utils.o] 错误 1
make[2]: 离开目录"/usr/local/src/keepalived/lib"
make[1]: *** [all] 错误 2
make[1]: 离开目录"/usr/local/src/keepalived/lib"
make: *** [all-recursive] 错误 1

目前尚未查明报错的具体原因,建议生产环境慎用。

相关推荐
lldhsds1 个月前
借助keepalived配置高可用nginx集群
nginx·keepalived·高可用
小亦小亦_空中接力2 个月前
openssl+keepalived安装部署
openssl·keepalived
童安格粉丝2 个月前
centos 7 防止及解决keepalive脑裂现象(主备均有vip)
运维·centos·问题·keepalived·vip·漂移·两台都有
小时候的阳光2 个月前
Docker方式部署ProxySQL和Keepalived组合实现MGR的高可用访问
mysql·docker·keepalived·mgr·proxysql
小时候的阳光2 个月前
Docker部署tenine实现后端应用的高可用与负载均衡
docker·负载均衡·keepalived·高可用·tengine
王小虚3 个月前
LVS+Keepalived 双机热备
keepalived
田驰023 个月前
走进 keepalived:解析高可用架构背后的关键技术
运维·云原生·lvs·keepalived·haproxy
Renhongzhou3 个月前
高可用集群keepalived的应用以及部署
linux·运维·服务器·智能路由器·keepalived
西华彭于晏!3 个月前
扩展01:企业级Nginx+Keepalived双主架构实战
nginx·架构·负载均衡·keepalived