On the machine that does compile, the following file is used:<div>/usr/include/bits/sigcontext.h</div><div>This file has a copyright of 2002 from FSF.</div><div>This file does not try to use __u32, etc, and does not include other files that do.</div>
<div><br></div><div>On the machine that fails to compile, the following file is used:</div><div>/usr/include/i386-linux-gnu/bits/sigcontext.h</div><div>This file has a copyright of 1998 from FSF. This includes asm/sigcontext.h which in turn includes linux/types.h before using __u32, etc. linux/types.h includes asm/types.h (which in other other circumstance would include other files that include the definition for __u32, etc.). With the asm/types.h in target/include, things get broken.</div>
<div><br></div><div>I did some googling to find out how the /usr/include/bits directory gets filled, what package might set that up, but, I did not find anything useful.</div><div><br></div><div>Any suggestions?</div><div>
<br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 8:27 PM, P. Wilhelm <span dir="ltr"><<a href="mailto:bearcat.pilot@gmail.com" target="_blank">bearcat.pilot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 6/5/2012 8:18 AM, Andreas Fδrber wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 05.06.2012 01:15, schrieb Paul Wilhelm:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for your kind help / suggestions.<br>
<br>
Here is a more verbose version of the compile error output.<br>
<br>
paul@linux-jkcx:~/src/<u></u>openbios-devel>  env V=1 make build-verbose<br>
Building...<br>
make[1]: Entering directory `/home/paul/src/openbios-<u></u>devel/obj-sparc32'<br>
true<br>
true<br>
gcc -O2 -g -DFCOMPILER -DBOOTSTRAP -DSWAP_ENDIANNESS<br>
-DNATIVE_BITWIDTH_EQUALS_HOST_<u></u>BITWIDTH -Wall -Wredundant-decls -Wshadow<br>
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef<br>
-Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes<br>
-Wnested-externs -W -MMD -MP -MT host/kernel/dict.o -MF<br>
'host/kernel/dict.d' -I../include -I../kernel -I../kernel/include<br>
-I./target/include -c -o host/kernel/dict.o ../kernel/dict.c<br>
gcc -O2 -g -DFCOMPILER -DBOOTSTRAP -DSWAP_ENDIANNESS<br>
-DNATIVE_BITWIDTH_EQUALS_HOST_<u></u>BITWIDTH -Wall -Wredundant-decls -Wshadow<br>
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef<br>
-Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes<br>
-Wnested-externs -W -MMD -MP -MT host/kernel/bootstrap.o -MF<br>
'host/kernel/bootstrap.d' -I../include -I../kernel -I../kernel/include<br>
-I./target/include -c -o host/kernel/bootstrap.o ../kernel/bootstrap.c<br>
</blockquote>
Now that's a problem with the host compilation environment, it says gcc,<br>
not sparc-elf-gcc.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In file included from /usr/include/asm/sigcontext.h:<u></u>5:0,<br>
                  from /usr/include/bits/sigcontext.<u></u>h:28,<br>
                  from /usr/include/signal.h:339,<br>
                  from ../kernel/bootstrap.c:13:<br>
/usr/include/linux/types.h:27:<u></u>1: error: unknown type name ‘__u16’<br>
/usr/include/linux/types.h:28:<u></u>1: error: unknown type name ‘__u16’<br>
/usr/include/linux/types.h:29:<u></u>1: error: unknown type name ‘__u32’<br>
/usr/include/linux/types.h:30:<u></u>1: error: unknown type name ‘__u32’<br>
/usr/include/linux/types.h:31:<u></u>1: error: unknown type name ‘__u64’<br>
/usr/include/linux/types.h:32:<u></u>1: error: unknown type name ‘__u64’<br>
/usr/include/linux/types.h:34:<u></u>1: error: unknown type name ‘__u16’<br>
/usr/include/linux/types.h:35:<u></u>1: error: unknown type name ‘__u32’<br>
In file included from /usr/include/bits/sigcontext.<u></u>h:28:0,<br>
                  from /usr/include/signal.h:339,<br>
                  from ../kernel/bootstrap.c:13:<br>
/usr/include/asm/sigcontext.h:<u></u>24:2: error: unknown type name ‘__u32’<br>
/usr/include/asm/sigcontext.h:<u></u>25:2: error: unknown type name ‘__u32’<br>
/usr/include/asm/sigcontext.h:<u></u>28:2: error: unknown type name ‘__u64’<br>
/usr/include/asm/sigcontext.h:<u></u>33:2: error: unknown type name ‘__u32’<br>
/usr/include/asm/sigcontext.h:<u></u>38:2: error: unknown type name ‘__u32’<br>
/usr/include/asm/sigcontext.h:<u></u>191:2: error: unknown type name ‘__u64’<br>
/usr/include/asm/sigcontext.h:<u></u>192:2: error: unknown type name ‘__u64’<br>
/usr/include/asm/sigcontext.h:<u></u>193:2: error: unknown type name ‘__u64’<br>
/usr/include/asm/sigcontext.h:<u></u>198:2: error: unknown type name ‘__u32’<br>
make[1]: *** [host/kernel/bootstrap.o] Error 1<br>
make[1]: Leaving directory `/home/paul/src/openbios-<u></u>devel/obj-sparc32'<br>
make: *** [build-verbose] Error 1<br>
</blockquote>
On my system those typedefs are in /usr/include/asm-generic/int-<u></u>ll64.h.<br>
Could some package be missing?<br>
<br>
Andreas<br>
<br>
</blockquote></div></div>
Instead of picking up /usr/include/asm/types.h (which in turn picks up /usr/include/asm-generic/<u></u>types.h which picks up /usr/include/asm-generic/int-<u></u>ll64.h), it is using openbios-devel/obj-sparc32/<u></u>target/include/asm/types.h<br>

<br>
This is because of the -I../target/include.<br>
<br>
Not sure if this was the intent. I have a machine at work where this compile works, so I'll check to see what that machine is doing.<br>
<br>
Paul.<br>
</blockquote></div><br></div>