[Tinyos-help] Import error TOSSIMmodule.so : Undefined symbol
h s
tinyos.h at gmail.com
Mon Dec 1 14:49:45 PST 2008
Hello all,
I have made my own application called "Routing" in which I am trying to
change the default MAC protocol used in TOSSIM (which is CSMA). I have
modified the file TossimPacketModelC.nc a bit and some interfaces too it.
The application compiles fine as is shown by the output of make below:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bash-3.2$ make micaz sim
mkdir -p simbuild/micaz
placing object files in simbuild/micaz
writing XML schema to app.xml
compiling RoutingAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\) -Wall -Wshadow -Wnesc-all
-target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000
-DIDENT_APPNAME=\"RoutingAppC\" -DIDENT_USERNAME=\"hsahota\"
-DIDENT_HOSTNAME=\"co3208-2.ece.ia\" -DIDENT_USERHASH=0xf3c75442L
-DIDENT_TIMESTAMP=0x49346931L -DIDENT_UIDHASH=0xa37fa72cL
-I/usr/include/python2.4 -Wno-nesc-data-race RoutingAppC.nc
-fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants
-fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags
-fnesc-dumpfile=app.xml
In file included from /opt/tinyos-2.x/tos/lib/tossim/ActiveMessageC.nc:53,
from /opt/tinyos-2.x/tos/system/AMQueueP.nc:43,
from /opt/tinyos-2.x/tos/system/AMSenderC.nc:50,
from RoutingAppC.nc:9:
In component `GainInterferenceModelC':
/opt/tinyos-2.x/tos/lib/tossim/GainInterferenceModelC.nc: In function
`heardSignal':
/opt/tinyos-2.x/tos/lib/tossim/GainInterferenceModelC.nc:78: warning:
declaration of `localNoise' shadows global declaration
/opt/tinyos-2.x/tos/lib/tossim/sim_gain.c:10: warning: location of shadowed
declaration
/opt/tinyos-2.x/tos/lib/tossim/PacketModelC.nc: In function
'PacketModelC$Packet$send':
/opt/tinyos-2.x/tos/lib/tossim/PacketModelC.nc:152: warning: control reaches
end of non-void function
/opt/tinyos-2.x/tos/lib/tossim/PacketModelC.nc: In function
'PacketModelC$Packet$startReceiving':
/opt/tinyos-2.x/tos/lib/tossim/PacketModelC.nc:385: warning: no return
statement in function returning non-void
RoutingC.nc: In function 'RoutingC$setTaskTimer':
RoutingC.nc:67: warning: unused variable 'j'
compiling Python support and C libraries into pytossim.o, tossim.o, and
c-support.o
g++ -c -shared -fPIC -o simbuild/micaz/pytossim.o -g -O0
-DIDENT_APPNAME=\"RoutingAppC\" -DIDENT_USERNAME=\"hsahota\"
-DIDENT_HOSTNAME=\"co3208-2.ece.ia\" -DIDENT_USERHASH=0xf3c75442L
-DIDENT_TIMESTAMP=0x49346931L -DIDENT_UIDHASH=0xa37fa72cL
-I/usr/include/python2.4 /opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx
-I/usr/include/python2.5 -I/opt/tinyos-2.x/tos/lib/tossim -DHAVE_CONFIG_H
g++ -c -shared -fPIC -o simbuild/micaz/tossim.o -g -O0
-DIDENT_APPNAME=\"RoutingAppC\" -DIDENT_USERNAME=\"hsahota\"
-DIDENT_HOSTNAME=\"co3208-2.ece.ia\" -DIDENT_USERHASH=0xf3c75442L
-DIDENT_TIMESTAMP=0x49346931L -DIDENT_UIDHASH=0xa37fa72cL
-I/usr/include/python2.4 /opt/tinyos-2.x/tos/lib/tossim/tossim.c
-I/usr/include/python2.5 -I/opt/tinyos-2.x/tos/lib/tossim
g++ -c -shared -fPIC -o simbuild/micaz/c-support.o -g -O0
-DIDENT_APPNAME=\"RoutingAppC\" -DIDENT_USERNAME=\"hsahota\"
-DIDENT_HOSTNAME=\"co3208-2.ece.ia\" -DIDENT_USERHASH=0xf3c75442L
-DIDENT_TIMESTAMP=0x49346931L -DIDENT_UIDHASH=0xa37fa72cL
-I/usr/include/python2.4 /opt/tinyos-2.x/tos/lib/tossim/hashtable.c
-I/usr/include/python2.5 -I/opt/tinyos-2.x/tos/lib/tossim
linking into shared object ./_TOSSIMmodule.so
g++ -shared -fPIC simbuild/micaz/pytossim.o simbuild/micaz/sim.o
simbuild/micaz/tossim.o simbuild/micaz/c-support.o -lstdc++ -o
_TOSSIMmodule.so
copying Python script interface TOSSIM.py from lib/tossim to local
directory
*** Successfully built micaz TOSSIM library.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
However, while trying to run the simulation using python test.py (which only
contains the line (from TOSSIM import *), I get the following error. I tried
to search the Tinyos help list and found a similar problem faced by someone
before but I couldn't find a solution posted to it.
%%%%%%%%%%%%%%%%%%
bash-3.2$ python test.py
Traceback (most recent call last):
File "test.py", line 1, in ?
from TOSSIM import *
File "/opt/tinyos-2.x/apps/Routing/TOSSIM.py", line 4, in ?
import _TOSSIM
ImportError: /opt/tinyos-2.x/apps/Routing/_TOSSIMmodule.so: undefined
symbol: send_csma_sample_channel
%%%%%%%%%%%%%%%%%%%
Any help in this regard is appreciated.
Thanks,
HS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081201/9f7a1c65/attachment.htm
More information about the Tinyos-help
mailing list