tachyon has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I have been having an interesting problem with perl Makefile.PL and make

I am using perlmonk.org for some cross platform module testing as it runs FreeBSD 4.4. When I run perl Makefile.PL the Makefile is given a timestamp 6 minutes in the past which leads to the following error:

bash-2.05$ perl Makefile.PL LIB=~/LIB Checking if your kit is complete... Looks good Writing Makefile for Blah::Simple bash-2.05$ make Makefile out-of-date with respect to Makefile.PL Cleaning current config before rebuilding Makefile... make -f Makefile.old clean > /dev/null 2>&1 || /bin/sh -c true /usr/bin/perl "-I/usr/libdata/perl/5.00503/mach" "-I/usr/libdata/perl/ +5.00503" Makefile.PL "LIB=/home/tachyon/LIB" Checking if your kit is complete... Looks good Writing Makefile for CGI::Simple ==> Your Makefile has been rebuilt. <== ==> Please rerun the make command. <== false *** Error code 1 Stop in /usr/home/tachyon/Blah/Simple. bash-2.05$ make [more of the same error] bash-2.05$ ls -al total 178 drwxr-xr-x 6 tachyon tachyon 512 Nov 18 08:29 . drwxr-xr-x 3 tachyon tachyon 512 Nov 18 02:12 .. -rw-r--r-- 1 tachyon tachyon 163 Nov 18 08:35 Changes -rw-r--r-- 1 tachyon tachyon 400 Nov 18 08:35 MANIFEST -rw-r--r-- 1 tachyon tachyon 17018 Nov 18 08:29 Makefile <--- +-- Huh, 6 minutes ago? -rw-r--r-- 1 tachyon tachyon 307 Nov 18 08:35 Makefile.PL <--- +-- Should be after this -rw-r--r-- 1 tachyon tachyon 6828 Nov 18 08:35 README drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 Simple -rw-r--r-- 1 tachyon tachyon 118167 Nov 18 08:35 Simple.pm drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 html drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 misc drwxr-xr-x 3 tachyon tachyon 512 Nov 18 02:12 t

As you can see the timestamp for the Makefile is incorrect with respect to the Makefile.PL. Apparently this chicken was born 6 minutes before its egg so make complains.

So..... 7 minutes later

bash-2.05$ perl Makefile.PL LIB=~/LIB Writing Makefile for Blah::Simple bash-2.05$ ls -al total 161 drwxr-xr-x 6 tachyon tachyon 512 Nov 18 08:36 . drwxr-xr-x 3 tachyon tachyon 512 Nov 18 02:12 .. -rw-r--r-- 1 tachyon tachyon 163 Nov 18 08:35 Changes -rw-r--r-- 1 tachyon tachyon 400 Nov 18 08:35 MANIFEST -rw-r--r-- 1 tachyon tachyon 17018 Nov 18 08:36 Makefile <--- +-- Now 1 minute past -rw-r--r-- 1 tachyon tachyon 307 Nov 18 08:35 Makefile.PL <--- +-- -rw-r--r-- 1 tachyon tachyon 6828 Nov 18 08:35 README drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 Simple -rw-r--r-- 1 tachyon tachyon 118167 Nov 18 08:35 Simple.pm drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 html drwxr-xr-x 2 tachyon tachyon 512 Nov 18 02:12 misc drwxr-xr-x 3 tachyon tachyon 512 Nov 18 02:12 t bash-2.05$ make mkdir blib mkdir blib/lib [now we are cooking...]

So that's a workaround but why is the timestamp off 6 minutes? Any suggestions about how to get a quicker workaround?

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Makefile time incorrect causing error
by blakem (Monsignor) on Nov 18, 2001 at 19:25 UTC
    I've never seen that before, but as a quick work around, you could try 'touch'ing the Makefile to set its timestame to "now" i.e.:
    % perl Makefile.PL % touch Makefile % make

    -Blake

      Thanks. touch does the trick. What happens is interesting. When I prepare the module I run a script called make_manifest.pl which performs a number of routine things on the distribution namely recurse the tree, remove the Makefile, Makfile.old, /blib, &1 and other extaneous files, does a global s/\015/012/\012 on all the files to de-Windows them, write all the pod into a /html dir using pod2html and rewrite a complete and accurate MANIFEST. This effectively touchs all the files with the current time on the generating system. The whole thing is then tar -cf and gziped.

      On upload the originating system time stamps are (mostly!) retained (in GMT) so the times represent the originating system time clock ie my Win32 system. When you run Makefile.PL the resultant Makefile carries the local system timestamp. This was proven this morning when I uploaded a tarball generated 9 hours earlier and the times were out by 8 hours and 55 minutes. This of course caused no problems as the Makefile was now much newer than Makefile.PL. The problem was that my sytem clock is 10 minutes fast.

      I had tried vi and then ZZ but this does not change the required timestamp whereas touch does. Thanks

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

        FYI, the "ZZ" command in vi exits but only writes the file if it has been changed since the last time it was saved, so if you don't change anything, the file remains completely untouched. ":wq" exits vi and rewrites the file whether it needs to or not, which would update the time stamp.

                - tye (but my friends call me "Tye")
Re: Makefile time incorrect causing error
by grinder (Bishop) on Nov 18, 2001 at 19:25 UTC

    That is truly a really weird error. I have never encountered it before. Maybe the system mangler is doing some deep voodoo on the server, because you're not really supposed to install your own CPAN modules, you're supposed to petition his Almightiness and with sufficient grovelling he may deign to install it for you. That way we all get to benefit from the use of the module.

    Seriously though, I have no idea about the error, but if you just ask Chris, he'll install it for you in the site installation.

    Of course, if you're not using CPAN modules (or from elsewhere) and in fact rolling your own, none of this applies. In that case I would suggest doing

    touch Makefile

    ... and then you're up and running immediately. I suspect, in this case, than your Makefile.PL is responsible for this sorry state of affairs. Try reproducing it with a small a Makefile.PL as possible, and then post that.

    <grumble>Argh, that'll serve me right for waffling on. blakem says the same thing and squeaks in one whole second before me.</grumble>

    --
    g r i n d e r

      The answer is outlined above and touch fixes the error so thanks. The modules concerned are hand rolled and are not for public consumption as they are pre-release versions undergoing cross platform testing so no one but me is likely to be amused by their 'features'.

      The Makefile.PL is the standard h2xs -X one - pure vanilla and three lines long.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Makefile time incorrect causing error
by kjherron (Pilgrim) on Nov 18, 2001 at 21:05 UTC
    Are these files stored on an NFS-mounted partition? With NFS, file timestamps are mostly based on the NFS server's clock, not the clock of the system manipulating the file. This can lead to problems like yours if the two system clocks aren't in sync.

    You (or your system administrator) should start by investigating why the two system clocks don't agree. In any computer network, it's essential to keep all of the clocks synchronized in order to prevent problems like this.

      Of course it was a syncronisation problem but interestingly it is a clock sync problem between my Win32 system where the tarbal was made and the FreeBSD system where it was installed. Full answer above.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print