Subject: Re: cross-compiling on solaris fails...
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: current-users
Date: 08/28/2006 20:46:49
In article <20060828180048.GA19688@sb1001.name>,
Kurt Schreiner <ks@ub.uni-mainz.de> wrote:
>On Mon, Aug 28, 2006 at 08:57:02AM -0700, Garrett D'Amore wrote:
>> Christos Zoulas wrote:
>> > In article <20060828151545.GJ16367@sb1001.name>,
>> > Kurt Schreiner <ks@ub.uni-mainz.de> wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm trying to cross-compile NetBSD on a Solaris machine (running Solaris
>> >> Express build b44, ako Sunos 5.11 - but that should'n matter ;-)
>> >>
>> >> Compiling fails early while building compat:
>> >>
>> >> # compile compat/efun.lo
>> >> /opt/csw/gcc4/bin/gcc -O -I. -I./include -I/u/NetBSD/src/tools/compat
>> >> -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE
>> >> -c -o efun.lo.o /u/NetBSD/src/tools/compat/../../lib/libutil/efun.c
>> >> /u/NetBSD/src/tools/compat/../../lib/libutil/efun.c:52: error: 'err'
>> >> undeclared here (not in a function)
>> >>
>> >
>> > But this means that there is an <err.h> header, because efun.c includes
>> > it and gcc does not complain about not finding the header. Where does
>> > it find it, and doesn't that header declare err(3)?
>See below...
>> >
>> > christos
>> >
>>
>> I don't think there is <err.h>. Certainly not on b44 of Solaris
>> Express. (Not in the sources anyway.)
>Yep!
>> And, not on my Solaris 10 system, either.
>Yep!
>
>I think it's found here:
>
>ls -ltr /u/NetBSD/arch/i386/obj/tools/compat/include/
>total 10
>drwxr-x--- 2 ks nbstaff 512 Aug 28 19:57 rpc/
>-rw-r----- 1 ks nbstaff 0 Aug 28 19:57 .stamp
>drwxr-x--- 2 ks nbstaff 512 Aug 28 19:57 machine/
>drwxr-x--- 2 ks nbstaff 512 Aug 28 19:57 sys/
>-rw-r----- 1 ks nbstaff 0 Aug 28 19:57 err.h
>-rw-r----- 1 ks nbstaff 0 Aug 28 19:57 paths.h
>drwxr-x--- 5 ks nbstaff 512 Aug 28 19:57 ./
>-rw-r----- 1 ks nbstaff 0 Aug 28 19:57 util.h
>drwxr-x--- 3 ks nbstaff 512 Aug 28 19:57 ../
>
>Empty, but there! Generated while "make" is running, after
>
>include/.stamp:
> mkdir -p include/sys include/machine include/rpc
> @touch ${.TARGET}
>
>in compat/Makefile is done, as ls -tr above suggests.
>But I've no idea, _how_ it's generated...
Ok, I think I fixed it. Please cvs update efun.c
Thanks,
christos