From owner-freebsd-current@FreeBSD.ORG Thu Dec 1 18:48:29 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5D3016A41F for ; Thu, 1 Dec 2005 18:48:28 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 511B943D5E for ; Thu, 1 Dec 2005 18:48:26 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB1ImOAl021163; Thu, 1 Dec 2005 20:48:24 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 83323-04-2; Thu, 1 Dec 2005 20:48:22 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB1Il1cY021123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Dec 2005 20:47:01 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id jB1Il3dU023472; Thu, 1 Dec 2005 20:47:03 +0200 (EET) (envelope-from ru) Date: Thu, 1 Dec 2005 20:47:03 +0200 From: Ruslan Ermilov To: Peter Jeremy Message-ID: <20051201184703.GK20961@ip.net.ua> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ah40dssYA/cDqAW1" Content-Disposition: inline In-Reply-To: <20051201175639.GH32006@cirb503493.alcatel.com.au> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: Iasen Kostov , freebsd-current@freebsd.org Subject: Re: 6.0-STABLE buildworld (possibly) broken ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 18:48:29 -0000 --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--