* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
@ 2022-08-22 20:46 Glenn Morris
2022-08-23 0:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2022-08-22 20:46 UTC (permalink / raw)
To: 57346
Package: emacs
Version: 29.0.50
OS X Clang build failing for three weeks. Ref:
https://hydra.nixos.org/build/186116177
https://hydra.nixos.org/build/188132926
xterm.c:6659:3: warning: implicit declaration of function
'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime (CLOCK_MONOTONIC, &time);
^
xterm.c:6659:18: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime (CLOCK_MONOTONIC, &time);
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-22 20:46 bug#57346: undeclared identifier 'CLOCK_MONOTONIC' Glenn Morris
@ 2022-08-23 0:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 2:39 ` Eli Zaretskii
2022-08-23 6:43 ` Gerd Möllmann
0 siblings, 2 replies; 14+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-23 0:48 UTC (permalink / raw)
To: Glenn Morris; +Cc: 57346
Glenn Morris <rgm@gnu.org> writes:
> Package: emacs
> Version: 29.0.50
>
> OS X Clang build failing for three weeks. Ref:
> https://hydra.nixos.org/build/186116177
> https://hydra.nixos.org/build/188132926
>
> xterm.c:6659:3: warning: implicit declaration of function
> 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
> clock_gettime (CLOCK_MONOTONIC, &time);
> ^
> xterm.c:6659:18: error: use of undeclared identifier 'CLOCK_MONOTONIC'
> clock_gettime (CLOCK_MONOTONIC, &time);
Right, the internet says OS X doesn't have clock_gettime.
Does gnulib provide it? Failing that, I'd rather just make vsync
conditional on clock_gettime being available, since the mechanism it
uses cannot possibly work on OS X.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 0:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-23 2:39 ` Eli Zaretskii
2022-08-23 11:29 ` Gregory Heytings
2022-08-23 6:43 ` Gerd Möllmann
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2022-08-23 2:39 UTC (permalink / raw)
To: Po Lu; +Cc: rgm, 57346
> Cc: 57346@debbugs.gnu.org
> Date: Tue, 23 Aug 2022 08:48:29 +0800
> From: Po Lu via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Right, the internet says OS X doesn't have clock_gettime.
>
> Does gnulib provide it?
Not AFAICT.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 0:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 2:39 ` Eli Zaretskii
@ 2022-08-23 6:43 ` Gerd Möllmann
2022-08-23 7:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 14+ messages in thread
From: Gerd Möllmann @ 2022-08-23 6:43 UTC (permalink / raw)
To: Po Lu; +Cc: Glenn Morris, 57346
Po Lu <luangruo@yahoo.com> writes:
>
> Glenn Morris <rgm@gnu.org> writes:
>
>> Package: emacs
>> Version: 29.0.50
>>
>> OS X Clang build failing for three weeks. Ref:
>> https://hydra.nixos.org/build/186116177
>> https://hydra.nixos.org/build/188132926
>>
>> xterm.c:6659:3: warning: implicit declaration of function
>> 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
>> clock_gettime (CLOCK_MONOTONIC, &time);
>> ^
>> xterm.c:6659:18: error: use of undeclared identifier 'CLOCK_MONOTONIC'
>> clock_gettime (CLOCK_MONOTONIC, &time);
>
> Right, the internet says OS X doesn't have clock_gettime.
I don't know what version Glenn is building (it just says x86_74-darwin,
AFAICT), so maybe this is not useful, so just in case...
On my system it says for 'man clock_gettime'
DESCRIPTION
...
CLOCK_MONOTONIC clock that increments monotonically, tracking the time since an arbitrary point, and will
continue to increment while the system is asleep.
...
HISTORY
These functions first appeared in Mac OSX 10.12
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 6:43 ` Gerd Möllmann
@ 2022-08-23 7:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 7:24 ` Gerd Möllmann
2022-08-23 10:57 ` Lars Ingebrigtsen
0 siblings, 2 replies; 14+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-23 7:12 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: Glenn Morris, 57346
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> I don't know what version Glenn is building (it just says x86_74-darwin,
> AFAICT), so maybe this is not useful, so just in case...
>
> On my system it says for 'man clock_gettime'
>
> DESCRIPTION
> ...
> CLOCK_MONOTONIC clock that increments monotonically, tracking the time since an arbitrary point, and will
> continue to increment while the system is asleep.
> ...
> HISTORY
> These functions first appeared in Mac OSX 10.12
So I guess OS X 10.12 is relatively new, and the information I saw is
out of date. We support much older versions anyway, so if nobody has
any better ideas I will make the vsync support conditional on
clock_gettime.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 7:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-23 7:24 ` Gerd Möllmann
2022-08-23 10:57 ` Lars Ingebrigtsen
1 sibling, 0 replies; 14+ messages in thread
From: Gerd Möllmann @ 2022-08-23 7:24 UTC (permalink / raw)
To: Po Lu; +Cc: Glenn Morris, 57346
Po Lu <luangruo@yahoo.com> writes:
> So I guess OS X 10.12 is relatively new, and the information I saw is
> out of date. We support much older versions anyway
FWIW, 10.12 was released 2016, and doesn't get security updates since
November 30, 2019. Not really advisable to use something like this.
Just saying...
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 7:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 7:24 ` Gerd Möllmann
@ 2022-08-23 10:57 ` Lars Ingebrigtsen
2022-08-23 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 13:23 ` Gregory Heytings
1 sibling, 2 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-23 10:57 UTC (permalink / raw)
To: Po Lu; +Cc: Gerd Möllmann, Glenn Morris, 57346
Po Lu <luangruo@yahoo.com> writes:
> So I guess OS X 10.12 is relatively new, and the information I saw is
> out of date. We support much older versions anyway, so if nobody has
> any better ideas I will make the vsync support conditional on
> clock_gettime.
Sounds good. But I wonder what the OS X version nixos is using, anyway?
I had a look at the log file, and it says:
Configured for 'x86_64-apple-darwin17.7.0'.
But I don't know what that is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 2:39 ` Eli Zaretskii
@ 2022-08-23 11:29 ` Gregory Heytings
2022-08-23 12:25 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 14+ messages in thread
From: Gregory Heytings @ 2022-08-23 11:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Po Lu, rgm, 57346
>> Right, the internet says OS X doesn't have clock_gettime.
>>
>> Does gnulib provide it?
>
> Not AFAICT.
>
It should be easy to emulate it with what Mac OS X/macOS provides,
however:
int
clock_gettime (clockid_t ignored /* assuming CLOCK_MONOTONIC */,
struct timespec *tp)
{
clock_serv_t cs;
mach_timespec_t mts;
kern_return_t ret;
host_get_clock_service (mach_host_self (), SYSTEM_CLOCK, &cs);
ret = clock_get_time (cs, &mts);
mach_port_deallocate(mach_task_self (), cs);
if (ret) return ret;
tp->tv_sec = mts.tv_sec;
tp->tv_nsec = mts.tv_nsec;
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 11:29 ` Gregory Heytings
@ 2022-08-23 12:25 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 14+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-23 12:25 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rgm, Eli Zaretskii, 57346
Gregory Heytings <gregory@heytings.org> writes:
> It should be easy to emulate it with what Mac OS X/macOS provides,
> however:
In that case I'd rather remove the code entirely. vsync in the X port
can't work on Macintosh X servers anyway (or over a network connection),
and the use of CLOCK_MONOTONIC makes no sense, since the X sample server
will use its internal clock if clock_gettime is not available.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 10:57 ` Lars Ingebrigtsen
@ 2022-08-23 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 17:45 ` Lars Ingebrigtsen
2022-08-23 13:23 ` Gregory Heytings
1 sibling, 1 reply; 14+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-23 12:55 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Gerd Möllmann, Glenn Morris, 57346
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Po Lu <luangruo@yahoo.com> writes:
>
>> So I guess OS X 10.12 is relatively new, and the information I saw is
>> out of date. We support much older versions anyway, so if nobody has
>> any better ideas I will make the vsync support conditional on
>> clock_gettime.
>
> Sounds good. But I wonder what the OS X version nixos is using, anyway?
> I had a look at the log file, and it says:
Now done. Please let me know once problem is also resolved on the nixos
build bot, I will close this bug.
> Configured for 'x86_64-apple-darwin17.7.0'.
>
> But I don't know what that is.
Unfortunately I don't know either.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 10:57 ` Lars Ingebrigtsen
2022-08-23 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-23 13:23 ` Gregory Heytings
2022-08-23 15:03 ` Howard Melman
1 sibling, 1 reply; 14+ messages in thread
From: Gregory Heytings @ 2022-08-23 13:23 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Po Lu, Gerd Möllmann, 57346, Glenn Morris
>
> Configured for 'x86_64-apple-darwin17.7.0'.
>
> But I don't know what that is.
>
See https://github.com/apple/darwin-xnu.
Darwin is the roughly speaking the kernel of all Apple operating systems
(macOS, iOS, ...). More precisely, XNU is the kernel of Darwin, and
Darwin is the core operating system on which Apple operating systems are
based. Darwin 17.7.0 is the basis of macOS 10.13.6.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 13:23 ` Gregory Heytings
@ 2022-08-23 15:03 ` Howard Melman
0 siblings, 0 replies; 14+ messages in thread
From: Howard Melman @ 2022-08-23 15:03 UTC (permalink / raw)
To: 57346
Gregory Heytings <gregory@heytings.org> writes:
>> Configured for 'x86_64-apple-darwin17.7.0'.
>>
>> But I don't know what that is.
>>
>
> See https://github.com/apple/darwin-xnu.
>
> Darwin is the roughly speaking the kernel of all Apple operating
> systems (macOS, iOS, ...). More precisely, XNU is the kernel of
> Darwin, and Darwin is the core operating system on which Apple
> operating systems are based. Darwin 17.7.0 is the basis of macOS
> 10.13.6.
Nice mapping of versions here:
https://en.wikipedia.org/wiki/Darwin_(operating_system)#Darwin_16_%E2%80%93_19;_OS_X_rebranded_into_macOS
--
Howard
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-23 17:45 ` Lars Ingebrigtsen
2022-09-04 11:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-23 17:45 UTC (permalink / raw)
To: Po Lu; +Cc: Gerd Möllmann, Glenn Morris, 57346
Po Lu <luangruo@yahoo.com> writes:
> Now done. Please let me know once problem is also resolved on the nixos
> build bot, I will close this bug.
Hm... looks like that job is failing, but due to an internal Hydra
error?
[31;1merror:[0m cannot connect to ‘[35;1mroot@e461fe17.packethost.net[0m’: [35;1mroot@e461fe17.packethost.net: Permission denied (publickey).[
https://hydra.nixos.org/eval/1777547
Perhaps they'll have Hydra tomorrow so that we can see whether your fix
did the trick. :-/
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#57346: undeclared identifier 'CLOCK_MONOTONIC'
2022-08-23 17:45 ` Lars Ingebrigtsen
@ 2022-09-04 11:52 ` Lars Ingebrigtsen
0 siblings, 0 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-04 11:52 UTC (permalink / raw)
To: Po Lu; +Cc: Gerd Möllmann, Glenn Morris, 57346
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Hm... looks like that job is failing, but due to an internal Hydra
> error?
And hydra hasn't been running these tests for a week now, so it sounds
like it's semi-permanently wedged. So I'm closing this bug report. If
the problem still exists, please respond to the debbugs address and
we'll reopen.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-09-04 11:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 20:46 bug#57346: undeclared identifier 'CLOCK_MONOTONIC' Glenn Morris
2022-08-23 0:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 2:39 ` Eli Zaretskii
2022-08-23 11:29 ` Gregory Heytings
2022-08-23 12:25 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 6:43 ` Gerd Möllmann
2022-08-23 7:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 7:24 ` Gerd Möllmann
2022-08-23 10:57 ` Lars Ingebrigtsen
2022-08-23 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 17:45 ` Lars Ingebrigtsen
2022-09-04 11:52 ` Lars Ingebrigtsen
2022-08-23 13:23 ` Gregory Heytings
2022-08-23 15:03 ` Howard Melman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.