Subject: problem with fts.h while building toolkit on linux
To: None <tech-toolchain@netbsd.org>
From: Aravind Gottipati <aravind@kc.rr.com>
List: tech-toolchain
Date: 05/13/2002 22:48:13
Hi,
    I am trying to cross build netbsd on a linux box.  I downloaded the
latest sources from pub/NetBSD/NetBSD-current/tar_files/src/.  I am
getting this error message when I try to build the tool kit.

This is what I tried from the src directory.  

./build.sh -m i386 -t

cc -O  -I. -I./include -I/home/aravind/tmp/netbsd/src/tools/compat
-DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o
__fts13.lo.o
/home/aravind/tmp/netbsd/src/tools/compat/../../lib/libc/gen/__fts13.c
In file included from
/home/aravind/tmp/netbsd/src/tools/compat/../../lib/libc/gen/__fts13.c:53:
/usr/include/fts.h:41: #error "<fts.h> cannot be used with
-D_FILE_OFFSET_BITS==64"
*** Error code 1

Stop.
nbmake: stopped in /home/aravind/tmp/netbsd/src/tools/compat
*** Error code 1

Stop.
nbmake: stopped in /home/aravind/tmp/netbsd/src/tools/compat
*** Error code 1

Stop.
nbmake: stopped in /home/aravind/tmp/netbsd/src/tools


I checked the fts.h file and it has an error check for this particular
condition (FILE_OFFSET_BITS=64).  The same header file on netbsd doesn't
care about FILE_OFFSET_BITS.  These are the details on the gcc that I am
using.  I tried different other options with build, like using -U, -a
etc, but they all failed at the same point.  

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
$ 

What am I doing wrong?  I am kind of newbie to netbsd, so let me know if
I should be doing this differently.

thank you,

Aravind