[focal] pacemaker FTBFS because of deprecated ftime()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pacemaker (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
https:/
shows that pacemaker started to be FTBFS because of:
"""
gcc -DHAVE_CONFIG_H -I. -I../../include -DSUPPORT_REMOTE -I../../include -I../../include -I../../libltdl -I../../libltdl -DPCMK_
execd_commands.c: In function ‘stonith_
execd_commands.
257 | ftime(&
| ^~~~~
In file included from execd_commands.
/usr/include/
39 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
execd_commands.c: In function ‘schedule_
execd_commands.
389 | ftime(&
| ^~~~~
"""
And man page shows:
SYNOPSIS
#include <sys/timeb.h>
int ftime(struct timeb *tp);
DESCRIPTION
NOTE: This function is deprecated, and will be removed in a future version of the GNU C library. Use clock_gettime(2) instead.
I'll fix this together with other fixes, opening this bug to track the issue.
Changed in pacemaker (Ubuntu): | |
status: | New → Won't Fix |
status: | Won't Fix → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Changed in pacemaker (Ubuntu): | |
status: | Fix Committed → Fix Released |
commit 4b8b84cce1fd57e ec1f47ca44780d6 0c148b399d
Author: Jan Pokorný <email address hidden>
Date: Fri Nov 15 16:06:57 2019 +0100
Build: restore buildability in the face of obsolete ftime(3)
Since the usage of ftime(3) is purely optional and since gettime( 3) is mandated with POSIX 2001, we can simply
clock_
look at whether CLOCK_MONOTONIC is defined to be used as an
identifier for the particular clock (kind exactly suitable
for this context). But due to being late in the release cycle,
such a change is kept as opt-in (see configure.ac comment for
details), and for compatibility stability concerns[*], also
dropping some old surrounding cruft is delayed.
In this form, constitutes first step out of two to restore
out-of-the-box buildability with recent enough glibc, again,
refer to configure.ac comment.
References: /sourceware. org/git/ ?p=glibc. git;a=commit; h=2b5fea833bcd0 f651579afd16ed7 842770ecbae1 /src.fedoraproj ect.org/ rpms/glibc/ c/ebf75398f06dd 27357d8a5321e8e 5959633b8182? branch= master
https:/
https:/
(for a Fedora Rawhide follow-the-upstream update that led to this
discovery)
[*] in case you opt-in (as described), CLOCK_MONOTONIC gets detected
measurements altogher with something like:
in time.h positively but it starts choking for whatever reason in
the actual build or even in run-time, you can rescind that,
or you can shortcut any checking and refrain from any time period
env \
ac_ cv_header_ sys_timeb_ h=no
ac_ cv_have_ decl_CLOCK_ MONOTONIC= no \
./ configure