Subject: Re: Build error while compiling sys/arch/i386/stand (atomic.h related)
To: None <current-users@NetBSD.org>
From: Andrew Doran <ad@NetBSD.org>
List: current-users
Date: 12/29/2007 00:26:56
On Mon, Dec 24, 2007 at 06:26:47PM +0000, Andrew Doran wrote:

> On Sun, Dec 23, 2007 at 06:08:24PM +0100, Bernd Ernesti wrote:
>=20
> > a normal build in src/sys/arch/i386/stand fails with :
> >=20
> >     compile  kern/atomic_add_64_cas.o
> > In file included from /src/sys/arch/i386/stand/boot/biosboot/../../../.=
./..//lib/libkern/../../../common/lib/libc/atomic/atomic_add_64_cas.c:41:
> > /src/sys/arch/i386/stand/boot/biosboot/../../../../../sys/atomic.h:44:2=
0: error: stdint.h: No such file or directory
> > *** Error code 1
> >=20
> > This is the full output with compile flags:
> >=20
> > all =3D=3D=3D> boot/biosboot
> > rm -f machine && ln -s /src/sys/arch/i386/stand/boot/biosboot/../../../=
../..//arch/i386/include machine
> > rm -f x86 && ln -s /src/sys/arch/i386/stand/boot/biosboot/../../../../.=
.//arch/x86/include x86
> > rm -f lib && ln -s /usr/obj/src/sys/arch/i386/stand/boot/lib lib
> > mkdir -p /usr/obj/src/sys/arch/i386/stand/boot/lib
> > making sure the i386 library is up to date...
> > `libi386.a' is up to date.
> > making sure the sa library is up to date...
> > `libsa.a' is up to date.
> > making sure the z library is up to date...
> > `libz.a' is up to date.
> > making sure the kern library is up to date...
> > #   compile  kern/atomic_add_64_cas.o
> > cc -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Os -ffreestandin=
g   -Werror -march=3Di386 -mtune=3Di386 -I/src/sys/arch/i386/stand/boot/bio=
sboot/../../../../..//lib/libkern/arch/i386 -I /src/sys/arch/i386/stand/boo=
t/biosboot/.. -I /src/sys/arch/i386/stand/boot/biosboot/../../lib -I /src/s=
ys/arch/i386/stand/boot/biosboot/../../../../..//lib/libsa -I /usr/obj/src/=
sys/arch/i386/stand/boot/biosboot -nostdinc -D_STANDALONE -I/src/sys/arch/i=
386/stand/boot/biosboot/../../../../../ -DSUPPORT_PS2 -DDIRECT_SERIAL -DSUP=
PORT_SERIAL=3Dboot_params.bp_consdev -DCONSPEED=3Dboot_params.bp_conspeed -=
DCONSADDR=3Dboot_params.bp_consaddr -DCONSOLE_KEYMAP=3Dboot_params.bp_keyma=
p -DSUPPORT_CD9660 -DSUPPORT_USTARFS -DSUPPORT_DOSFS -DPASS_BIOSGEOM -DPASS=
_MEMMAP -DEPIA_HACK -Wno-pointer-sign -I/src/sys/arch/i386/stand/boot/biosb=
oot/../../../../..//lib/libkern/../../../common/lib/libc/quad -I/src/sys/ar=
ch/i386/stand/boot/biosboot/../../../../..//lib/libkern/../../../common/lib=
/libc/string -I/src/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/l=
ibkern/../../../common/lib/libc/arch/i386/string  -I/src/sys/arch/i386/stan=
d/boot/biosboot/../../../../..//lib/libkern/../../../common/lib/libc/quad -=
I/src/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/libkern/../../.=
./common/lib/libc/string -I/src/sys/arch/i386/stand/boot/biosboot/../../../=
../..//lib/libkern/../../../common/lib/libc/arch/i386/string -I/src/sys/arc=
h/i386/stand/boot/biosboot/../../../../..//lib/libkern/../../../common/incl=
ude    -c    /src/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/lib=
kern/../../../common/lib/libc/atomic/atomic_add_64_cas.c -o atomic_add_64_c=
as.o
> > In file included from /src/sys/arch/i386/stand/boot/biosboot/../../../.=
./..//lib/libkern/../../../common/lib/libc/atomic/atomic_add_64_cas.c:41:
> > /src/sys/arch/i386/stand/boot/biosboot/../../../../../sys/atomic.h:44:2=
0: error: stdint.h: No such file or directory
> > *** Error code 1
> >=20
> > Hmm, do we need the same logic as in bootblock.h:
> >=20
> > #if defined(_KERNEL) || defined(_STANDALONE)
> > #include <sys/stdint.h>
> > #else=20
> > #include <stdint.h>
> > #endif
> >=20
> > If that works, I haven't tried it yet.
>=20
> Oh, I didn't see that one. I'll have a look now.

I still don't see this. Have you tried a fresh build? I think it's stale de=
ps.

Andrew