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 12-04-2012, 12:23 PM   #1
Narges
Member
 
Registered: Oct 2011
Posts: 32

Rep: Reputation: Disabled
recompiling .h and .cc files in ns2 does not shows changes made to them


Hi. I'm working in ns-2.29 on fedora 15.
I've made some changes inside already existing header and c++ files in wimax directory in ns2.
I saved the changes, then under /ns-2.29 I applied following:

make clean
make depend
make

to recompile ns2 and I got no errors, I got:
make[1]: Entering directory `/home/N/ns2/ns-allinone-2.29/ns-2.29/indep-utils/cmu-scen-gen/setdest'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/N/ns2/ns-allinone-2.29/ns-2.29/indep-utils/cmu-scen-gen/setdest'
...

which I know its not an error.
but even after recompiling the files,the changed I made are not applied.
when I run my tcl file I get an error.
what should I do to properly compile the codes so it reflects my modifications?
Thanks in advance.
 
Old 12-04-2012, 01:44 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,085

Rep: Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748Reputation: 1748
make DOSE NOT install anything

Code:
su 
make install
will install to the $PREFIX directory ( if used in the makefile)

most programs install to /usr or /usr/local by default


Now some require that YOU manually move the program out of the build folder
or
run in the build folder ( not a good idea )

also
did you restart the very OLD ns 2.29 ( .34 is the current OLD 2 version i think. )

also be advised that fedora 15 is UNSUPPORTED

currently ONLY fedora 16 and 17 are supported and VERY SOON fedora 16 will go END OF LIFE after fedora 18 comes out


DOSE the "makefile" actually have a "clean" section DEFINED ????
not all do ?
if not YOU will have to manually delete the old files YOU defined in the BUILD folder and rebuild
( it is EVER NEVER NEVER YES NEVER a good idea to build software IN your source folder/ working folder )

also "make clean" will NOT remove any prerequisites that needed building
" distclean" will do that IF defined in the makefile
 
Old 12-04-2012, 02:10 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,987

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Yes, everything looks OK.

Quote:
I've made some changes inside already existing header and c++ files in wimax
I guess you will have to show the changes. In code tags, please.
And please tell which files it's about, + specify the edited line numbers.

Also : Please attach your tcl script. As name.tcl.txt .
Attachments : The paper clip tool in the 'Advanced Editor'.


.

Last edited by knudfl; 12-04-2012 at 02:12 PM.
 
Old 12-04-2012, 11:44 PM   #4
Narges
Member
 
Registered: Oct 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Thank you for the reply.

Quote:
make DOSE NOT install anything
Code:
su
make install
But I didnt want to install anything, I just want to recompile the code.

Quote:
did you restart the very OLD ns 2.29 ( .34 is the current OLD 2 version i think. )
Yes I did restart.

Quote:
DOSE the "makefile" actually have a "clean" section DEFINED ????
I dont understand what "clean" section deos, but inside my Makefile.in I can see:

CLEANFILES = ns nse nsx ns.dyn $(OBJ) $(OBJ_EMULATE_CC) \
$(OBJ_EMULATE_C) common/tclAppInit.o \
$(GEN_DIR)* $(NS).core core core.$(NS) core.$(NSX) core.$(NSE) \
common/ptypes2tcl common/ptypes2tcl.o
and
clean:
$(RM) $(CLEANFILES)
and
distclean: distclean-recursive
$(RM) $(CLEANFILES) Makefile config.cache config.log config.status \
autoconf.h gnuc.h os-proto.h $(AUTOCONF_GEN); \
$(MV) .configure .configure- ;\
echo "Moved .configure to .configure-"

distclean-recursive:
for i in $(SUBDIRS); do ( cd $$i; $(MAKE) clean; $(RM) Makefile; ) done
 
Old 12-04-2012, 11:46 PM   #5
Narges
Member
 
Registered: Oct 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Thank you for the reply.
Quote:
And please tell which files it's about, + specify the edited line numbers.
I'm working in Wimax QoS module I downloaded from this Site : http://perso.telecom-bretagne.eu/aymenbelghith/tools/‎
I added new algorithm inside /wimax/scheduling/bsscheduler.h and .cc files. There are some algorithms alreay defined there.
in bsscheduler.h,I decleared my algorithm and in bsscheduler.cc I defined its body, also in command() function I added the algorithm name like other algorithms so when user runs the tcl file and enteres the algorithm name ns runs the algorithm code.

SO,
when I compile using: make clean , make depend , make , I get no errors.
When I run the tcl and choose "M" as algorithm,I get following:
Error! Unknown rtPS scheduling algorithm

This line is written inside commande() function in bsscheduler.cc
I've added my algorithm name inside command() but I dont know why it doesnt recognise it.
 
  


Reply

Tags
ns2, recompile, wimax, wimax-qos


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
[SOLVED] error while recompiling Ns2 makefile.in indumit18 Linux - Software 35 06-02-2014 05:28 AM
I've made changes to DSR in NS2 , but when I run the simulation nothing has changed farzane Linux - Wireless Networking 0 06-26-2012 12:50 AM
[SOLVED] error while recompiling Ns2 indumit18 Linux - Newbie 10 10-14-2011 02:08 AM
error while recompiling ns2 indumit18 Linux - Software 1 09-16-2011 08:14 AM


All times are GMT -5. The time now is 08:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration