Hi Mark,
On 12/27/2017 12:05 PM, Mark Rivers wrote:
> I just did this again, but running makeBaseApp.pl with Windows rather
> than Linux. I get the same problem. It looks like the problem is that
> testVersion.h is changing because the timestamp is incrementing by 1
> second between the time it is created and checked?
I agree; it seems to be a problem with the genVersionHeader.pl script
that Michael added in 3.16.1 and the dependency rules. This is the
relevant part of your build log:
> perl -CSD H:/epics-devel/base-7.0.1/bin/windows-x64/genVersionHeader.pl
> -t ../../.. -N testVERSION -V "" ../O.Common/testVersion.h
>
> Updating VCS header ../O.Common/testVersion.h
> testVERSION = "2017-12-27T11:39:33"
>
> perl -CSD H:/epics-devel/base-7.0.1/bin/windows-x64/mkmf.pl -m
> devtestVersion.d -I. -I../O.Common -I. -I. -I..
> -I../../../include/compiler/msvc -I../../../include/os/WIN32
> -I../../../include -IH:/epics-devel/base-7.0.1/include/compiler/msvc
> -IH:/epics-devel/base-7.0.1/include/os/WIN32
> -IH:/epics-devel/base-7.0.1/include devtestVersion.obj
> ../devtestVersion.c
>
> perl -CSD H:/epics-devel/base-7.0.1/bin/windows-x64/genVersionHeader.pl
> -t ../../.. -N testVERSION -V "" ../O.Common/testVersion.h
>
> Updating VCS header ../O.Common/testVersion.h
> testVERSION = "2017-12-27T11:39:34"
>
> perl -CSD H:/epics-devel/base-7.0.1/bin/windows-x64/mkmf.pl -m
> devtestVersion.d -I. -I../O.Common -I. -I. -I..
> -I../../../include/compiler/msvc -I../../../include/os/WIN32
> -I../../../include -IH:/epics-devel/base-7.0.1/include/compiler/msvc
> -IH:/epics-devel/base-7.0.1/include/os/WIN32
> -IH:/epics-devel/base-7.0.1/include devtestVersion.obj
> ../devtestVersion.c
>
> perl -CSD H:/epics-devel/base-7.0.1/bin/windows-x64/genVersionHeader.pl
> -t ../../.. -N testVERSION -V "" ../O.Common/testVersion.h
>
> Updating VCS header ../O.Common/testVersion.h
> testVERSION = "2017-12-27T11:39:35"
whereas on Linux I get:
> perl -CSD /home/phoebus/ANJ/epics/base/7.0/bin/linux-x86_64/genVersionHeader.pl
> -t ../../.. -N testVERSION -V "" ../O.Common/testVersion.h
>
> Updating VCS header ../O.Common/testVersion.h
> testVERSION = "2017-12-27T12:08:23-0600"
>
> /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET
> -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64
> -Wpointer-arith -fvisibility=hidden -fPIC -I. -I../O.Common -I. -I. -I..
> -I../../../include/compiler/gcc -I../../../include/os/Linux
-I../../../include
> -I/home/phoebus/ANJ/epics/base/7.0/include/compiler/gcc
> -I/home/phoebus/ANJ/epics/base/7.0/include/os/Linux
> -I/home/phoebus/ANJ/epics/base/7.0/include -MM -MF devtestVersion.d
> ../devtestVersion.c
>
> perl -CSD /home/phoebus/ANJ/epics/base/7.0/bin/linux-x86_64/genVersionHeader.pl
> -t ../../.. -N testVERSION -V "" ../O.Common/testVersion.h
>
> Keeping VCS header ../O.Common/testVersion.h
> testVERSION = "2017-12-27T12:08:23-0600"
There seems to be a mismatch between the assumptions that script makes
about file-system modification times and how GNUmake works on Windows.
The old DOS FAT file-system had a time-stamp granularity of 2 seconds
and that has resulted in some workarounds being added to GNUmake on
Windows, e.g. see http://www.delorie.com/djgpp/v2faq/faq22_18.html or
there may be a delay added at the end of the phase-1 run before GNUmake
re-reads the Makefiles — that might explain what's happening here.
Michael: How about we drop the seconds field completely from the build
date/time-stamp? That should prevent this kind of problem from
recurring. It would still trigger a re-creation of the header whenever
there is a roll-over, but that should only happen once, not continuously
like Mark is seeing.
Mark: If you want to try out that fix, edit
base-7.0/src/tools/genVersionHeader.pl and make this change:
> diff --git a/src/tools/genVersionHeader.pl b/src/tools/genVersionHeader.pl
> index 5851ea8..8e50fec 100644
> --- a/src/tools/genVersionHeader.pl
> +++ b/src/tools/genVersionHeader.pl
> @@ -19,7 +19,7 @@ use POSIX qw(strftime);
> use strict;
>
> # RFC 8601 date+time w/ zone (eg "2014-08-29T09:42:47-0700")
> -my $tfmt = '%Y-%m-%dT%H:%M:%S';
> +my $tfmt = '%Y-%m-%dT%H:%M';
> $tfmt .= '%z' unless $^O eq 'MSWin32'; # %z returns zone name on Windows
> my $now = strftime($tfmt, localtime);
>
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- Replies:
- Re: Problem building example application on windows-x64 Michael Davidsaver
- RE: Problem building example application on windows-x64 Mark Rivers
- genVersionHeader.pl timestamp granularity (was Re: Problem building example application on windows-x64) Michael Davidsaver
- References:
- Problem building example application on windows-x64 Mark Rivers
- RE: Problem building example application on windows-x64 Mark Rivers
- Navigate by Date:
- Prev:
RE: Problem building example application on windows-x64 Mark Rivers
- Next:
Re: Problem building example application on windows-x64 Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Problem building example application on windows-x64 Mark Rivers
- Next:
Re: Problem building example application on windows-x64 Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|