[Tinyos-help] avr-gcc cannot locate sys/types.h

Janos Sallai sallai at isis.vanderbilt.edu
Wed Mar 12 09:02:40 PDT 2008


The sys/types.h is not available in TinyOS. It defines types concerning POSIX threads, processes, file systems, etc., neither of which is supported in TinyOS. 

 

Janos

 

From: tinyos-help-bounces at millennium.berkeley.edu [mailto:tinyos-help-bounces at millennium.berkeley.edu] On Behalf Of Elvar Ólafsson
Sent: Wednesday, March 12, 2008 6:38 AM
To: tinyos-help at millennium.berkeley.edu
Subject: [Tinyos-help] avr-gcc cannot locate sys/types.h

 

Hi everyone.

I have a small problem with my tiny os program. This program tries to include sys/types.h but the compilation fails since avr-gcc cannot locate the header file. How can I force avr-gcc to include files from /usr/include/? I am running Tiny OS 2.0.2 on Xubuntu. This Xubuntu installation came with Tiny OS preinstalled so I have not messed around with any settings so far. Here is the output when I compile the program:

$ make micaz
mkdir -p build/micaz
    compiling AmcaAppC to a micaz binary
ncc -o build/micaz/main.exe -Os -finline-limit=100000 -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DIDENT_PROGRAM_NAME=\"AmcaAppC\" -DIDENT_USER_ID=\"elvar\" -DIDENT_HOSTNAME=\"elvar-laptop\" -DIDENT_USER_HASH=0xae04bb44L -DIDENT_UNIX_TIME=0x47d7b88cL -DIDENT_UID_HASH=0x61df7b10L -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-check.xml AmcaAppC.nc -lm 
AmcaC.nc:10:22: sys/types.h: No such file or directory
In component `AmcaAppC':
AmcaAppC.nc:10: failed to preprocess AmcaC.nc
AmcaAppC.nc:15: no match
AmcaAppC.nc:16: cannot find `Packet'
AmcaAppC.nc:17: cannot find `AMPacket'
AmcaAppC.nc:18: cannot find `AMSend'
AmcaAppC.nc:19: cannot find `AMControl'
AmcaAppC.nc:20: cannot find `Receive'
make: *** [exe0] Error 1



I will also include the output from the commands run in the first tutorial in case they might help.

$tos-check-env 

Path:
        /opt/msp430/bin
        /usr/local/sbin
        /usr/local/bin
        /usr/sbin
        /usr/bin
        /sbin
        /bin
        /usr/games

Classpath:

        /opt/tinyos-2.x/support/sdk/java/tinyos.jar
        /opt/tinyos-2.x/support/sdk/java/

--> WARNING: CLASSPATH may not include '.' (that is,  the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems.


rpms:
        /usr/bin/rpm


nesc:
        /usr/bin/nescc
        Version: nescc: 1.2.8a


perl:
        /usr/bin/perl
        Version: v5.8.8 built for i486-linux-gnu-thread-multi

flex:

bison:

java:
        /usr/bin/java
        java version "1.4.2"

graphviz:
        /usr/bin/dot
        dot version 2.8 (Wed Dec 20 14:50:18 UTC 2006)

--> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.


tos-check-env completed with errors:

--> WARNING: CLASSPATH may not include '.' (that is,  the symbol for the current working directory). Please add '.' to your CLASSPATH or you may experience configuration problems.
--> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.


$printenv MAKERULES

/opt/tinyos-2.x/support/make/Makerules

$ ncc --version
ncc: 1.2.4
nescc: 1.2.8a


Hope you can help me out with this.

With regards,
Elvar Olafsson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080312/c05f2739/attachment.html


More information about the Tinyos-help mailing list