LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2012, 10:40 PM   #1
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Rep: Reputation: Disabled
make error in ns2.29 when adding new protocol


plz help,

I am adding a new protocol to ns2.29 called MPOLSR.
After making the required changes when I run make I am getting this error:
no rule to make target 'olsr/OLSR.0' needed by ns.

Anyone can explain this what does it mean and how to resolve it.
 
Old 03-08-2012, 01:28 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ. .. ..

Looks like a typo. The .o (for object) must be a lower case o, not a zero ( 0 ).

You can download a package ns-2.29_mpolsr.rar, that includes
the MP-OLSR changes, and see for yourself ...
http://www.jiaziyi.com/documents/SER....29_mpolsr.rar
( http://jiaziyi.com/MP-OLSR.php )
Code:
grep -in OLSR.o Makefile
253:    olsr/OLSR.o olsr/OLSR_state.o olsr/OLSR_rtable.o olsr/OLSR_printer.o \
254:    mpolsr/MPOLSR.o mpolsr/MPOLSR_state.o mpolsr/MPOLSR_m_rtable.o mpolsr/MPOLSR_printer.o mpolsr/MPOLSR_rtable.o\

Last edited by knudfl; 03-08-2012 at 01:30 AM.
 
1 members found this post helpful.
Old 03-08-2012, 04:27 AM   #3
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
After I made the necessary changes according to the tutorial to implement a new protocol by Francisco J. Ros,I am getting these errors:

trace/cmu-trace.cc: In member function 'void CMUTrace:: format_mpolsr(Packet*, int)' :
trace/cmu-trace.cc:963: error: 'MPOLSR_pkt' was not declared in this scope
trace/cmu-trace.cc 963: error: 'op' was not declared in this scope
trace/cmu-trace.cc 963: error: 'PKT_MPOLSR' was not declared in this scope
trace/cmu-trace.cc 974: error: 'MPOLSR_HELLO_MSG' was not declared in this scope
trace/cmu-trace.cc 976: error: 'MPOLSR_TC_MSG' was not declared in this scope
trace/cmu-trace.cc 996: error: 'MPOLSR_HELLO_MSG' was not declared in this scope
trace/cmu-trace.cc 998: error: 'MPOLSR_TC_MSG' was not declared in this scope
trace/cmu-trace.cc 1018: error: 'MPOLSR_HELLO_MSG' was not declared in this scope
trace/cmu-trace.cc 1020: error: 'MPOLSR_TC_MSG' was not declared in this scope
make : *** [trace/cmu-trace.o] Error 1

I compared the changes done by Jiaziyi and there was no difference.I would be thnkful if someone could help me.Plz
 
Old 03-08-2012, 05:13 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Well, I get no errors : ns-2.29_mpolsr.rar .
ns-2.29_mpolsr/ was added to an already compiled ns-allinone-2.29(.3)
and : cd ns-allinone-2.29/ns-2.29_mpolsr/ && make clean,
and also "make clean" in indep-utils/ :
The most deleting of the binaries in indep-utils must be done manually.

The new objects were added into the ns-2.29_mpolsr/Makefile.in, and :
export CC=gcc34 CXX=g++34 && ./configure && make : a new ns is created.

Your gcc / g++ version 3.4.6 may have different binary names.

Which Linux OS is used ? Like Ubuntu 10.04, CentOS 5, Fedora 16.
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

.

Last edited by knudfl; 03-08-2012 at 05:33 AM.
 
Old 03-08-2012, 05:47 AM   #5
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
My OS is Fedora 9.

Could you please explain how did you added the MPOLSR protocol.
I mean in ns-2.29_mpolsr there is another ns-2.29_mpolsr,so I am a bit confused.

Plz help.
 
Old 03-08-2012, 06:01 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Fedora 9 : # yum install compat-gcc-34-c++

May be your own work will do ? When you use the right compiler, g++34.


I didn't add any protocol. Just the Makefile.in edits.
"ns-2.29_mpolsr" is a complete ns-2.29 with mpolsr already added.
The extra folders like ns-2.29_mpolsr/um-olsr-0.8.8/ is the authors
"work directory" : Not to be used. ( The original patch.)

If you have ns-allinone-2.29/ns-2.29_mpolsr/ns-2.29_mpolsr/ :
May be you added ns-2.29_mpolsr/ twice ? ?
.
 
Old 03-08-2012, 06:16 AM   #7
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
I am running Fedora on a virtual machine as In fedora 9 wifi doesn't work.
So how can I can install gcc3.4 compiler offline.
 
Old 03-08-2012, 06:33 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
g++34 : Three packages are required, in this order
( If you install one at a time.)

compat-gcc-34, compat-libstdc++-33, compat-gcc-34-c++

32bits http://archives.fedoraproject.org/pu...y/os/Packages/
64bits http://archives.fedoraproject.org/pu...y/os/Packages/

# rpm -Uvh <package> <package> <package>

.
 
Old 03-08-2012, 06:43 AM   #9
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.
I hope it solves the problem.
But will it uninstall the previous compiler?
 
Old 03-08-2012, 06:50 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
But will it uninstall the previous compiler ?
No. Extra compilers have unique file names. No conflicts.

You can have as many versions of gcc/g++ as you want,
installed at the same time.

.
 
1 members found this post helpful.
Old 03-08-2012, 12:50 PM   #11
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
cd ns-allinone-2.29/ns-2.29_mpolsr/ && make clean,
and also "make clean" in indep-utils/ :
The most deleting of the binaries in indep-utils must be done manually.

The new objects were added into the ns-2.29_mpolsr/Makefile.in, and :
export CC=gcc34 CXX=g++34 && ./configure && make
I followed according what you to wrote.
But now this error is coming:

cannot find input file: tcl/lib/ns-autoconf.tcl.in

If I copy all the folders in ns-2.29_mpolsr/ns-2.29_mpolsr/
to ns-2.29_mpolsr/ then this error is resloved but another error comes:

no rule to make target 'olsr/OLSR.o' needed by ns.

Plz help!!!
 
Old 03-08-2012, 03:48 PM   #12
lucky89
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Rep: Reputation: Disabled
hello
i added the protocol OLSR on ns2.29
$ cd ns-allinone-2.29/ns-2.29/
$ tar zxvf um-olsr-0.8.8.tgz
$ ln -s ./um-olsr-0.8.8 ./olsr
$ patch -p1 < olsr/um-olsr_ns-2.29_v0.8.8.patch but when i tape ./configure for the instalation i have an error

configure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.
please help me
 
Old 03-08-2012, 10:19 PM   #13
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Have you changed the path variables using gedit ~./bashrc?
May be the path has not been set properly.
 
Old 03-10-2012, 12:00 AM   #14
assassin91
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
I have installed the gcc3.4 compiler but the error is still the same:

no rule to make target 'olsr/OLSR.o' needed by ns.

Plz help.
 
Old 03-11-2012, 03:49 PM   #15
lucky89
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Rep: Reputation: Disabled
hello
we have the same prblm
i try to downlad the simulator ns2 witch the protoclo mpolsr is aded i take it http://www.jiaziyi.com/documents/SER....29_mpolsr.rar but the prbl is what are the Environment Variable for exemple for ns2.29
# LD_LIBRARY_PATH
OTCL_LIB=/home/mfouda/ns-allinone-2.29/otcl-1.11
NS2_LIB=/home/mfouda/ns-allinone-2.29/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/mfouda/ns-allinone-2.29/tcl8.4.11/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/mfouda/ns-allinone-2.29/bin:/home/mfouda/ns-allinone-2.29/tcl8.4.11/unix:/home/mfouda/ns-allinone-2.29/tk8.4.11/unix
NS=/home/mfouda/ns-allinone-2.29/ns-2.29/
NAM=/home/mfouda/ns-allinone-2.29/nam-1.11/
PATH=$PATH:$XGRAPH:$NS:$NAM
what about ns2.29_mpolsr exixted on the site of jiazy
 
  


Reply

Tags
mpolsr


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when running make for ns2.30 in Ubuntu 9.10 Labuschagne Linux - Software 32 03-08-2014 01:07 PM
make file error ns2 raji27 Linux - Wireless Networking 6 02-24-2013 09:51 AM
error in adding new protocol in ns2.34 for fedora 14 jothi8 LinuxQuestions.org Member Success Stories 0 03-05-2012 11:33 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration