Closed lyihu closed 2 weeks ago
My OS environment is CentOS 7
Can you please post the config.log file. For some reason PRI_tv_usec etc aren't being defined on CentOS 7.
Commit 706be31 resolves the issue you reported. keepalived also failed to compile on CentOS 7 since it does not support open file descriptor locks, so commit 7d2b85d stops file locking being used if open file descriptor locks are not supported.
Please note that keepalived does not support distros that have reached EOL, and so at some point it can only be expected that newer versions of keepalived will no longer build on CentOS.
utils.c: In function ‘ctime_us_r’: utils.c:1021:32: error: expected ‘)’ before ‘PRI_tv_usec’ snprintf(buf + 19, 8, ".%6.6" PRI_tv_usec, timep->tv_usec); ^ utils.c:1021:32: warning: conversion lacks type at end of format [-Wformat=] utils.c:1021:32: warning: conversion lacks type at end of format [-Wformat=] utils.c: In function ‘log_stopping’: utils.c:1392:61: error: 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: warning: spurious trailing ‘%’ in format [-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: error: 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: warning: spurious trailing ‘%’ in format [-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] Error 1 make[2]: Leaving directory `/root/keepalived-2.3.2/lib' make[1]: [all] Error 2 make[1]: Leaving directory `/root/keepalived-2.3.2/lib' make: *** [all-recursive] Error 1