Open p5pRT opened 8 years ago
Time::HiRes contains code to emulate clock_gettime on Darwin\, which historically has not included that function. Most of this is guarded by #ifdefs which check for both Darwin and the absense of clock_gettime. However\, the latter isn't applied consistently\, resulting in build errors on Darwin versions which include a native clock_gettime.
The attached patch fixes this by adjusting one #ifdef.
On Fri Jun 17 13:22:07 2016\, mistydemeo@gmail.com wrote:
This is a bug report for perl from mistydemeo@gmail.com\, generated with the help of perlbug 1.40 running under perl 5.24.0.
----------------------------------------------------------------- [Please describe your issue here]
Time::HiRes contains code to emulate clock_gettime on Darwin\, which historically has not included that function. Most of this is guarded by #ifdefs which check for both Darwin and the absense of clock_gettime. However\, the latter isn't applied consistently\, resulting in build errors on Darwin versions which include a native clock_gettime.
The attached patch fixes this by adjusting one #ifdef.
It's not clear to me what source code you have drawn your patch against.
When I ack or grep the Perl 5 core distribution\, I find no directory named 'rts'. Nor do I find the string 'darwin_HOST_OS' in any source code.
##### $ ack '\brts\b' MANIFEST [no output]
$ find . -type d -name '*rts*' ./cpan/Devel-PPPort/parts
$ ack darwin_HOST_OS . [no output] #####
Can you clarify?
Thank you very much.
-- James E Keenan (jkeenan@cpan.org)
The RT System itself - Status changed from 'new' to 'open'
Am 18.06.2016 um 14:06 schrieb James E Keenan via RT:
On Fri Jun 17 13:22:07 2016\, mistydemeo@gmail.com wrote:
This is a bug report for perl from mistydemeo@gmail.com\, generated with the help of perlbug 1.40 running under perl 5.24.0.
----------------------------------------------------------------- [Please describe your issue here]
Time::HiRes contains code to emulate clock_gettime on Darwin\, which historically has not included that function. Most of this is guarded by #ifdefs which check for both Darwin and the absense of clock_gettime. However\, the latter isn't applied consistently\, resulting in build errors on Darwin versions which include a native clock_gettime.
The attached patch fixes this by adjusting one #ifdef.
It's not clear to me what source code you have drawn your patch against.
When I ack or grep the Perl 5 core distribution\, I find no directory named 'rts'. Nor do I find the string 'darwin_HOST_OS' in any source code.
##### $ ack '\brts\b' MANIFEST [no output]
$ find . -type d -name '*rts*' ./cpan/Devel-PPPort/parts
$ ack darwin_HOST_OS . [no output] #####
Can you clarify?
Wow\, this is pretty amazing. I have no idea how this happened\, but the patch seems to be against https://github.com/ghc/ghc/blob/master/rts/posix/GetTime.c, which is the runtime system of ghc (the Glasgow Haskell Compiler).
-- Lukas Mai \plokinom@​gmail\.com
On Sat Jun 18 09:58:28 2016\, plokinom@gmail.com wrote:
Wow\, this is pretty amazing. I have no idea how this happened\, but the patch seems to be against https://github.com/ghc/ghc/blob/master/rts/posix/GetTime.c, which is the runtime system of ghc (the Glasgow Haskell Compiler).
Forwarding a message from the original reporter:
| GHC has an almost identical bug\, and when reporting the bug to perl\, I | inadvertently attached the GHC patch instead of the perl patch. I've | attached the correct patch to this email.
Apologies\, it appears I attached the incorrect patch. The correct patch is attached.
Hi\, Lukas\,
Apologies for the incorrect patch. GHC had nearly the same bug\, and I inadvertantly attached the incorrect patch. I attempted to reply earlier with the correct patch\, but the tracker has been dropping my messages.
On Sat\, Jun 18\, 2016 at 9:58 AM\, Lukas Mai via RT \perlbug\-followup@​perl\.org wrote:
Am 18.06.2016 um 14:06 schrieb James E Keenan via RT:
On Fri Jun 17 13:22:07 2016\, mistydemeo@gmail.com wrote:
This is a bug report for perl from mistydemeo@gmail.com\, generated with the help of perlbug 1.40 running under perl 5.24.0.
----------------------------------------------------------------- [Please describe your issue here]
Time::HiRes contains code to emulate clock_gettime on Darwin\, which historically has not included that function. Most of this is guarded by #ifdefs which check for both Darwin and the absense of clock_gettime. However\, the latter isn't applied consistently\, resulting in build errors on Darwin versions which include a native clock_gettime.
The attached patch fixes this by adjusting one #ifdef.
It's not clear to me what source code you have drawn your patch against.
When I ack or grep the Perl 5 core distribution\, I find no directory named 'rts'. Nor do I find the string 'darwin_HOST_OS' in any source code.
##### $ ack '\brts\b' MANIFEST [no output]
$ find . -type d -name '*rts*' ./cpan/Devel-PPPort/parts
$ ack darwin_HOST_OS . [no output] #####
Can you clarify?
Wow\, this is pretty amazing. I have no idea how this happened\, but the patch seems to be against https://github.com/ghc/ghc/blob/master/rts/posix/GetTime.c, which is the runtime system of ghc (the Glasgow Haskell Compiler).
-- Lukas Mai \plokinom@​gmail\.com
On Fri\, Jun 17\, 2016 at 01:24:43PM -0700\, Misty De Meo wrote:
Apologies\, it appears I attached the incorrect patch. The correct patch is attached.
Thanks\, applied as
2d41a263c0e09e6dfabecd28212d7e80b42dc3e6
and I've added you to AUTHORS with
ba3530a211029e1fe07e19b385b9f7c17af92ac5
-- "Foul and greedy Dwarf - you have eaten the last candle." -- "Hordes of the Things"\, BBC Radio.
On Mon Jun 20 00:36:34 2016\, davem wrote:
On Fri\, Jun 17\, 2016 at 01:24:43PM -0700\, Misty De Meo wrote:
Apologies\, it appears I attached the incorrect patch. The correct patch is attached.
Thanks\, applied as
2d41a263c0e09e6dfabecd28212d7e80b42dc3e6
This change unfortunately didn't quite work.
In OS X 10.11.5 (at least\, but got also failure reports from other versions)\, the change meant that the mutex init was skipped\, which meant that the further mutex use panicked (correctly) if the Perl was built with threads. So what exactly was the intent of the change?
You said "resulting in build errors on Darwin versions which include a native clock_gettime"? What are these platforms? Non-Apple Darwin builds? That is fine\, but the change needs to be something different.
and I've added you to AUTHORS with
ba3530a211029e1fe07e19b385b9f7c17af92ac5
On Wed Jun 22 04:37:18 2016\, jhi wrote:
On Mon Jun 20 00:36:34 2016\, davem wrote:
On Fri\, Jun 17\, 2016 at 01:24:43PM -0700\, Misty De Meo wrote:
Apologies\, it appears I attached the incorrect patch. The correct patch is attached.
Thanks\, applied as
2d41a263c0e09e6dfabecd28212d7e80b42dc3e6
This change unfortunately didn't quite work.
In OS X 10.11.5 (at least\, but got also failure reports from other versions)\, the change meant that the mutex init was skipped\, which meant that the further mutex use panicked (correctly) if the Perl was built with threads. So what exactly was the intent of the change?
You said "resulting in build errors on Darwin versions which include a native clock_gettime"? What are these platforms? Non-Apple Darwin builds? That is fine\, but the change needs to be something different.
Ah\, I see it now. The test !defined(CLOCK_REALTIME) is not valid anymore later in the file because the Darwin emulation defines it. I'll fix this.
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan-upstream?). Jarkko\, have you had a chance to look into the issues you identified?
-- Dan Collins
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan-upstream?). Jarkko\, have you had a chance to look into the issues you identified?
-- Dan Collins
On Tue Sep 06 10:48:17 2016\, dcollinsn@gmail.com wrote:
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan-upstream?). Jarkko\, have you had a chance to look into the issues you identified?
The latest versions of T-H should be all good in all known versions of OS X. Sierra\, whatever. If they are not\, new bug reports should be filed. As far as I know\, this one can be closed.
-- Dan Collins
On Wed Sep 07 18:31:46 2016\, jhi wrote:
On Tue Sep 06 10:48:17 2016\, dcollinsn@gmail.com wrote:
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan-upstream?). Jarkko\, have you had a chance to look into the issues you identified?
The latest versions of T-H should be all good in all known versions of OS X. Sierra\, whatever. If they are not\, new bug reports should be filed. As far as I know\, this one can be closed.
The issue is more building 5.24 on Sierra\, is there a minimal fix for the build issue which can be backported to 5.24?
Tony
On Thu\, 08 Sep 2016 01:58:19 GMT\, tonyc wrote:
On Wed Sep 07 18:31:46 2016\, jhi wrote:
On Tue Sep 06 10:48:17 2016\, dcollinsn@gmail.com wrote:
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan- upstream?). Jarkko\, have you had a chance to look into the issues you identified?
The latest versions of T-H should be all good in all known versions of OS X. Sierra\, whatever. If they are not\, new bug reports should be filed. As far as I know\, this one can be closed.
The issue is more building 5.24 on Sierra\, is there a minimal fix for the build issue which can be backported to 5.24?
Tony
MoarVM also faced this problem: https://github.com/MoarVM/MoarVM/commit/20c8591ad7644926e09691da8c2a9179b11ac53e
-- James E Keenan (jkeenan@cpan.org)
The issue is more building 5.24 on Sierra\, is there a minimal fix for the build issue which can be backported to 5.24?
Tony
Hi\, this is what we did for Perl 6: https://github.com/MoarVM/MoarVM/commit/20c8591ad7644926e09691da8c2a9179b11ac53e
I hope that helps a little.
On Thu\, 08 Sep 2016 01:58:19 GMT\, tonyc wrote:
On Wed Sep 07 18:31:46 2016\, jhi wrote:
On Tue Sep 06 10:48:17 2016\, dcollinsn@gmail.com wrote:
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan- upstream?). Jarkko\, have you had a chance to look into the issues you identified?
The latest versions of T-H should be all good in all known versions of OS X. Sierra\, whatever. If they are not\, new bug reports should be filed. As far as I know\, this one can be closed.
The issue is more building 5.24 on Sierra\, is there a minimal fix for the build issue which can be backported to 5.24?
Tony
Tony\, Jarkko\, Dan: Can you advise where we stand on this ticket?
Thank you very much.
-- James E Keenan (jkeenan@cpan.org)
On Thu\, Dec 29\, 2016 at 8:00 AM\, James E Keenan via RT \perlbug\-followup@​perl\.org wrote:
On Thu\, 08 Sep 2016 01:58:19 GMT\, tonyc wrote:
On Wed Sep 07 18:31:46 2016\, jhi wrote:
On Tue Sep 06 10:48:17 2016\, dcollinsn@gmail.com wrote:
The code in question has been modified in more recent versions of Time-HiRes\, for example\, to use PERL_DARWIN_MUTEX. Are these changes sufficient? http://perl5.git.perl.org/perl.git/commitdiff/c4a535af41823cc84534bf8dbecfdcc3eb7daa86
If not\, the patch from Misty may have been overwritten when the new version of Time-HiRes was brought into blead (is it cpan- upstream?). Jarkko\, have you had a chance to look into the issues you identified?
The latest versions of T-H should be all good in all known versions of OS X. Sierra\, whatever. If they are not\, new bug reports should be filed. As far as I know\, this one can be closed.
The issue is more building 5.24 on Sierra\, is there a minimal fix for the build issue which can be backported to 5.24?
Tony
Tony\, Jarkko\, Dan: Can you advise where we stand on this ticket?
Thank you very much.
-- James E Keenan (jkeenan@cpan.org)
As of v5.24.1-RC4-13-gb7d278c\, there is one remaining test failure:
$ ../../perl -I../../lib t/clock.t 1..5 # I am the main process 19721\, starting the watchdog process... # The watchdog process 19722 launched\, continuing testing... # I am the watchdog process 19722\, sleeping for 360 seconds... ok 1 - require Time::HiRes; # have_clock_gettime = 1 # have_clock_getres = 1 # have_clock_nanosleep = 1 # have_clock = 1 # CLOCK_REALTIME: try = 1 # t1 = 1483046030.35294\, t0 = 1483046028.84275 # dt = 1.51018714904785\, rt = 0.00679143269856763 ok 2 ok 3 Time::HiRes::clock_nanosleep(): unimplemented in this platform at t/clock.t line 74. # I am the main process 19721\, terminating the watchdog process 19722 before it terminates me in 358 seconds (testing took 2 seconds). # kill KILL 19722 = 1 # All done. # Looks like you planned 5 tests but ran 3. # Looks like your test exited with 60 just after 3.
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
As far as I can see the only new feature is the addition of a high-resolution utime(). All other changes are bug fixes\, most of them darwin-related. Disentangling which bug fixes are strictly necessary might be riskier (and certainly more work) than just taking the whole thing. All of the relevant changes have been in blead for a couple of months\, meaning we'd probably know about it by now if they were problematic.
At least this is an alternative to leaving the test failure as-is. I think the only other alternative would be for someone to trawl through all the changes and produce a more minimal patch.
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..?
-- Matthew Horsfall (alh)
On Fri\, Jul 21\, 2017 at 2:12 PM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..?
5.24.2 was limited to the base.pm fixes. So yes\, this will not be fixed unless it gets into the next maint-5.24 release. I have voted for my own patch:
\https://perl5.git.perl.org/perl.git/commitdiff/63784e26bef8426a67e8780734da0d0e7a9d052b
It needs one more vote. Perhaps the only wrinkle now is whether it should get 1.9742 rather than 1.9741.
On Jul 21\, 2017\, at 7:47 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
On Fri\, Jul 21\, 2017 at 2:12 PM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..?
5.24.2 was limited to the base.pm fixes. So yes\, this will not be fixed unless it gets into the next maint-5.24 release. I have voted for my own patch:
\https://perl5.git.perl.org/perl.git/commitdiff/63784e26bef8426a67e8780734da0d0e7a9d052b
It needs one more vote. Perhaps the only wrinkle now is whether it should get 1.9742 rather than 1.9741.
+1 from me\, thanks.
-- Matthew Horsfall (alh)
On 07/22/2017 01:57 AM\, wolfsage@gmail.com wrote:
On Jul 21\, 2017\, at 7:47 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
On Fri\, Jul 21\, 2017 at 2:12 PM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..? 5.24.2 was limited to the base.pm fixes. So yes\, this will not be fixed unless it gets into the next maint-5.24 release. I have voted for my own patch:
\https://perl5.git.perl.org/perl.git/commitdiff/63784e26bef8426a67e8780734da0d0e7a9d052b
It needs one more vote. Perhaps the only wrinkle now is whether it should get 1.9742 rather than 1.9741. +1 from me\, thanks.
From me as well. Reflected here: https://perl5.git.perl.org/perl.git/commitdiff/31e0d510bd365f1c040cd8bdcb00065ff67f02d5.
On 23 July 2017 at 19:42\, Sawyer X \xsawyerx@​gmail\.com wrote:
On 07/22/2017 01:57 AM\, wolfsage@gmail.com wrote:
On Jul 21\, 2017\, at 7:47 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
On Fri\, Jul 21\, 2017 at 2:12 PM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..? 5.24.2 was limited to the base.pm fixes. So yes\, this will not be fixed unless it gets into the next maint-5.24 release. I have voted for my own patch:
\https://perl5.git.perl.org/perl.git/commitdiff/63784e26bef8426a67e8780734da0d0e7a9d052b
It needs one more vote. Perhaps the only wrinkle now is whether it should get 1.9742 rather than 1.9741. +1 from me\, thanks.
From me as well. Reflected here: https://perl5.git.perl.org/perl.git/commitdiff/31e0d510bd365f1c040cd8bdcb00065ff67f02d5.
I'm happy to take Craig's patch to update to 1.9741 for 5.24.3. Are the extra changes in 1.9742 safe & worthwhile? It looks like 'yes' on both fronts to me\, but should I be concerned about the entirely red column ('gnu') here?: http://matrix.cpantesters.org/?dist=Time-HiRes+1.9742
On Mon\, 24 Jul 2017 13:17:04 -0700\, shay wrote:
On 23 July 2017 at 19:42\, Sawyer X \xsawyerx@​gmail\.com wrote:
On 07/22/2017 01:57 AM\, wolfsage@gmail.com wrote:
On Jul 21\, 2017\, at 7:47 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
On Fri\, Jul 21\, 2017 at 2:12 PM\, Matthew Horsfall (alh) \wolfsage@​gmail\.com wrote:
On Thu\, Dec 29\, 2016 at 6:07 PM\, Craig A. Berry \craig\.a\.berry@​gmail\.com wrote:
I've attached a patch that updates maint-5.24 to the current CPAN release of Tiime::HiRes and can confirm that this gets all tests passing on macOS Sierra.
ether said in #p5p that she was unable to build 5.24.2 because of this issue.
I checked and it does not appear that this (or any upgrade to Time::HiRes) made it into 5.24.2\, so people will have trouble installing it on this OS.
Do we need another point release for 5.24.* to fix this..? 5.24.2 was limited to the base.pm fixes. So yes\, this will not be fixed unless it gets into the next maint-5.24 release. I have voted for my own patch:
\https://perl5.git.perl.org/perl.git/commitdiff/63784e26bef8426a67e8780734da0d0e7a9d052b
It needs one more vote. Perhaps the only wrinkle now is whether it should get 1.9742 rather than 1.9741. +1 from me\, thanks.
From me as well. Reflected here: https://perl5.git.perl.org/perl.git/commitdiff/31e0d510bd365f1c040cd8bdcb00065ff67f02d5.
I'm happy to take Craig's patch to update to 1.9741 for 5.24.3. Are the extra changes in 1.9742 safe & worthwhile? It looks like 'yes' on both fronts to me\, but should I be concerned about the entirely red column ('gnu') here?: http://matrix.cpantesters.org/?dist=Time-HiRes+1.9742
I've now pulled 1.9741 into maint-5.24\, ready for perl-5.24.3. I didn't take 1.9742 (or 1.9744\, which has since arrived as well!) because maint-5.26 currently has 1.9741 and I didn't like the idea of an upgrade from perl-5.24 to perl-5.26 rolling back to an older Time-HiRes (and there is no pressing need to upgrade Time-HiRes in perl-5.26 as far as I know).
Migrated from rt.perl.org#128427 (status was 'open')
Searchable as RT128427$