Subject: Re: Missing includes when cross-compiling tools
To: Tyler Mitchell <fission@styrophone.net>
From: Luke Mewburn <lukem@netbsd.org>
List: current-users
Date: 02/11/2003 15:31:21
On Mon, Feb 10, 2003 at 08:25:57PM -0800, Tyler Mitchell wrote:
  | Hello,
  | 
  | I am trying to build a kernel (1.6 release) for NetBSD/sparc on a Linux
  | system (Slackware 8), and build.sh -t seems to stop in a couple different
  | places.  This is the command I use:
  | 
  | 	./build.sh -m sparc -T /home/fission/cross-sparc -t -u
  | 
  | The output (a bit abbreviated) follows:

You need to build to a DESTDIR to solve this problem.


  | 
  | 
  | ===> DESTDIR path:
  | ===> TOOLDIR path: /home/fission/cross-sparc
  | 
  | [snip]
  | 
  | dependall ===> cat
  | cc -O -I/home/fission/src/tools/compat/obj -I/home/fission/src/tools/compat/obj/include  -I/home/fission/src/tools/cat/../compat -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -c -o cat.lo.o /home/fission/src/tools/cat/../../bin/cat/cat.c
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:42: parse error before string constant
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:42: warning: data definition has no type or storage class
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:50: parse error before string constant
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:50: warning: data definition has no type or storage class
  | /home/fission/src/tools/cat/../../bin/cat/cat.c: In function `raw_args':
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:263: `EFTYPE' undeclared (first use in this function)
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:263: (Each undeclared identifier is reported only once
  | /home/fission/src/tools/cat/../../bin/cat/cat.c:263: for each function it appears in.)
  | *** Error code 1
  | 
  | Stop.
  | nbmake: stopped in /home/fission/src/tools/cat
  | *** Error code 1
  | 
  | Stop.
  | nbmake: stopped in /home/fission/src/tools/cat
  | *** Error code 1
  | 
  | Stop.
  | nbmake: stopped in /home/fission/src/tools
  | 
  | - - - - -
  | 
  | The start of the offending lines from cat.c :
  | 
  | 	[42]	_COPYRIGHT( ...
  | 	[50]	_RCSID( ...
  | 	[263]	errno = EFTYPE;
  | 
  | Looks to me like the compiler is missing an include directory (for those
  | macros and constants) but I'm not sure where that's supposed to be
  | defined.
  | 
  | If I comment out those first two lines and then change EFTYPE to 79, cat
  | will compile, but then the build stops at sunlabel for much the same
  | reasons (unable to locate includes).
  | 
  | Any ideas, suggestions, etc, would be greatly appreciated.
  | 
  | Thanks!
  | 
  | -- 
  | Tyler Mitchell
  | 
  | "Wherever you go, there you are."
  |       -- Douglas Adams