Subject: Re: Problems compiling anything in /usr/src
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Nate Johnston <natej@broadwing.com>
List: netbsd-help
Date: 02/07/2000 12:31:31
On Sat, 5 Feb 2000, Manuel Bouyer wrote:

> On Fri, Feb 04, 2000 at 01:47:32PM -0500, Nate Johnston wrote:
> 
> > 
> > all ===> lib
> > all ===> lib/csu
> > all ===> lib/csu/i386_elf
> > cc -O2 -fPIC -Werror   -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=32
> > -I/usr/src/lib/csu/i386_elf/../../../libexec/ld.elf_so
> > -I/usr/src/lib/csu/i386_elf/../common_elf -c -DCRT0 crt0.c -o crt0.o
> > In file included from /usr/src/lib/csu/i386_elf/../common_elf/common.h:41,
> >                  from crt0.c:35:
> > /usr/src/lib/csu/i386_elf/../../../libexec/ld.elf_so/rtld.h:165: field
> > `linkmap' has incomplete type
> > *** Error code 1
> > [compile dies]
> 
> Was this from a 'make build' ? You *need* to do a 'make build' first, it
> will install a number of things required to compile.

OK, here's what I did next (excuse the potentially zsh-specific loop
syntax):

root@synapse:/usr rm -Rf src
root@synapse:/usr foreach TARFILE (/home/netbsd-download/*)
foreach> tar zxf $TARFILE
foreach> end
root@synapse:/usr cd src
root@synapse:/usr make build

...

[make clean executes without problems]

...

[make includes executes without problems]

...

includes ===> regress/sys/arch/i386/ldt
includes ===> regress/usr.bin
includes ===> regress/usr.bin/m4
(cd /usr/src/lib/csu &&  make depend && make  MKMAN=no &&  make MKMAN=no
install)
depend ===> i386_elf
all ===> i386_elf
cc -O2 -fPIC -Werror   -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=32
-I/usr/src/lib/csu/i386_elf/../../../libexec/ld.elf_so
-I/usr/src/lib/csu/i386_elf/../common_elf -c -DCRT0 crt0.c -o crt0.o
In file included from /usr/src/lib/csu/i386_elf/../common_elf/common.h:41,
                 from crt0.c:35:
/usr/src/lib/csu/i386_elf/../../../libexec/ld.elf_so/rtld.h:165: field `linkmap' has incomplete type
*** Error code 1

[compile dies]

Now, this is based on the contents of this URL:
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release/tar_files/

as of 1/27/00.  I will try downloading a -current snapshot, perhaps I will
have more luck with that.

--N.