Subject: Build error while compiling sys/arch/i386/stand (atomic.h related)
To: None <current-users@NetBSD.org, ad@NetBSD.org>
From: Bernd Ernesti <veego@NetBSD.org>
List: current-users
Date: 12/23/2007 18:08:24
Hi,
a normal build in src/sys/arch/i386/stand fails with :
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:20: e=
rror: stdint.h: No such file or directory
*** Error code 1
This is the full output with compile flags:
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/../../../../..//a=
rch/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 -ffreestanding =
-Werror -march=3Di386 -mtune=3Di386 -I/src/sys/arch/i386/stand/boot/biosboo=
t/../../../../..//lib/libkern/arch/i386 -I /src/sys/arch/i386/stand/boot/bi=
osboot/.. -I /src/sys/arch/i386/stand/boot/biosboot/../../lib -I /src/sys/a=
rch/i386/stand/boot/biosboot/../../../../..//lib/libsa -I /usr/obj/src/sys/=
arch/i386/stand/boot/biosboot -nostdinc -D_STANDALONE -I/src/sys/arch/i386/=
stand/boot/biosboot/../../../../../ -DSUPPORT_PS2 -DDIRECT_SERIAL -DSUPPORT=
_SERIAL=3Dboot_params.bp_consdev -DCONSPEED=3Dboot_params.bp_conspeed -DCON=
SADDR=3Dboot_params.bp_consaddr -DCONSOLE_KEYMAP=3Dboot_params.bp_keymap -D=
SUPPORT_CD9660 -DSUPPORT_USTARFS -DSUPPORT_DOSFS -DPASS_BIOSGEOM -DPASS_MEM=
MAP -DEPIA_HACK -Wno-pointer-sign -I/src/sys/arch/i386/stand/boot/biosboot/=
../../../../..//lib/libkern/../../../common/lib/libc/quad -I/src/sys/arch/i=
386/stand/boot/biosboot/../../../../..//lib/libkern/../../../common/lib/lib=
c/string -I/src/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/libke=
rn/../../../common/lib/libc/arch/i386/string -I/src/sys/arch/i386/stand/bo=
ot/biosboot/../../../../..//lib/libkern/../../../common/lib/libc/quad -I/sr=
c/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/libkern/../../../co=
mmon/lib/libc/string -I/src/sys/arch/i386/stand/boot/biosboot/../../../../.=
.//lib/libkern/../../../common/lib/libc/arch/i386/string -I/src/sys/arch/i3=
86/stand/boot/biosboot/../../../../..//lib/libkern/../../../common/include =
-c /src/sys/arch/i386/stand/boot/biosboot/../../../../..//lib/libkern=
/../../../common/lib/libc/atomic/atomic_add_64_cas.c -o 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:20: e=
rror: stdint.h: No such file or directory
*** Error code 1
Hmm, do we need the same logic as in bootblock.h:
#if defined(_KERNEL) || defined(_STANDALONE)
#include <sys/stdint.h>
#else=20
#include <stdint.h>
#endif
If that works, I haven't tried it yet.
Regards,
Bernd