官方于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
目前尚未查明报错的具体原因,建议生产环境慎用。