[Tinyos-help] can't Blink with 'make micaz sim '
Philip Levis
pal at cs.stanford.edu
Mon Dec 11 08:42:40 PST 2006
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.
Phil
More information about the Tinyos-help
mailing list