[Tinyos-help] can't Blink with 'make micaz sim '
preeti k
kalepreeti at gmail.com
Tue Dec 12 05:12:06 PST 2006
On 12/11/06, Philip Levis <pal at cs.stanford.edu> wrote:
>
> On Dec 11, 2006, at 8:16 AM, Mr. Jonathan A. Gomez wrote:
>
> >
> > Hmm... I don't know anything about compiling TOSSIM, but I do
> > understand some of the meaning of
> > your error messages:
> >
> > You got a lot of lines like
> >
> >> build/micaz/sim.o(.text+0x2f86): In function `sim_log_add_channel':
> >> /opt/tinyos-2.x/tos/lib/tossim/sim_log.c:166: undefined reference to
> >> `_hashtable_search'
> >
> > In other words, there is a dependency in sim.o, which uses but
> > doesn't define the
> > hashtable_search function. It's not linking because it is missing
> > the hashtable function. In
> > my copy of the TinyOS-2.x cvs, there is a file called hashtable.c
> > in the tos/lib/tossim
> > directory which defines these. I don't know if you have such a
> > file in your version. At any
> > rate, looking at the command being passed to g++, it doesn't seem
> > that this file is being
> > included.
> >
> > This was the command which generated your errors (all the rest just
> > spit out warnings):
> >
> > g++ -fpic -shared -W1,--enable-auto-image-base build/micaz/
> > pytossim.o build/micaz/sim.o
> > build/micaz/tossim.o -L/usr/lib/python2.3/config -lpython2.3-lstdc+
> > + -o _TOSSIM.dll
> >
> > I hesitate to say that this will help, since I haven't even tried
> > to compile the program myself,
> > but it might help to insert 'hashtable.c' in the arguments if you
> > have the file, right before
> > the first 'build/...'. Perhaps?
>
> The hashtable code is compiled into c-support.o, which isn't being
> linked in. This is because sim-cygwin is an old Makefile. The new
> Makefile links it in.
how do i get the new Makefile and how do i link it? Do i need to download
and reinstall tinyos or something?
Also i tried using 'make micaz sim' , but this throws numerous
'undefined_reference' errors like say
/opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx:3065: undefined reference to
`_Py
Long_FromUnsignedLong'
build/micaz/pytossim.o(.text+0xdc71):/opt/tinyos-2.x
/tos/lib/tossim/tossim_wrap.
cxx:3065: undefined reference to `_PyInt_FromLong'
build/micaz/pytossim.o(.text+0xdcca): In function
`_Z22SWIG_From_long_SS_longx':
/opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx:3073: undefined reference to
`_Py
Long_FromLongLong'
build/micaz/pytossim.o(.text+0xdcda):/opt/tinyos-2.x
/tos/lib/tossim/tossim_wrap.
cxx:3073: undefined reference to `_PyInt_FromLong'
build/micaz/pytossim.o(.text+0xdd43): In function
`_Z23SWIG_FromCharPtrAndSizePK
cj':
/opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx:2955: undefined reference to
`_Py
String_FromStringAndSize'
build/micaz/pytossim.o(.data+0x1a0): In function `SWIG_TypeCompare':
/opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx:398: undefined reference to
`_PyO
bject_GenericGetAttr'
collect2: ld returned 1 exit status
make: *** [sim-exe] Error 1
I checked the tinyos-help thread on this. It says i need to change the
sim.extra file to reflect the correct python version (in my case it is 2.3.4).
I made this change to the sim.extra file. The help also says i need to have
/usr/lib/pythonX.Y , but i do not have anything in my /usr/lib directory ,
but have a directory by name 'python2.3' at location /lib/python2.3 I
copied this directory to /usr/lib , but this does not work.
Now how do i get over this? Which rpm for python-devel do i need to
download? Where can i find it? will it work for cygwin?
I know these are too many questions but please do let me know
Preeti
Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061212/34ae7649/attachment.html
More information about the Tinyos-help
mailing list