Unable to build world since early June

Ruslan Ermilov ru at freebsd.org
Mon Sep 13 03:08:23 PDT 2004


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 
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64 
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale 
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP 
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k 
> >>-Wno-uninitialized -c crypt_xdr.c -o crypt_xdr.So
> >>cc -O -pipe  -I/usr/src/lib/libc/include 
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64 
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale 
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP 
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k 
> >>-Wno-uninitialized -c nslexer.c
> >>cc -fpic -DPIC -O -pipe  -I/usr/src/lib/libc/include 
> >>-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/amd64 
> >>-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 
> >>-I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale 
> >>-DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP 
> >>-DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k 
> >>-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 
> >>a while when this happens. I'm running another buildworld now, dumping 
> >>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.
> 
> http://anduin.net/stdout.txt.gz
> http://anduin.net/stderr.txt.gz
> 
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
> 
> [root at anduin] /usr/src# uname -srm
> FreeBSD 5.2-CURRENT amd64
> [root at anduin] /usr/src# grep __FreeBSD_version /usr/include/osreldate.h
> #undef __FreeBSD_version
> #define __FreeBSD_version 502112
> [root at 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 $
> 
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 $
: 
: flex.skl:
:      $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar Exp $
: 
: 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
: ===================================================================
: 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 $
:   */
:  
:  #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 */
:  
:  #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 2004/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=           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=0

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


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/20040913/8e5e9f43/attachment.bin


More information about the freebsd-current mailing list