tinyos-help,您好!
My system: x86_64 processor, gentoo-linux with gcc 4.1.1, TinyOS 2.0
installed from sourceforge
When I tested my installation by "make micaz sim" in directory
$TOSROOT/apps/Null, got error below:
mkdir -p build/micaz
placing object files in build/micaz
writing XML schema to app.xml
compiling NullAppC to object file sim.o
ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\)
-finline-limit=100000 -Wall -Wshadow -Wnesc-all -target=micaz
-fnesc-cfile=build/micaz/app.c -board=micasb -Wno-nesc-data-race NullAppC.nc
-fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants
-fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags
-fnesc-dumpfile=app.xml
compiling Python support and C libraries into pytossim.o, tossim.o, and
c-support.o
g++ -c -shared -fPIC -o build/micaz/pytossim.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim -DHAVE_CONFIG_H
g++ -c -shared -fPIC -o build/micaz/tossim.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/tossim.c -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim
g++ -c -shared -fPIC -o build/micaz/c-support.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/hashtable.c -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim
/home/tos2/tinyos-2.x/tos/lib/tossim/hashtable.c: In function 'void*
hashtable_search(hashtable*, void*)':
/home/tos2/tinyos-2.x/tos/lib/tossim/hashtable.c:180: error: cast from 'void*'
to 'int' loses precision
make: *** [sim-exe] Error 1
So, I fixed the corresponding error by changing "if (int(e->v) == 0x477fed00)
{" to " if (int64_t(e->v) == 0x477fed00) {". However, another error occurs:
mkdir -p build/micaz
placing object files in build/micaz
writing XML schema to app.xml
compiling NullAppC to object file sim.o
ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\)
-finline-limit=100000 -Wall -Wshadow -Wnesc-all -target=micaz
-fnesc-cfile=build/micaz/app.c -board=micasb -Wno-nesc-data-race NullAppC.nc
-fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants
-fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags
-fnesc-dumpfile=app.xml
compiling Python support and C libraries into pytossim.o, tossim.o, and
c-support.o
g++ -c -shared -fPIC -o build/micaz/pytossim.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim -DHAVE_CONFIG_H
g++ -c -shared -fPIC -o build/micaz/tossim.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/tossim.c -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim
g++ -c -shared -fPIC -o build/micaz/c-support.o -g -O0
/home/tos2/tinyos-2.x/tos/lib/tossim/hashtable.c -I/usr/include/python2.3
-I/home/tos2/tinyos-2.x/tos/lib/tossim
linking into shared object ./_TOSSIMmodule.so
g++ -shared -fPIC build/micaz/pytossim.o build/micaz/sim.o
build/micaz/tossim.o build/micaz/c-support.o -lstdc++ -o _TOSSIMmodule.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
build/micaz/sim.o: relocation R_X86_64_PC32 against `sim_log_eq' can not be
used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [sim-exe] Error 1
Any suggestion? Is a compatibility problem with gcc 4.1.1?
Thanks in advance.
致
礼!
何滔
[EMAIL PROTECTED]
2007-04-24
pikaqu.gif
Description: GIF image
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
