Subject: Re: bmake link errors running bootstrap-pkgsrc bootstrap twice
To: Mark Valentine <tech-pkg@netbsd.org>
From: Douwe Kiela <virtus@wanadoo.nl>
List: tech-pkg
Date: 10/05/2003 01:13:07
> The bootstrap script first uses makefile.boot to create bmake.boot; this
> makefile builds lst*.o in the lst.lib subdirectory, then removes them once
> the link is complete.
>
> It then runs bmake -f Makefile install, which builds the lst*.o files in
the
> main bmake directory, but does not remove them.
>
> If you run the bootstrap script a second time, makefile.boot again builds
> objects in the lst.lib sub-directory, but its naive link command just uses
> *.o lib/*.o, which picks up both the newly built lst/*.o files and the
lst*.o
> files left around from last time, and hence fails with multiply defined
> symbols.
>
> A workaround is to use make clean:
>
> Index: bootstrap
> ===================================================================
> RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bootstrap,v
> retrieving revision 1.78
> diff -u -r1.78 bootstrap
> --- bootstrap 2003/10/04 18:58:51 1.78
> +++ bootstrap 2003/10/04 21:22:06
> @@ -393,7 +393,7 @@
>  fi
>
>  echo_msg "Installing bmake"
> -run_cmd "(cd bmake; $shprog
./configure --prefix=$prefix --with-default-sys-path=$prefix/share/mk
$configargs && make -f makefile.boot bootstrap && env BINDIR=$prefix/bin
MANDIR=$prefix/man $BSTRAP_ENV ./bmake -f Makefile install)"
> +run_cmd "(cd bmake; $shprog
./configure --prefix=$prefix --with-default-sys-path=$prefix/share/mk
$configargs && make -f makefile.boot bootstrap && env BINDIR=$prefix/bin
MANDIR=$prefix/man $BSTRAP_ENV ./bmake -f Makefile install clean)"
>
>  # build libnbcompat
>  echo_msg "Building libnbcompat"

I think a better work around would be to run the cleanup script from
bootstrap. That would remove all these errors.

Regards,
Douwe Kiela