Subject: World build failure in netbsd-2-0 and current
To: None <current-users@netbsd.org>
From: None <setagllib@optusnet.com.au>
List: current-users
Date: 11/03/2004 21:59:40
I've been trying to move to NetBSD for possibly a month now, but this problem keeps
slowing down my progress. The basic problem is that anything involving lexer
generation by flex will end up missing the headers that are meant to be generated.
The two bits of the tree that are affected are groff and cgdconfig.

Here is my latest message (cvs checkout fresh right before the build):

#    create  eqn/eqn.d
CC=/usr/src/../tools/bin/i386--netbsdelf-gcc /usr/src/../tools/bin/nbmkdep -f eqn.d
--   -DHAVE_CONFIG_H -I/usr/src/gnu/dist/groff/src/include
-I/usr/src/gnu/usr.bin/groff/src/include  -nostdinc++ -isystem-cxx 
/usr/src/../obj/destdir.i386/usr/include/g++    -nostdinc -isystem
/usr/src/../obj/destdir.i386/usr/include   eqn.cpp
/usr/src/gnu/dist/groff/src/preproc/eqn/eqn.y:27:17: box.h: No such file or directory
nbmkdep: compile failed.

*** Failed target:  eqn.d
*** Failed command: CC=/usr/src/../tools/bin/i386--netbsdelf-gcc
/usr/src/../tools/bin/nbmkdep -f eqn.d -- -DHAVE_CONFIG_H
-I/usr/src/gnu/dist/groff/src/include -I/usr/src/gnu/usr.bin/groff/src/include
-nostdinc++ -isystem-cxx /usr/src/../obj/destdir.i386/usr/include/g++ -nostdinc
-isystem /usr/src/../obj/destdir.i386/usr/include eqn.cpp
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/usr.bin/groff/src/preproc/eqn

box.h can be copied to another directory (since it exists) and this will work,
however it will then fail with eqn_tab.h and others which do *not* exist, and
according to Makefiles are meant to be generated (reading old mailing lists informed
me that this was implemented shortly after import of groff 1.19)

Also on the mailing lists, I found that two people have had exactly the same
problem. One fixed his just by re-cvs'ing the directory, which I tried to no avail.
Another appears to have never received a reply.

Now, I have tried cvsing from current and netbsd-2-0 several times, exactly as per
instructions that work for others. I even tried just unpacking source tarballs from
2.0 snapshots, same problem. To build, I have tried make with many targets,
./build.sh with many targets and flags fails exactly the same way (many exactly per
mailing list and handbook guides, others just simplified by using default
directories), cross-compiling from NetBSD 1.6.2 and from 2.0RC4 snapshots, and
indeed everything possible. Nothing was ever different (but during different stages
other things broke, which were usually only fixable by a complete re-cvs... does
anyone else feel NetBSD should use CVSup for primary source distribution?)

If useful, here is my mk.conf (also tried everything here, including not having one
at all):

CFLAGS=-O -march=pentium4 -mfpmath=sse -pipe
WRKOBJDIR=/var/tmp/pkg
X11_TYPE=xorg

This problem does not occur when building netbsd-1-6.

I feel that I am just doing something really stupid that everyone else manages not
to stumble upon, since I hear of everything being just peachy on the mailing lists.

Any ideas or experience? Heck, even a line-by-line (from fresh install) guide to
building a world without breakage would be great, since I could be just doing
something really exotic.

(If it matters, kernel compiles have never failed for me, nor have pkgsrc compiles)

Thanks in advance!