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 10-06-2014, 06:01 AM   #1
mhm13819
LQ Newbie
 
Registered: Jan 2013
Distribution: Fedora
Posts: 9
Blog Entries: 1

Rep: Reputation: Disabled
ns-2 error Duplicate case value when compiling


Hello,
I have changed ns2 files and now when I make ns it reports an error saying
"diffusion3/filters/diffusion/one_phase_pull.cc: In member function 'void OnePhasePullFilter:rocessOldMessage(Message*)':
diffusion3/filters/diffusion/one_phase_pull.cc:1106: error: duplicate case value
diffusion3/filters/diffusion/one_phase_pull.cc:1081: error: previously used here
"
Can anyone help me solving this error? Please help me.
 
Old 10-06-2014, 06:29 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,661

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Please describe what you changed, and why.
? This new function / protocol that you have added :
Has it got a name ?
And : Which version of ns-2.xx is it about ? ?

Your edited files.cc, files.h can be attached as files.cc.txt and files.h.txt.
I.e. suffix .txt is a must for text attachments.

* Attachments : The paper clip button in the 'Advanced Editor'.

-
 
Old 10-06-2014, 08:14 AM   #3
mhm13819
LQ Newbie
 
Registered: Jan 2013
Distribution: Fedora
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Please describe what you changed, and why.
? This new function / protocol that you have added :
Has it got a name ?
And : Which version of ns-2.xx is it about ? ?

Your edited files.cc, files.h can be attached as files.cc.txt and files.h.txt.
I.e. suffix .txt is a must for text attachments.

* Attachments : The paper clip button in the 'Advanced Editor'.

-
Dear knudfl
My ns version is ns-2.31. The files I changed are within the ns-2.31 directory such as mobiilenode.h,mobiilenode.cc mac802_11.h,mac802_11.cc,wireless-phy.cc and also adding new files in directories mobiwan and cognitive.
So I run ./configure then make clean and finally make. after some time it gives me that error while I've never changed the one_phase_pull.cc file at all!!!
Please help me to solve this error.
Thank you in advance.
 
Old 10-06-2014, 08:49 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,661

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
← Ref. #3 .

Please do not quote entire posts. A "one word reference" will do.
And : Duplicate posts are no allowed. Will be closed.

Ns-2.31 : OK . Which "mobiwan" and "cognitive" patch did you add ?
Please upload a tar.gz package with your changes / additional files,
→ to e.g. Google Docs → →

→ { mobilenode.h, mobilenode.cc, mac802_11.h, mac802_11.cc,
wireless-phy.cc, etc. + {mobiwan/files, cognitive/files},
{ + the patches that was added for mobiwan, cognitive } }.

And why ns-2.31 ? Is it about "TFRC-CR" ?
(TFRC-CRAN is th only known "patch" with a cognitive/ folder)
https://github.com/abdulla-alali/TFRC-CR

And, repeat : Why did you edit files ? ?


-

Last edited by knudfl; 10-06-2014 at 09:26 AM.
 
Old 10-08-2014, 07:22 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,661

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Continues here http://www.linuxquestions.org/questi...ng-4175521424/

And here http://www.linuxquestions.org/questi...ng-4175521427/
 
Old 10-11-2014, 04:01 AM   #6
mhm13819
LQ Newbie
 
Registered: Jan 2013
Distribution: Fedora
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
ns-2 error Duplicate case value when compiling

Dear knudfl,
Can you solve the problem? Could you access the ns-2.31 file I uploaded????
 
Old 10-11-2014, 04:46 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,661

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
← #6 .

Well, it will take some time to sort out the messy package,
mehran.tar.gz, that you delivered.

So far I have found out that you didn't add any files.
I.e. adding a file-xx.cc doesn't matter,
when it has no entry in the Makefile.in : file-xx.o

Other : CRAHN will not work out of the box
with any mobiwan version added.

Generally about your error :
All things are connected together in ns2.
So declaring something that is already declared in another file,
may cause no compiling / linking issues with those files,
but appear as an error when compiling / linking a third file.


It would help if you can supply an exact list of the edited files.
+ make a package-edited.tar.gz with the edited files / edited code :
*** The line numbers for the edited code etc.
must be thoroughly and comprehensively documented.


-

Last edited by knudfl; 10-11-2014 at 05:02 AM.
 
  


Reply

Tags
crahn-ns2, mobiwan-an, ns2


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
nginx duplicate listen error tt1187 Linux - Newbie 1 05-01-2014 02:48 PM
Perl switch statement throwing error like Bad case statement (invalid case value?) kavil Programming 2 10-07-2010 04:50 AM
does tar or bzip2 squash duplicate or near-duplicate files? garydale Linux - Software 6 11-19-2009 04:43 PM
duplicate/bad IP error on new RedHat 9 install nbcthreat Linux - Networking 2 08-13-2003 03:46 PM
Is there a way to duplicate my system to a CD so just in case i have to format the ma ForumKid Linux - General 3 12-28-2001 12:24 AM


All times are GMT -5. The time now is 08:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration