[En-Nut-Discussion] Compile CVS version for Ethernut as Unix-Emulation

Thomas Drüke thomas.drueke at versatel-online.de
Mon Apr 12 17:12:53 CEST 2004


Hi all,

I'm new to the list and to development on the ethernut board (I'm using
version 1.3). I followed the list for a while and as I have a little bit
more time I start developing my own ethernut project. 

There seems to be a problem to compile the Nut/Os for the
Unix-environment under Linux (gentoo-1.4). I checked out the latest CVS
tree and configured the Nut/OS. After typing "make" there are a bunch of
errors listed:

<snip>

gcc  -c -g -Os -Wall -Werror -Wstrict-prototypes  -I../mod/include
-I../include nutinit.c -o nutinit.o
In file included from ../include/compiler.h:74,
                 from nutinit.c:75:
../include/arch/unix.h:108: error: syntax error before "u_long"
../include/arch/unix.h:108: warning: no semicolon at end of struct or
union
../include/arch/unix.h:109: warning: type defaults to `int' in
declaration of `flowcontrol'
../include/arch/unix.h:109: warning: data definition has no type or
storage class
../include/arch/unix.h:111: error: syntax error before '}' token
../include/arch/unix.h:111: warning: type defaults to `int' in
declaration of `uart_options_t'
../include/arch/unix.h:111: warning: data definition has no type or
storage class
../include/arch/unix.h:121: error: syntax error before "uart_options_t"
../include/arch/unix.h:121: warning: no semicolon at end of struct or
union
../include/arch/unix.h:123: warning: type defaults to `int' in
declaration of `emulation_options_t'
../include/arch/unix.h:123: warning: data definition has no type or
storage class
../include/arch/unix.h:126: error: syntax error before
"emulation_options"
../include/arch/unix.h:126: warning: type defaults to `int' in
declaration of `emulation_options'
../include/arch/unix.h:126: warning: data definition has no type or
storage class

</snip>

I tracked down the problem to the file "types_orig.h". It has just one
line 

#include "/usr/include/bits/types.h"

According to the doc in the header "bits/types.h" this file should never
be included directly on a Linux system. Instead it should include the
file "sys/types.h". Changing the above line into

#include "/usr/include/sys/types.h"

results in an error free compilation process on my machine. As I'm new I
don't know if this is a hack or fits into the Nut/OS environment. Any
comments ?

BR
Thomas




More information about the En-Nut-Discussion mailing list