Subject: Re: Crossbuilding NetBSD on FreeBSD machine
To: None <tech-toolchain@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-toolchain
Date: 03/31/2007 17:54:58
On Sat, 31 Mar 2007, Wojciech A. Koszek wrote:
> I want to cross build NetBSD kernel on FreeBSD computer. 
> 
> I used following packages to get src/...:
> [...]
> I type:
> 
> 	cvs update -dp

Your transcript shows "cvs update -dP", which is correct, except I still
don't know whether you are dealing with -current, netbsd-4, or some
other branch.

> $ file gnu/dist/texinfo/configure
> gnu/dist/texinfo/configure: data

If that configure script is corrupt, then quite possibly other files
are also corrupt, and perhaps that explains your difficulties.
Unfortunately, I don't know an easy way to verify whether your checkout
is clean.  It may be easiest to delete the entire tree, and check it out
again with "cvs -d:pserver:anoncvs@anoncvs.netbsd.org:/cvsroot checkout
src" (possibly with a "-r" option if you want some branch instead of
-current).

> I need to remove it and regenerate with:
> 
> $ autoconf259 --version

Rather delete it and update it with "cvs update".

> Then, in order to get cross-compiled tools I type:
> 
> 	./build.sh -m ofppc -O /tmp/netbsd.ofppc tools

That is supposed to work.

> One of the stages generates Makefile that looks like binary; moreover,
> it tries to use that file. [...]
> Full log:
> 
> 	http://people.freebsd.org/~wkoszek/netbsd-ofppc-on-freebsd.txt.bz2

I don't know what causes ${OBJDIR}/tools/binutils/build/Makefile to be
a binary file.  Are there any clues in a nearby config.log file?  Could
you post the first few lines of a hexdump of the corrupt Makefile, in
case that helps track it down?  (But first verify that you don't have a
corrupt checkout.)

--apb (Alan Barrett)