Date: Thu, 1 Dec 2005 20:47:03 +0200 From: Ruslan Ermilov <ru@freebsd.org> To: Peter Jeremy <PeterJeremy@optushome.com.au> Cc: Iasen Kostov <tbyte@otel.net>, freebsd-current@freebsd.org Subject: Re: 6.0-STABLE buildworld (possibly) broken ? Message-ID: <20051201184703.GK20961@ip.net.ua> In-Reply-To: <20051201175639.GH32006@cirb503493.alcatel.com.au> References: <1133397567.40645.5.camel@WarHeaD.OTEL.net> <20051201053543.GC36718@ip.net.ua> <1133436603.37980.9.camel@DraGoN.OTEL.net> <20051201175639.GH32006@cirb503493.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
--Ah40dssYA/cDqAW1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 :). >=20 > 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." >=20 > IMHO, that's a lot more obvious than: > "/usr/obj/usr/src/tmp/usr/bin/ld: cannot find -lc" > or > "... touch not found ..." >=20 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =20 STARTTIME!=3D LC_ALL=3DC date +CHECK_TIME!=3D find ${.CURDIR}/Makefile -mtime -0 +.if ${CHECK_TIME} =3D=3D "${.CURDIR}/Makefile" +.error check your date/time: ${STARTTIME} +.endif =20 .if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR) # %%% Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Ah40dssYA/cDqAW1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDj0UnqRfpzJluFF4RAimNAKCcL6wycUwW/w5ZWGmIJDcEldAJeQCgmqji CDU5V013swhM4KjrRbL6tc4= =jPb9 -----END PGP SIGNATURE----- --Ah40dssYA/cDqAW1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051201184703.GK20961>