Hi Mido, I don't know what machine or what gcc/g++ you are using, but I think your problem will probably be solved if you #include <stdio.h> and #include<stdlib.h> in the files that you get error for.
Yes, it is weird, because we did not need to do that. Our code has been tested on x86 machines with either ubuntu, fedora, or cygwin. I have committed the change. Please try and let us know. Thanks - jpaek On Tue, Feb 16, 2010 at 1:21 PM, Mido <[email protected]> wrote: > Hi, > > I've just checked out threaded-tenet > The InterpreterTenet and LoaderTenet do compile now. > When I try to compile the master stack, I get the below error dump. > > m...@tos-2:/opt/threaded-tenet/master$ make > make -C tasklib -f Makefile > make[1]: Entering directory `/opt/threaded-tenet/master/tasklib' > yacc -o y.tab.c -d parser.y > flex -olex.yy.c lexer.l > gcc -o tenetAPI.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport tenetAPI.c > gcc -o task_construct.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > task_construct.c > gcc -o response.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport response.c > gcc -o element_construct.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > element_construct.c > gcc -o element_usage.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > element_usage.c > gcc -o task_error.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > task_error.c > gcc -o tp.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall -I. > -I../include -I../../tools/sf -I../../mote/lib -I../transport tp.c > gcc -o lex.yy.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall -I. > -I../include -I../../tools/sf -I../../mote/lib -I../transport lex.yy.c > lex.yy.c:1252: warning: 'yyunput' defined but not used > lex.yy.c:1293: warning: 'input' defined but not used > gcc -o y.tab.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall -I. > -I../include -I../../tools/sf -I../../mote/lib -I../transport y.tab.c > gcc -o transportAPI.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > transportAPI.c > gcc -o ../transport/tr_if.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../transport/tr_if.c > gcc -o ../transport/trsource.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/trsource.c > gcc -o ../transport/serviceAPI.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/serviceAPI.c > gcc -o ../transport/service_if.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/service_if.c > gcc -o ../include/tosmsg.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../include/tosmsg.c > gcc -o ../include/timeval.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../include/timeval.c > ar scru libtenet.a tenetAPI.o task_construct.o response.o > element_construct.o element_usage.o task_error.o tp.o lex.yy.o y.tab.o > transportAPI.o ../transport/tr_if.o ../transport/trsource.o > ../transport/serviceAPI.o ../transport/service_if.o > ../../tools/sf/sfsource.o ../include/tosmsg.o ../include/timeval.o > g++ -o tenetAPI.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport tenetAPI.c > g++ -o task_construct.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > task_construct.c > g++ -o response.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport response.c > g++ -o element_construct.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > element_construct.c > g++ -o element_usage.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > element_usage.c > g++ -o task_error.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > task_error.c > g++ -o tp.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall -I. > -I../include -I../../tools/sf -I../../mote/lib -I../transport tp.c > g++ -o lex.yy.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall > -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport lex.yy.c > lexer.l: In function 'int yylex()': > lexer.l:50: warning: deprecated conversion from string constant to 'char*' > lex.yy.c: At global scope: > lex.yy.c:1252: warning: 'void yyunput(int, char*)' defined but not used > g++ -o y.tab.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g -Wall -I. > -I../include -I../../tools/sf -I../../mote/lib -I../transport y.tab.c > parser.y: In function 'int yyparse()': > parser.y:83: warning: deprecated conversion from string constant to 'char*' > parser.y:90: warning: deprecated conversion from string constant to 'char*' > parser.y:97: warning: deprecated conversion from string constant to 'char*' > y.tab.c:1474: warning: deprecated conversion from string constant to 'char*' > y.tab.c:1617: warning: deprecated conversion from string constant to 'char*' > g++ -o transportAPI.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -g > -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > transportAPI.c > transportAPI.c: In function 'int open_transport()': > transportAPI.c:103: warning: deprecated conversion from string constant to > 'char*' > g++ -o ../transport/tr_if.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../transport/tr_if.c > g++ -o ../transport/trsource.p.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/trsource.c > g++ -o ../transport/serviceAPI.p.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/serviceAPI.c > g++ -o ../transport/service_if.p.o -c -DBUILDING_PC_SIDE=1 > -DTOSH_DATA_LENGTH=110 -g -Wall -I. -I../include -I../../tools/sf > -I../../mote/lib -I../transport ../transport/service_if.c > g++ -o ../include/tosmsg.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../include/tosmsg.c > g++ -o ../include/timeval.p.o -c -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 > -g -Wall -I. -I../include -I../../tools/sf -I../../mote/lib -I../transport > ../include/timeval.c > ar scru libtenet_cpp.a tenetAPI.p.o task_construct.p.o response.p.o > element_construct.p.o element_usage.p.o task_error.p.o tp.p.o lex.yy.p.o > y.tab.p.o transportAPI.p.o ../transport/tr_if.p.o ../transport/trsource.p.o > ../transport/serviceAPI.p.o ../transport/service_if.p.o > ../../tools/sf/sfsource.p.o ../include/tosmsg.p.o ../include/timeval.p.o > make[1]: Leaving directory `/opt/threaded-tenet/master/tasklib' > make -C router -f Makefile > make[1]: Entering directory `/opt/threaded-tenet/master/router' > g++ -DBUILDING_PC_SIDE=1 -DTOSH_DATA_LENGTH=110 -O1 -Wall -g > -I../../master/include -I../../tools/sf -I../../master/trd -I../../mote/lib > -I../../mote/lib/transport -I../../mote/lib/trd -I../../mote/lib/routing > -DDEBUG_MODE Main.cpp Network.cpp TenetRouter.cpp TenetTransport.cpp > TCP_Server.cpp TCP_Client.cpp UDP_Server.cpp UDP_Client.cpp IPRT_Manager.cpp > MRT_Manager.cpp TR_Common.cpp TenetSFClient.cpp SFClient.cpp File.cpp > ../../tools/sf/sfsource.c -o router > In file included from Main.cpp:38: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from Main.cpp:39: > TenetRouter.h:80: warning: 'typedef' was ignored in this declaration > TenetRouter.h:86: warning: 'typedef' was ignored in this declaration > TenetRouter.h:90: warning: 'typedef' was ignored in this declaration > TenetRouter.h:102: warning: 'typedef' was ignored in this declaration > Main.cpp: In function 'void ShowUsage(char*)': > Main.cpp:62: warning: deprecated conversion from string constant to 'char*' > Main.cpp: In function 'int main(int, char**)': > Main.cpp:281: warning: ignoring return value of 'char* realpath(const char*, > char*)', declared with attribute warn_unused_result > Main.cpp:283: warning: ignoring return value of 'int system(const char*)', > declared with attribute warn_unused_result > In file included from Network.cpp:47: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > Network.cpp: In function 'bool IsInTheSameMachine(uint32_t)': > Network.cpp:347: warning: deprecated conversion from string constant to > 'char*' > In file included from TCP_Socket.h:55, > from TenetTransport.h:40, > from TenetRouter.cpp:34: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from TenetRouter.cpp:35: > TenetRouter.h:80: warning: 'typedef' was ignored in this declaration > TenetRouter.h:86: warning: 'typedef' was ignored in this declaration > TenetRouter.h:90: warning: 'typedef' was ignored in this declaration > TenetRouter.h:102: warning: 'typedef' was ignored in this declaration > In file included from TCP_Socket.h:55, > from TenetTransport.h:40, > from TenetTransport.cpp:35: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from TenetTransport.cpp:36: > TenetRouter.h:80: warning: 'typedef' was ignored in this declaration > TenetRouter.h:86: warning: 'typedef' was ignored in this declaration > TenetRouter.h:90: warning: 'typedef' was ignored in this declaration > TenetRouter.h:102: warning: 'typedef' was ignored in this declaration > In file included from TCP_Socket.h:55, > from TCP_Server.cpp:34: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > TCP_Server.cpp: In member function 'bool CTCP_Server::StartServer()': > TCP_Server.cpp:62: error: 'stderr' was not declared in this scope > TCP_Server.cpp:62: error: 'fprintf' was not declared in this scope > TCP_Server.cpp:75: error: 'stderr' was not declared in this scope > TCP_Server.cpp:75: error: 'fprintf' was not declared in this scope > TCP_Server.cpp:87: error: 'stderr' was not declared in this scope > TCP_Server.cpp:87: error: 'fprintf' was not declared in this scope > TCP_Server.cpp: In member function 'bool CTCP_Server::Listen()': > TCP_Server.cpp:107: error: 'stderr' was not declared in this scope > TCP_Server.cpp:107: error: 'fprintf' was not declared in this scope > TCP_Server.cpp: In member function 'CTCP_Client* CTCP_Server::Accept()': > TCP_Server.cpp:147: error: 'stderr' was not declared in this scope > TCP_Server.cpp:147: error: 'fprintf' was not declared in this scope > In file included from TCP_Socket.h:55, > from TCP_Client.cpp:39: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from UDP_Socket.h:49, > from UDP_Server.cpp:34: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from UDP_Socket.h:49, > from UDP_Client.cpp:34: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from IPRT_Manager.cpp:38: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > IPRT_Manager.cpp: In static member function 'static int > CIPRT_Manager::Refresh(int)': > IPRT_Manager.cpp:158: warning: deprecated conversion from string constant to > 'char*' > IPRT_Manager.cpp: In static member function 'static int > CIPRT_Manager::MakeIPRT_Packet(IPRT_Packet*)': > IPRT_Manager.cpp:405: error: 'memcpy' was not declared in this scope > In file included from MRT_Manager.cpp:37: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from MRT_Manager.cpp:38: > TenetRouter.h:80: warning: 'typedef' was ignored in this declaration > TenetRouter.h:86: warning: 'typedef' was ignored in this declaration > TenetRouter.h:90: warning: 'typedef' was ignored in this declaration > TenetRouter.h:102: warning: 'typedef' was ignored in this declaration > In file included from TR_Common.cpp:36: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > TR_Common.cpp: In function 'void GetCommand(char*)': > TR_Common.cpp:42: warning: ignoring return value of 'char* fgets(char*, int, > FILE*)', declared with attribute warn_unused_result > In file included from TCP_Socket.h:55, > from SFClient.h:37, > from TenetSFClient.h:40, > from TenetSFClient.cpp:35: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from TenetSFClient.cpp:36: > TenetRouter.h:80: warning: 'typedef' was ignored in this declaration > TenetRouter.h:86: warning: 'typedef' was ignored in this declaration > TenetRouter.h:90: warning: 'typedef' was ignored in this declaration > TenetRouter.h:102: warning: 'typedef' was ignored in this declaration > In file included from SFClient.cpp:36: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > In file included from File.cpp:41: > TR_Common.h:71: warning: 'typedef' was ignored in this declaration > TR_Common.h:79: warning: 'typedef' was ignored in this declaration > make[1]: *** [router] Error 1 > make[1]: Leaving directory `/opt/threaded-tenet/master/router' > make: *** [all] Error 2 > m...@tos-2:/opt/threaded-tenet/master$ > > > > > > -----Original Message----- > From: Jeongyeup Paek [mailto:[email protected]] > Sent: Monday, February 15, 2010 9:17 PM > To: Mido > Cc: [email protected] > Subject: Re: [Tinyos-help] Erros compiling TOSThread-tenet applications > > On Tue, Feb 9, 2010 at 12:08 PM, Mido <[email protected]> wrote: >> When following the README of TOSThreads-tenet, I get errors when compiling >> InterpreterTenet or LoaderTenet >> >> The README uses "make telosb". >> Shouldn't "make telosb threads" be used? > > No, that is not necessary as long as you do 'source threads.sh' > as instructed in the README file. That 'threads' part gets automatically > included if you are within that threaded-tenet/mote/apps/* path. > > >> 1. When compiling /opt/threaded-tenet/mote/apps/InterpreterTenet > > That seems to be our mistake. I have committed the fixes. > Please try again and let us know. > > >> 2. When compiling /opt/threaded-tenet/mote/apps/LoaderTenet, I get: > > I think you forgot to do 'source threads.sh' as instructed in the README > file. > Please try again and let us know. > > > Thank you > -- > Jeongyeup Paek > Ph.D. Candidate > Embedded Networks Laboratory > Department of Computer Science > University of Southern California > http://enl.usc.edu/~jpaek > > -- Jeongyeup Paek Ph.D. Candidate Embedded Networks Laboratory Department of Computer Science University of Southern California http://enl.usc.edu/~jpaek _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
