LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   insllation of gives trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program error (https://www.linuxquestions.org/questions/linux-newbie-8/insllation-of-gives-trace-cmu-trace-cc-1531-9-error-stray-%91%5C342%92-in-program-error-4175444102/)

rakeshpanchiwala 01-04-2013 02:34 AM

insllation of gives trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program error
 
Hello sir,

I want to install leach in ns2.34 in ubuntu12.04 but i found error like...

trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\231’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\231’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\231’ in program
make: *** [trace/cmu-trace.o] Error 1

So please help me to solve my problem to run leach..
Please send me reply as quick as possible.

NevemTeve 01-04-2013 02:58 AM

Dear sir, you have invalid characters in your file at the listed positions.

knudfl 01-04-2013 04:03 AM

Welcome to LQ.

How about some more information ?
Is it about LEACH for ns-2.34 ? Or ns-2.27 ? Ubuntu 12.04 - 32 ?
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

The easy way is to use a dedicated gcc41 / g++41 ( ver. 4.1.2 ).
Example, post # 18 here ..
http://www.linuxquestions.org/questi...022/page2.html

.

chandanratnani 03-16-2013 02:14 AM

make error in ns2.29
 
@ knudfl

hello sir
I am installing broadcasting protocol in ns2.29 & ubuntu10.04
I got this error....please help

trace/cmu-trace.cc:1: error: stray ‘\357’ in program
trace/cmu-trace.cc:1: error: stray ‘\273’ in program
trace/cmu-trace.cc:1: error: stray ‘\277’ in program
make: *** [trace/cmu-trace.o] Error 1

knudfl 03-16-2013 02:32 AM

# 4 .
Quote:

I am installing broadcasting protocol in ns2.29 & ubuntu10.04
Which "broadcasting protocol" is it about ? ? A file name please.

First : "ns-allinone-2.29.3.tar.gz" must be used :
Is an updated version, to use gcc-4.1 / g++-4.1 .
Install : export CC=gcc-4.1 CXX=g++-4.1 && ./install

If you then do changes in ns-allinone-2.29/ns-2.29/ after the install,
and you do a reconfigure, please use : export CXX=g++-4.1 && ./configure
... and make sure that ns-2.29/Makefile has : CPP = g++-4.1


-

chandanratnani 03-16-2013 04:05 AM

@ knudfl

I am adding multihop broadcast protocol for VANET.
I have implemented it in ns2.29 , gcc-4.1 an ubuntu10.04
when I make change to some file and do make i am getting below error

change made by me are as :ns-allinone2.29/ns2.29/

/common/packet.h
- add inside packet_t
PT_BROADCASTBASE,
before PT_NTYPE

- add inside p_info class
name_[PT_BROADCASTBASE]="BroadcastMSG";
before_[PT_NTYPE]="undefined";

/common/ns-process.h
- add inside AppDataType
BBCAST_DATA,
before ADU_LAST

/tcl/lib/ns-packet.tcl
- add in the foreach prot
BroadcastBase
at the end

/trace/cmu-trace.cc
- in the void CMUTrace::format(Packet* p, const char *why) function
add inside the inner case:
case PT_BROADCASTBASE:
format_msg(p, offset);
break;

/tcl/lib/ns-default.tcl
- add
Application/BroadcastbaseApp set bmsg-interval_ 15
Application/BroadcastbaseApp set bsize_ 100


/broadcast/
- create folder and copy:
BroadcastbaseAgent.cc BroadcastbaseAgent.h
BroadcastbaseApp.cc BroadcastbaseApp.h
bbcast-packet.cc bbcast-packet.h

/Makefile
- inside OBJECT_CC add file depends :
broadcast/bbcast-packet.o
broadcast/BroadcastbaseAgent.o
broadcast/BroadcastbaseApp.o

Now you can run:
- make clean
- make depend
- make
in the ns2 root directory

start simulation:
- ns broadcast.tcl

error :

root@ubuntu:~# ns
ns:
[code omitted because of length]
: invalid command name "Application/BroadcastbaseApp"
while executing
"Application/BroadcastbaseApp set bmsg-interval_ 15"

knudfl 03-16-2013 05:39 AM

# 6 .
Quote:

I am adding multihop broadcast protocol for VANET.
Please provide a link to the instructions you have used.


Quote:

[code omitted because of length]
: invalid command name "Application/BroadcastbaseApp"
Something is wrong with the code that you compiled into the executable 'ns'.

-

chandanratnani 03-16-2013 05:45 AM

@ knudfl
fastbroadcast protocol given on this page..

http://www.math.unipd.it/~cpalazzi/fastbroadcast.html

knudfl 03-16-2013 08:06 AM

# 8 : OK, fastbroadcast.zip
http://www.math.unipd.it/~cpalazzi/r...tbroadcast.zip

I have made up a new fastbroadcast package, all the edited files
+ a Makefile.in : fastbroadcast-ns229.patch.tar.gz
Link https://docs.google.com/file/d/0B7S2...it?usp=sharing

So it's quite easy to build an ns-2.29.3 with the 'fastbroadcast' now:
cd ns-allinone-2.29/ ; tar xvf fastbroadcast-ns229.patch.tar.gz ;
export CC=gcc-4.1 CXX=g++-4.1 && ./install

Ubuntu 10.04, 32bits (i686) :
No errors. $ ns : OK. $ cd fastbroadcast/ ; $ ./start.sh : OK,
runs 5 - 10 minutes, and creates a lot of files, 42 times *.eps, etc.

-

chandanratnani 03-16-2013 11:59 AM

@knudfl

thank you very much knudfl...it's working...
I need graph.. what i have to do to plot this graph..as gnuplot not found error comes..

in terminal :

plotting data ...
./start0.sh: 27: gnuplot: not found
./start0.sh: 37: gnuplot: not found
./start0.sh: 47: gnuplot: not found
./start0.sh: 57: gnuplot: not found
./start0.sh: 67: gnuplot: not found
./start0.sh: 77: gnuplot: not found
./start0.sh: 87: gnuplot: not found

knudfl 03-16-2013 01:46 PM

# 10.

...... So why not install 'gnuplot' ? ?

The package name is : gnuplot
http://packages.ubuntu.com/lucid/gnuplot

-

chandanratnani 03-26-2013 01:40 AM

@ knudfl

hello sir
can i install this same patch of fastbroadcast in ns2.34 ?

knudfl 03-26-2013 12:39 PM

# 12 .

Why do you want to install fastbroadcast in ns-2.34 ? ?

chandanratnani 03-27-2013 02:27 AM

@ knudfl

hello sir

which mobility simulator works with ns2.29?

I have to give mobility to node for fastbroadcast protocol.

please help me

wahidahpsp@yahoo.com 04-24-2013 11:59 PM

Hi!
I compiled the fastbroadcast protocol in NS2.35 and Ubuntu 12.04.

I'm sorry, I had installed this version first, then later I found out about Fastbroadcast.

Referring to the above replies of you on the posted question, does it mean Fastbroadcast cannot be run under the new version? I tried to compile it, but error occurs as below :

noises car 5 src node 399
num_nodes is set 400
INITIALIZE THE LIST xListHead
invalid command name "Agent/Broadcastbase"
while executing
"Agent/Broadcastbase create _o30 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/Broadcastbase"
(procedure "create_nodes" line 13)
invoked from within
"create_nodes"
(file "broadcast.tcl" line 135)

If the only way to solve this error is to install the ns2.29, then I have to uninstall the ns2.35. Is it the right way? Uninstall the current ubuntu and ns version and install the dedicated version for fastbroadcast?

Thank you very much.


All times are GMT -5. The time now is 07:55 PM.