Hi,

    I read almost every post on complation error related to Blink and have
still not come up with a correct solution. Could someone enlighten me on the
problem I'm facing. Even 'why', the problem is occurring will be greatly
helpful. I think it has to do with setting the PFLAGS, but I'm not sure what
to set it to, especially for the errors related to the interfaces.

    Here's the output of ncc -v:
/usr/bin/nescc -DPLATFORM_MICA -fnesc-include=tos -topdir=/opt/tinyos-1.x -v
-gcc=avr-gcc -mmcu=atmega103 -fnesc-target=avr -fnesc-no-debug
-I/opt/tinyos-1.x/tos/lib/Flash -I/opt/tinyos-1.x/tos/lib/Flash/AT45DB
-I/opt/tinyos-1.x/tos/platform/mica -I/opt/tinyos-1.x/tos/platform/avrmote
-I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types
-I/opt/tinyos-1.x/tos/system
avr-gcc -specs=/usr/lib/ncc/tdspecs -DPLATFORM_MICA -_fnesc-include=tos -v
-mmcu=atmega103 -_fnesc-target=avr -_fnesc-no-debug
-I/opt/tinyos-1.x/tos/lib/Flash -I/opt/tinyos-1.x/tos/lib/Flash/AT45DB
-I/opt/tinyos-1.x/tos/platform/mica -I/opt/tinyos-1.x/tos/platform/avrmote
-I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types
-I/opt/tinyos-1.x/tos/system -DNESC=112
Reading specs from /usr/local/lib/gcc-lib/avr/3.3-tinyos/specs
Reading specs from /usr/lib/ncc/tdspecs
Configured with: ./configure --target=avr --disable-nls
Thread model: single
gcc version 3.3-tinyos

To reiterate, string.h, stdio.h,etc are present in : /usr/local/avr/include.
However, when i tried 'locate pthread.h', it came up with nothing.

The output of make pc is:

In file included from /opt/tinyos-1.x/tos/platform/pc/nido.h:77:
/opt/tinyos-1.x/tos/platform/pc/event_queue.h:61:21: error: pthread.h: No
such file or directory
/opt/tinyos-1.x/tos/platform/pc/nido.h:85:22: error: sys/time.h: No such
file or directory
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:44: failed to preprocess
/opt/tinyos-1.x/tos/platform/pc/nido.h
In file included from /opt/tinyos-1.x/tos/platform/pc/Nido.nc:48:
/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc:75: only commands and events
can be defined in interfaces
/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc:75: warning: return-type
defaults to `int'
/opt/tinyos-1.x/tos/interfaces/ReceiveMsg.nc:75: parse error before
`receive'
In file included from /opt/tinyos-1.x/tos/platform/pc/Nido.nc:49:
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:58: only commands and events
can be defined in interfaces
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:58: warning: return-type
defaults to `int'
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:58: parse error before `send'
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:67: only commands and events
can be defined in interfaces
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:67: warning: return-type
defaults to `int'
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:67: redefinition of `result_t'
/opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc:67: parse error before
`sendDone'
In file included from /opt/tinyos-1.x/tos/platform/pc/Nido.nc:53:
/opt/tinyos-1.x/tos/interfaces/Pot.nc:78: only commands and events can be
defined in interfaces
/opt/tinyos-1.x/tos/interfaces/Pot.nc:78: warning: return-type defaults to
`int'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:78: parse error before `init'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:87: only commands and events can be
defined in interfaces
/opt/tinyos-1.x/tos/interfaces/Pot.nc:87: warning: return-type defaults to
`int'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:87: redefinition of `result_t'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:87: parse error before `set'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:96: only commands and events can be
defined in interfaces
/opt/tinyos-1.x/tos/interfaces/Pot.nc:96: warning: return-type defaults to
`int'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:96: redefinition of `result_t'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:96: parse error before `increase'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:105: only commands and events can be
defined in interfaces
/opt/tinyos-1.x/tos/interfaces/Pot.nc:105: warning: return-type defaults to
`int'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:105: redefinition of `result_t'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:105: parse error before `decrease'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:112: only commands and events can be
defined in interfaces
/opt/tinyos-1.x/tos/interfaces/Pot.nc:112: warning: return-type defaults to
`int'
/opt/tinyos-1.x/tos/interfaces/Pot.nc:112: parse error before `get'
In file included from /opt/tinyos-1.x/tos/platform/pc/Nido.nc:54:
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:14: only commands and events
can be defined in interfaces
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:14: warning: return-type
defaults to `int'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:14: parse error before `init'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:18: only commands and events
can be defined in interfaces
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:18: warning: return-type
defaults to `int'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:18: redefinition of `result_t'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:18: parse error before `stop'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:29: parse error before `port'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:47: parse error before
`power_level'
/opt/tinyos-1.x/tos/platform/pc/PowerState.nc:52: parse error before `sm'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc: In function `usage':
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:75: implicit declaration of function
`fprintf'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:75: `stderr' undeclared (first use
in this function)
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:75: (Each undeclared identifier is
reported only once
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:75: for each function it appears
in.)
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:76: implicit declaration of function
`exit'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc: In function `help':
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:80: implicit declaration of function
`fprintf'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:80: `stderr' undeclared (first use
in this function)
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:102: implicit declaration of
function `dbg_help'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:104: implicit declaration of
function `exit'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc: At top level:
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:107: parse error before `*'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc: In function `event_boot_handle':
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:110: implicit declaration of
function `printTime'
/opt/tinyos-1.x/tos/platform/pc/Nido.nc:113: `tos_state' undeclared (first
use in this function)

I have only pasted a part of the erroneous output, since the rest are
similar to this.

The result of 'which ncc' is:
/usr/bin/ncc (can also be seen from ./toscheck).

The result of ncc --version is:
ncc: 1.1.2b
avr-gcc: avr-gcc (GCC) 3.3-tinyos
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The result of ./toscheck is similar to the one posted earlier. However, I've
posted it again for completion:

Path:
        /opt/IBMJava2-142/bin
        /usr/local/sbin
        /usr/local/bin
        /usr/sbin
        /usr/bin
        /sbin
        /bin
        /usr/games

Classpath:
        .
        /opt/tinyos-1.x/tools/java/
        /opt/IBMJava2-142/jre/lib/ext/comm.jar
        /opt/tinyos-1.x/tools/java/javapath



rpms:
        /usr/bin/rpm


nesc:
        /usr/bin/ncc
        Version: ncc: 1.1.2b


avr-gcc:
        /usr/local/bin/avr-gcc
        Version: avr-gcc (GCC) 3.3-tinyos


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

flex:

bison:

java:
        /opt/IBMJava2-142/bin/java
        java version "1.4.2"

javax.comm:
        javax.comm ok

uisp:
        /usr/local/bin/uisp

--> WARNING: The uisp version found by toscheck is not '20030820tinyos'.
Please update your uisp version. The source for uisp version 20030820tinyos
can be found in the TinyOS 1.1.0 distribution.

graphviz:
        /usr/bin/dot

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

avr-as:
        /usr/local/bin/avr-as
        GNU assembler 2.13.2.1

avarice:
        /usr/local/bin/avarice

--> WARNING: The avarice version found by toscheck is not 2.0.20030806cvs
Please update your avarice version.
avr-gdb:

msp430-gcc:

--> WARNING: msp430-gcc not found. Won't be able to compile to any msp430
platforms (telos).



toscheck completed with errors:

--> WARNING: The uisp version found by toscheck is not '20030820tinyos'.
Please update your uisp version. The source for uisp version 20030820tinyos
can be found in the TinyOS 1.1.0 distribution.
--> WARNING: The graphviz (dot) version found by toscheck is not 1.10.
Please update your graphviz version if you'd like to use the nescdoc
documentation generator.
--> WARNING: The avarice version found by toscheck is not 2.0.20030806cvs
Please update your avarice version.--> WARNING: msp430-gcc not found. Won't
be able to compile to any msp430 platforms (telos).

Lastly, a simple C program-->test.c was able to be compiled with avr-gcc but
not with gcc, if it helps.

Any help is appreciated, regarding why the problem is occurring, how to
rectify it, anything.


Thanks,
Bharat.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to