Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 13:08:18 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Eirik Oeverby <ltning@anduin.net>
Cc:        current@freebsd.org
Subject:   Re: Unable to build world since early June
Message-ID:  <20040913100818.GA15613@ip.net.ua>
In-Reply-To: <41456B43.5050707@anduin.net>
References:  <414557C3.9020101@anduin.net> <20040913085359.GA31628@ip.net.ua> <4145622E.7040405@anduin.net> <20040913092954.GC31628@ip.net.ua> <41456B43.5050707@anduin.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 13, 2004 at 11:41:23AM +0200, Eirik Oeverby wrote:
> Ruslan Ermilov wrote:
> >On Mon, Sep 13, 2004 at 11:02:38AM +0200, Eirik Oeverby wrote:
> >>The exact output of 'make buildworld' (from the time of the error) is:
> >>
> >>cc -fpic -DPIC -O -pipe  -I/usr/src/lib/libc/include=20
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64=20
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6=
=20
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale=
=20
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP=20
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k=20
> >>-Wno-uninitialized -c crypt_xdr.c -o crypt_xdr.So
> >>cc -O -pipe  -I/usr/src/lib/libc/include=20
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64=20
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6=
=20
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale=
=20
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP=20
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k=20
> >>-Wno-uninitialized -c nslexer.c
> >>cc -fpic -DPIC -O -pipe  -I/usr/src/lib/libc/include=20
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64=20
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6=
=20
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale=
=20
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP=20
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k=20
> >>-Wno-uninitialized -c nslexer.c -o nslexer.So
> >>/dev/stdout: In function `_nsyylex':
> >>/dev/stdout:711: warning: label `find_rule' defined but not used
> >>/usr/src/lib/libc/net/nslexer.l: At top level:
> >>/dev/stdout:1678: warning: 'yy_flex_realloc' defined but not used
> >>*** Error code 1
> >>/dev/stdout: In function `_nsyylex':
> >>/dev/stdout:711: warning: label `find_rule' defined but not used
> >>/usr/src/lib/libc/net/nslexer.l: At top level:
> >>/dev/stdout:1678: warning: 'yy_flex_realloc' defined but not used
> >>*** Error code 1
> >>2 errors
> >>*** Error code 2
> >>1 error
> >>*** Error code 2
> >>1 error
> >>*** Error code 2
> >>1 error
> >>*** Error code 2
> >>1 error
> >>*** Error
> >>
> >>As to which stage this is I don't know - it has been building for quite=
=20
> >>a while when this happens. I'm running another buildworld now, dumping=
=20
> >>the output to files. Let me know if you need these.
> >>
> >
> >Yes.  Please put the *compressed* output (both stdout and stderr) from
> >a non-parallel (that is, without -jN) "make buildworld" command available
> >somewhere for download.
>=20
> http://anduin.net/stdout.txt.gz
> http://anduin.net/stderr.txt.gz
>=20
Ugh, I meant the combined output, but okay, I probably don't need it,
please go on reading.

> >Please also provide me with the outputs of the following commands:
> >
> >uname -srm
> >grep __FreeBSD_version /usr/include/osreldate.h
> >ident /usr/bin/lex
>=20
> [root@anduin] /usr/src# uname -srm
> FreeBSD 5.2-CURRENT amd64
> [root@anduin] /usr/src# grep __FreeBSD_version /usr/include/osreldate.h
> #undef __FreeBSD_version
> #define __FreeBSD_version 502112
> [root@anduin] /usr/src# ident /usr/bin/lex
>      $FreeBSD: src/usr.bin/lex/flex.skl,v 1.7 2002/09/09 02:58:42 obrien =
Exp $
>      $FreeBSD: src/usr.bin/lex/gen.c,v 1.6 2002/06/30 05:25:03 obrien Exp=
 $
>=20
OK, problem analyzed and understood.  Here's the analysis:

Your /usr/bin/lex was compiled using the above two files/revisions.  Now
consider this change:

: $ ident gen.c flex.skl
: gen.c:
:      $FreeBSD: src/usr.bin/lex/gen.c,v 1.7 2004/01/06 18:54:55 nectar Exp=
 $
:=20
: flex.skl:
:      $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar =
Exp $
:=20
: RCS file: /home/ncvs/src/usr.bin/lex/gen.c,v
: Working file: gen.c
: head: 1.7
: branch:
: locks: strict
: access list:
: keyword substitution: kv
: total revisions: 13;    selected revisions: 1
: description:
: ----------------------------
: revision 1.7
: date: 2004/01/06 18:54:55;  author: nectar;  state: Exp;  lines: +2 -0
: Work around a `label defined but not used' warning in *generated* code.

Here's what happens to your system: your build environment is broken, and
it fools "make buildworld" into thinking that it's running on the OS whose
version of 502112, when in fact it's not.  More explanation follows...

The 502112 bump was done in sys/sys/param.h, in this revision:

: Index: param.h
: =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/sys/sys/param.h,v
: retrieving revision 1.190
: retrieving revision 1.191
: diff -u -p -r1.190 -r1.191
: --- param.h     11 Apr 2004 21:57:07 -0000      1.190
: +++ param.h     13 Apr 2004 09:33:33 -0000      1.191
: @@ -32,7 +32,7 @@
:   * SUCH DAMAGE.
:   *
:   *     @(#)param.h     8.3 (Berkeley) 4/4/95
: - * $FreeBSD: src/sys/sys/param.h,v 1.190 2004/04/11 21:57:07 mux Exp $
: + * $FreeBSD: src/sys/sys/param.h,v 1.191 2004/04/13 09:33:33 ru Exp $
:   */
: =20
:  #ifndef _SYS_PARAM_H_
: @@ -55,7 +55,7 @@
:   * scheme is:  <major><two digit minor><0 if release branch, otherwise 1=
>xx
:   */
:  #undef __FreeBSD_version
: -#define __FreeBSD_version 502111       /* Master, propagated to newvers =
*/
: +#define __FreeBSD_version 502112       /* Master, propagated to newvers =
*/
: =20
:  #ifndef LOCORE
:  #include <sys/types.h>

Note the __FreeBSD_version bump was done on 2004/04/13, while the lex change
in question (that your /usr/bin/lex does not actually have) was done on 200=
4/01/06,
three months *earlier*.  If you were really running the 502112 system, your
/usr/bin/lex would already have it.

buildworld correctly tries to upgrade "lex" for systems which have a stale =
one;
here's a relevant excerpt from src/Makefile.inc1:

: .if ${BOOTSTRAPPING} < 502102
: _lex=3D           usr.bin/lex
: .endif

502101 and 502102 correspond to revisions 1.177 and 1.178 of param.h,
2003/12/19 and 2004/01/30, respectively, so the 2004/01/06 (the date
the "lex" change was made) falls into this range.

So this means that your build system is broken.  The most common way to
do it is to run "make includes" that will spam your /usr/include with
headers that do not match the rest of your installed world.  This can
also be a result of a failed "make installworld".

Here's the recipe for you.  Apply it only once, when you recover from a
broken build system, you don't need it normally.  It may work, or may
not, depending on how broken your build system is, but chances are good:

	make buildworld OSRELDATE=3D0

Make sure to specify OSRELDATE=3D0 when doing "make installworld".


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBRXGSqRfpzJluFF4RArwTAJ0eQd8C4oRIYtb7kyZYVacN9xIAiACaAilc
CUlwvK48Y9NSCNIOn6Xn9qU=
=yrGW
-----END PGP SIGNATURE-----

--BXVAT5kNtrzKuDFl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913100818.GA15613>