Subject: Build failure in tools/lex?
To: #List NetBSD current users <current-users@NetBSD.ORG>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 09/16/2004 05:14:47
Updated via CVS at approx 2004-09-16 0000 UTC.  Getting the following
errors while doing a ``build.sh -D ... -R ... release''

#   compile  lex/ccl.lo
cc -O -I/usr/src/tools/compat/obj.i386 -I/usr/src/tools/compat/obj.i386/include  -I/usr/src/tools/lex/../compat -DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  -I. -I/usr/src/tools/lex/../../usr.bin/lex -c -o ccl.lo.o    /usr/src/usr.bin/lex/ccl.c
In file included from /usr/src/tools/compat/obj.i386/config.h:110,
                 from /usr/src/usr.bin/lex/flexdef.h:34,
                 from /usr/src/usr.bin/lex/ccl.c:31:
/usr/src/tools/compat/compat_defs.h:66:2: #error _NETBSD_SOURCE is *not* to be defined.
In file included from /usr/src/tools/compat/obj.i386/config.h:110,
                 from /usr/src/usr.bin/lex/flexdef.h:34,
                 from /usr/src/usr.bin/lex/ccl.c:31:
/usr/src/tools/compat/compat_defs.h:139: warning: redefinition of `u_long'
/usr/include/sys/types.h:104: warning: `u_long' previously declared here
/usr/src/tools/compat/compat_defs.h:143: warning: redefinition of `u_char'
/usr/include/sys/types.h:101: warning: `u_char' previously declared here
/usr/src/tools/compat/compat_defs.h:147: warning: redefinition of `u_int'
/usr/include/sys/types.h:103: warning: `u_int' previously declared here
/usr/src/tools/compat/compat_defs.h:151: warning: redefinition of `u_short'
/usr/include/sys/types.h:102: warning: `u_short' previously declared here

*** Failed target:  ccl.lo
*** Failed command: cc -O -I/usr/src/tools/compat/obj.i386 -I/usr/src/tools/compat/obj.i386/include -I/usr/src/tools/lex/../compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I. -I/usr/src/tools/lex/../../usr.bin/lex -c -o ccl.lo.o /usr/src/usr.bin/lex/ccl.c
*** Error code 1

Stop.
nbmake: stopped in /usr/src/tools/lex

I've checked to make sure and _NETBSD_SOURCE is not defined by me
anywhere, especially not in /etc/mk.conf

So, did I do something wrong?  Do I need to update sources again?

----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
|  & World Cruiser | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------