6.0-STABLE buildworld (possibly) broken ?
Ruslan Ermilov
ru at freebsd.org
Thu Dec 1 18:48:29 GMT 2005
On Fri, Dec 02, 2005 at 04:56:39AM +1100, Peter Jeremy wrote:
> On Thu, 2005-Dec-01 13:30:03 +0200, Iasen Kostov wrote:
> >On Thu, 2005-12-01 at 07:35 +0200, Ruslan Ermilov wrote:
> >> If so, the chances are simply that your date/time is set wrong,
> >> or there are files in the source tree (check with find(1)) that
> >> have modification time pointing to the future.
> ...
> >I wander if there is a way to save somewhere in the tree the time of
> >last modification(commit) and then in the Makefile to check if it is not
> >in the future and if it is to fail with proper message maybe if it is
> >possible it will save some wall-head-hitting and time too :).
>
> This problem seems to come up fairly regularly. How about adding a
> check into make(1) so that if a dependency has a date in the future,
> make dies with more intuitive error? It would probably reduce the
> number of these questions if you got an error message like:
> "foo.c was created in the future. Check your system date/time."
>
> IMHO, that's a lot more obvious than:
> "/usr/obj/usr/src/tmp/usr/bin/ld: cannot find -lc"
> or
> "... touch not found ..."
>
I considered doing this in make(1) a while ago, but have come
to a conclusion it's not quite safe. For example, I often
"cvs update" from remote repositories, and that sets modification
time to that of the repository machine (probably only if it's a
new file, I don't recall all the conditions now, or it might
have been NFS-mounted src/ or repo).
This has the granularity of one second, i.e., "touch Makefile;
make -n all" will falsely trigger the check:
%%%
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/Makefile,v
retrieving revision 1.325
diff -u -r1.325 Makefile
--- Makefile 28 Nov 2005 11:14:36 -0000 1.325
+++ Makefile 1 Dec 2005 18:43:12 -0000
@@ -159,6 +159,10 @@
.MAIN: all
STARTTIME!= LC_ALL=C date
+CHECK_TIME!= find ${.CURDIR}/Makefile -mtime -0
+.if ${CHECK_TIME} == "${.CURDIR}/Makefile"
+.error check your date/time: ${STARTTIME}
+.endif
.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
#
%%%
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20051201/e2874f0d/attachment.bin
More information about the freebsd-current
mailing list