Hi Zé Pedro,


I checked my tos.h file and it looks like this:



#if !defined(__CYGWIN__)

#if defined(__MSP430__)

#include <sys/inttypes.h>

#else

#include <inttypes.h>

#endif

#else //cygwin

#include <unistd.h>

#include <stdio.h>

#include <sys/types.h>

#endif

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <stddef.h>

#include <ctype.h>

/* TEMPORARY: include the Safe TinyOS macros so that annotations get

* defined away for non-safe users */

#include "../lib/safe/include/annots_stage1.h"

typedef uint8_t bool;

enum { FALSE = 0, TRUE = 1 };

typedef nx_int8_t nx_bool;

uint16_t TOS_NODE_ID = 1;

/* This macro is used to mark pointers that represent ownership

transfer in interfaces. See TEP 3 for more discussion. */

#define PASS

#ifdef NESC

struct @atmostonce { };

struct @atleastonce { };

struct @exactlyonce { };

#endif

/* This platform_bootstrap macro exists in accordance with TEP

107. A platform may override this through a platform.h file. */

#include <platform.h>

#ifndef platform_bootstrap

#define platform_bootstrap() {}

#endif

#ifndef TOSSIM

#define dbg(s, ...)

#define dbgerror(s, ...)

#define dbg_clear(s, ...)

#define dbgerror_clear(s, ...)

#endif

?

?

?

And if I try to locate the headers:



locate stddef.h

/usr/include/linux/stddef.h

/usr/lib/gcc/i486-linux-gnu/4.3/include/stddef.h

/usr/lib/gcc-lib/msp430/3.2.3/include/stddef.h

/usr/src/linux-headers-2.6.27-14/include/linux/stddef.h

/usr/src/linux-headers-2.6.27-14-generic/include/linux/stddef.h

/usr/src/linux-headers-2.6.27-7/include/linux/stddef.h

/usr/src/linux-headers-2.6.27-7-generic/include/linux/stddef.h



locate math.h

/usr/include/math.h

/usr/include/tgmath.h

/usr/lib/openoffice/help/en/smath.ht

/usr/lib/openoffice/help/en-GB/smath.ht

/usr/lib/openoffice/help/es/smath.ht

/usr/msp430/include/math.h

/usr/src/linux-headers-2.6.27-14/drivers/media/dvb/dvb-core/dvb_math.h

locate inttypes.h

/home/david/workspace/tinyos-2.x/tos/chips/pxa27x/inttypes.h

/opt/tinyos-2.x/tos/chips/pxa27x/inttypes.h

/pot/tinyos-2.0.2/tos/chips/pxa27x/inttypes.h

/pot/tinyos-2.1.0/tos/chips/pxa27x/inttypes.h

/usr/include/inttypes.h

/usr/msp430/include/sys/inttypes.h



locate string.h

/usr/include/string.h

/usr/include/bits/string.h

/usr/include/linux/string.h

/usr/include/linux/netfilter/xt_string.h

/usr/include/linux/netfilter_ipv4/ipt_string.h

/usr/lib/jvm/java-1.5.0-sun-1.5.0.19/demo/jvmti/hprof/src/hprof_string.h

/usr/msp430/include/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-cris/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-frv/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-m32r/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-m68k/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-mips/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-mn10300/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-parisc/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-um/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-x86/string.h

/usr/src/linux-headers-2.6.27-14/include/asm-xtensa/string.h

/usr/src/linux-headers-2.6.27-14/include/linux/string.h

/usr/src/linux-headers-2.6.27-14/include/linux/netfilter/xt_string.h

/usr/src/linux-headers-2.6.27-14/include/linux/netfilter_ipv4/ipt_string.h

/usr/src/linux-headers-2.6.27-14-generic/include/asm-x86/string.h

/usr/src/linux-headers-2.6.27-14-generic/include/config/netfilter/xt/match/string.h

/usr/src/linux-headers-2.6.27-14-generic/include/linux/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-cris/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-frv/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-m32r/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-m68k/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-mips/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-mn10300/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-parisc/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-um/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-x86/string.h

/usr/src/linux-headers-2.6.27-7/include/asm-xtensa/string.h

/usr/src/linux-headers-2.6.27-7/include/linux/string.h

/usr/src/linux-headers-2.6.27-7/include/linux/netfilter/xt_string.h

/usr/src/linux-headers-2.6.27-7/include/linux/netfilter_ipv4/ipt_string.h

/usr/src/linux-headers-2.6.27-7-generic/include/asm-x86/string.h

/usr/src/linux-headers-2.6.27-7-generic/include/config/netfilter/xt/match/string.h

/usr/src/linux-headers-2.6.27-7-generic/include/linux/string.h

?

....

....

etc

So the headers exist, but the compiler doesn't found them. How could I guide 
the compiler to find the headers??

Thanks,

David

  ----- Original Message ----- 
  From: Zé Pedro Espogeira 
  To: david.guil...@deimos-space.com 
  Sent: Friday, October 09, 2009 6:55 PM
  Subject: RE: [Tinyos-help] Tinyos-2.x / compiling TestSerial / .h files 
notfound / Makefiles in tinyos


  Well, David all those .h files like stddef.h, inttypes.h, string.h ... are 
header files from standard library of C language, that are included when 
compiling tinyOs programs, so my guess is that there is no C library in the 
system.

  check /opt/tinyos-2.x/tos/system/tos.h if it includes the .h files, or if 
there is no tos.h file

  Ze

------------------------------------------------------------------------------
  From: david.guil...@deimos-space.com
  To: tinyos-help@millennium.berkeley.edu
  Date: Fri, 9 Oct 2009 12:27:56 +0200
  Subject: Re: [Tinyos-help] Tinyos-2.x / compiling TestSerial / .h files not 
found / Makefiles in tinyos


  Hi Ze,

  this is the output that I get:

  Using internal specifications.
  Objetive: i486-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release 
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
  Thread model: posix
  gcc versión 4.3.2 (Ubuntu 4.3.2-1ubuntu12) 
   

  Thanks,

  Regards

    ----- Original Message ----- 
    From: Zé Pedro Espogeira 
    To: tinyos-help@millennium.berkeley.edu 
    Sent: Friday, October 09, 2009 11:47 AM
    Subject: Re: [Tinyos-help] Tinyos-2.x / compiling TestSerial / .h filesnot 
found / Makefiles in tinyos


    Hi  David

    type gcc -v to see if it is installed and what version it uses

    Greetings
    Ze


----------------------------------------------------------------------------
    From: david.guil...@deimos-space.com
    To: tinyos-help@millennium.berkeley.edu
    Date: Fri, 9 Oct 2009 10:30:50 +0200
    Subject: [Tinyos-help] Tinyos-2.x / compiling TestSerial / .h files not 
found / Makefiles in tinyos


    Hi everybody!

    I am having some troubles compiling the TestSerial. It seems it doesn't 
find the ".h files" to build the program. Error lines right below:


    /opt/tinyos-2.x/apps/tests/TestSerial# make telosb
    mkdir -p build/telosb
    mig java -target=null -I/opt/tinyos-2.x/tos/lib/T2Hack 
-DIDENT_APPNAME=\"TestSerialAppC\" -DIDENT_USERNAME=\"root\" 
-DIDENT_HOSTNAME=\"ATeNeA2\" -DIDENT_USERHASH=0xb49ac711L 
-DIDENT_TIMESTAMP=0x4acee4b4L -DIDENT_UIDHASH=0xdcee7204L 
-java-classname=TestSerialMsg TestSerial.h test_serial_msg -o TestSerialMsg.java
    /usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or 
directory
    /usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory
    ........
    ........
    /opt/tinyos-2.x/tos/system/tos.h:5:22: error: inttypes.h: No such file or 
directory
    /opt/tinyos-2.x/tos/system/tos.h:13:20: error: string.h: No such file or 
directory
    /opt/tinyos-2.x/tos/system/tos.h:14:20: error: stdlib.h: No such file or 
directory
    /opt/tinyos-2.x/tos/system/tos.h:15:18: error: math.h: No such file or 
directory
    /opt/tinyos-2.x/tos/system/tos.h:16:20: error: stddef.h: No such file or 
directory
    /opt/tinyos-2.x/tos/system/tos.h:17:19: error: ctype.h: No such file or 
directory
    ........
    ........
    failed to parse message file TestSerial.h
    make: *** [TestSerialMsg.java] Error 1



    In addtion I have the same error when compiling the directories /message 
/packet /tools from /$TOSROOT/support/sdk/java/net/tinyos


    It looks like if the Makefile couldn't find these files. I have tried 
adding this line as I found in: 
http://209.85.229.132/search?q=cache:oPnsI2XAdIsJ:www.cs.swarthmore.edu/~newhall/unixhelp/howto_makefiles.html+makefile+compiling+java+include+header+file&cd=3&hl=es&ct=clnk&gl=es&client=firefox-a

    INCLUDES = -I/usr/include/linux
    INCLUDES = -I/usr/include/

    where "/usr/include/linux" "/usr/include/" are the directories I have the 
.h files.

    Do you know how to specify in the makefile where to look fo the ".h files"?


    Some additional information
    OS: TinyOS-2.x (from the sourceforge repository) over Ubuntu 8.10
    export TOSROOT=/opt/tinyos-2.x
    export TOSDIR=$TOSROOT/tos
    export MAKERULES=$TOSROOT/support/make/Makerules
    export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
    export MOTECOM=serial@/dev/ttyUSB0:115200

    Other applications and Deluge work perfectly
     

    Thank you very much





----------------------------------------------------------------------------
    Com o Novo Internet Explorer 8 suas abas se organizam por cor. Baixe agora, 
é grátis! 

----------------------------------------------------------------------------

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


------------------------------------------------------------------------------
  Você sabia que pode utilizar o Messenger de qualquer tipo de celular? Saiba 
mais. 
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to