【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

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

相关推荐
童安格粉丝3 天前
centos7使用haproxy+keepalived搭建负载均衡调度器--yum方式
运维·nginx·centos·负载均衡·keepalived·haproxy
酒醉的胡铁18 天前
keepalived 高可用离线配置
keepalived
LYK_HAHA21 天前
keepalived+lVS(dr)高可用集群
lvs·keepalived
pcj_8881 个月前
keepalived双机热备方案实现Nginx高可用
nginx·keepalived·ha
稻草人ZZ1 个月前
Keepalived部署
linux·服务器·网络·keepalived
lldhsds3 个月前
借助keepalived配置高可用nginx集群
nginx·keepalived·高可用
小亦小亦_空中接力3 个月前
openssl+keepalived安装部署
openssl·keepalived
童安格粉丝3 个月前
centos 7 防止及解决keepalive脑裂现象(主备均有vip)
运维·centos·问题·keepalived·vip·漂移·两台都有
小时候的阳光3 个月前
Docker方式部署ProxySQL和Keepalived组合实现MGR的高可用访问
mysql·docker·keepalived·mgr·proxysql