Skip Menu |

This queue is for tickets about the Time-HiRes CPAN distribution.

Report information
The Basics
Id: 124844
Status: open
Priority: 0/
Queue: Time-HiRes

People
Owner: Nobody in particular
Requestors: craig.a.berry [...] gmail.com
sinan [...] unur.com
steve.m.hay [...] googlemail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Perl5 Porters <perl5-porters [...] perl.org>
Subject: Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 07:26:46 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
Hello and thank you for your work, I tried to build Perl 5.27.10 on a 64 bit Windows 10 machine with Visual Studio 2017 with the provided Makefile, and the build failed because HiRes.xs failed to compile with the errors: HiRes.xs(1325): error C2079: 'Tz' uses undefined struct 'timezone' HiRes.xs(1344): error C2079: 'Tz' uses undefined struct 'timezone' HiRes.xs(1360): error C2079: 'Tz' uses undefined struct 'timezone' Changes mentions this: https://metacpan.org/changes/distribution/Time-HiRes#L3 1.9577 [2018-03-15] - fix win32 (and cygwin?) builds which have been broken since 1.9755: problem was that gettimeofday() is a macro and needs to stay such First, I believe the version number for this release in Changes is a typo. It should be 1.9757. It seems to me that this is a case of assuming gcc on Windows. See earlier reports: http://www.cpantesters.org/cpan/report/d099a63a-6cb1-1014-9853-f25910f5bab9 http://www.cpantesters.org/cpan/report/be353111-6c2a-1014-bdf0-8ac521104667 http://www.cpantesters.org/cpan/report/d099a63a-6cb1-1014-9853-f25910f5bab9 http://www.cpantesters.org/cpan/report/431b4d4b-6c26-1014-a8bb-9841a16ecb65 I am Cc'ing P5P on this because I believe 5.27.10 is the RC for 5.28. -- Sinan
On Wed Mar 21 07:26:57 2018, sinan@unur.com wrote: Show quoted text
> Hello and thank you for your work, > > I tried to build Perl 5.27.10 on a 64 bit Windows 10 machine with > Visual Studio 2017 with the provided Makefile, and the build failed > because HiRes.xs failed to compile with the errors: > > HiRes.xs(1325): error C2079: 'Tz' uses undefined struct 'timezone' > HiRes.xs(1344): error C2079: 'Tz' uses undefined struct 'timezone' > HiRes.xs(1360): error C2079: 'Tz' uses undefined struct 'timezone' > > Changes mentions this: > > https://metacpan.org/changes/distribution/Time-HiRes#L3 > > 1.9577 [2018-03-15] > - fix win32 (and cygwin?) builds which have been broken since 1.9755: > problem was that gettimeofday() is a macro and needs to stay such > > First, I believe the version number for this release in Changes is a > typo. It should be 1.9757.
Yes, that is a typo, thanks. Show quoted text
> It seems to me that this is a case of assuming gcc on Windows. See > earlier reports:
I do not have access to a Win32 box, with gcc or Visual C. So I need help fixing this. Show quoted text
Subject: Re: [rt.cpan.org #124844] Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 10:52:38 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
On Wed, Mar 21, 2018 at 10:46 AM, Jarkko_Hietaniemi via RT <bug-Time-HiRes@rt.cpan.org> wrote: Show quoted text
Show quoted text
> I do not have access to a Win32 box, with gcc or Visual C. So I need help fixing this.
I am going to try to investigate it later tonight if I can find the time. Do you have a repo somewhere? -- Sinan
Subject: Re: [rt.cpan.org #124844] Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 18:30:38 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
Thank you very much! Fetching https://cpan.metacpan.org/authors/id/J/JH/JHI/Time-HiRes-1.9758.tar.gz ... OK Configuring Time-HiRes-1.9758 ... OK Building and testing Time-HiRes-1.9758 ... OK Successfully installed Time-HiRes-1.9758
CC: bug-Time-HiRes [...] rt.cpan.org, Perl5 Porters <perl5-porters [...] perl.org>
Subject: Re: Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 22:56:13 +0000
To: "A. Sinan Unur" <sinan [...] unur.com>
From: Steve Hay <steve.m.hay [...] googlemail.com>
Thanks for the report. struct timezone isn't on Windows. Neither is gettimeofday() really, but it's win32_gettimeofday() in perl. I'm not sure how to do this nicely right now, but either of the attached patches gets the build working again. On 21 March 2018 at 11:26, A. Sinan Unur <sinan@unur.com> wrote: Show quoted text
> Hello and thank you for your work, > > I tried to build Perl 5.27.10 on a 64 bit Windows 10 machine with > Visual Studio 2017 with the provided Makefile, and the build failed > because HiRes.xs failed to compile with the errors: > > HiRes.xs(1325): error C2079: 'Tz' uses undefined struct 'timezone' > HiRes.xs(1344): error C2079: 'Tz' uses undefined struct 'timezone' > HiRes.xs(1360): error C2079: 'Tz' uses undefined struct 'timezone' > > Changes mentions this: > > https://metacpan.org/changes/distribution/Time-HiRes#L3 > > 1.9577 [2018-03-15] > - fix win32 (and cygwin?) builds which have been broken since 1.9755: > problem was that gettimeofday() is a macro and needs to stay such > > First, I believe the version number for this release in Changes is a > typo. It should be 1.9757. > > It seems to me that this is a case of assuming gcc on Windows. See > earlier reports: > > http://www.cpantesters.org/cpan/report/d099a63a-6cb1-1014-9853-f25910f5bab9 > http://www.cpantesters.org/cpan/report/be353111-6c2a-1014-bdf0-8ac521104667 > http://www.cpantesters.org/cpan/report/d099a63a-6cb1-1014-9853-f25910f5bab9 > http://www.cpantesters.org/cpan/report/431b4d4b-6c26-1014-a8bb-9841a16ecb65 > > I am Cc'ing P5P on this because I believe 5.27.10 is the RC for 5.28. > > -- Sinan

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

CC: bug-Time-HiRes [...] rt.cpan.org, Perl5 Porters <perl5-porters [...] perl.org>
Subject: Re: Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 19:29:44 -0400
To: Steve Hay <steve.m.hay [...] googlemail.com>
From: "A. Sinan Unur" <sinan [...] unur.com>
Thank you. Please note that Time::HiRes 1.9758 fixes the issue. https://metacpan.org/source/JHI/Time-HiRes-1.9758/Changes#L3
Subject: Re: [rt.cpan.org #124857] AutoReply: Re: Build failure with module bundled with Perl 5.27.10
Date: Wed, 21 Mar 2018 19:37:42 -0400
To: bug-Time-HiRes [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
Apologies for the extra tickets created as a consequence of me Cc'ing P5P on the original bug report, and thank you for your work. -- Sinan
CC: Steve Hay <steve.m.hay [...] googlemail.com>, bug-Time-HiRes [...] rt.cpan.org, Perl5 Porters <perl5-porters [...] perl.org>
Subject: Re: Build failure with module bundled with Perl 5.27.10
Date: Thu, 22 Mar 2018 22:15:11 -0500
To: "A. Sinan Unur" <sinan [...] unur.com>
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Wed, Mar 21, 2018 at 6:29 PM, A. Sinan Unur <sinan@unur.com> wrote: Show quoted text
> Thank you. Please note that Time::HiRes 1.9758 fixes the issue. > > https://metacpan.org/source/JHI/Time-HiRes-1.9758/Changes#L3
Well, it puts on a band-aid for one compiler but doesn't really fix the fundamental problem. Other compilers can't even compile blead at what is supposed to be a pretty late state of code freeze. How many other compilers/run-times/platforms know (or don't know) about struct timezone? The standard says that the second argument to gettimeofday is of type pointer to void: <http://pubs.opengroup.org/onlinepubs/9699919799/> and I have been unable to find any standard that defines struct timezone or the settimeofday function. If Time::HiRes wants to prefer a platform-specific, non-standard struct that may or may not be defined in sys/time.h, then it owns the problem of detecting whether the compiler/runtime being used to build it has that struct available. It would be risky to add such detection during code freeze, but it's downright churlish to blithely assume something like this exists without bothering to check.
CC: Perl5 Porters <perl5-porters [...] perl.org>
Subject: Re: [rt.cpan.org #124877] Re: Build failure with module bundled with Perl 5.27.10
Date: Fri, 23 Mar 2018 07:03:33 +0200
To: bug-Time-HiRes [...] rt.cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
Show quoted text
> and I have been unable to find any standard that defines struct > timezone or the settimeofday function. If Time::HiRes wants to prefer > a platform-specific, non-standard struct that may or may not be > defined in sys/time.h, then it owns the problem of detecting whether > the compiler/runtime being used to build it has that struct available. > It would be risky to add such detection during code freeze, but it's > downright churlish to blithely assume something like this exists > without bothering to check. >
I have now given up the comaint on Time-HiRes so I won't break it any more. My suggestion would be to roll it back to 1.9754 (just rerelease that code in CPAN as 1.9759, in other words) since the refactoring I started attempting obviously is a failure, and runs afoul of the 5.28 code freeze.
My suggestion would be to roll it back to 1.9754 (just rerelease that Show quoted text
> code in CPAN as 1.9759, in other words) since the refactoring I started > attempting obviously is a failure, and runs afoul of the 5.28 code freeze.
Sorry, off-by-one, 1.9753 was the last stable release.