LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-01-2015, 01:13 PM   #1
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Rep: Reputation: Disabled
dsr/linkcache . fatal error : list.h No such file or directory


How I can fix this error
dsr/linkcache.cc:56:18: fatal error: list.h: No such file or directory
compilation terminated.
I am using NS2.35 and ubuntu-12.04
 
Old 10-01-2015, 03:00 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Welcome to LQ.


ns-2.35 : Right, linkcache.cc apparently wants to use the file list.h .
`list.h' is not present in a contemporary 'Linux OS'.

But I have never seen any errors caused by the missing `list.h'.
Hundreds of builds, many different OS`s, most g++ versions 4.4.4 ... 5.2.0 :
Always with the ./install command : No errors.
**** Please do not use ./configure, 'make' in ns-2.35 ....
The right command for ns235 is './install', in the top directory `ns-allinone-2.35/'.

No errors :
Probably why it hasn't been commented out long time ago.
You can do that with two times slash ( // ) :
// #include <list.h>
.... or you can simply delete the line.


? Any questions ?
Then please supply the essential information : The command causing the error.
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html



-
 
Old 10-02-2015, 05:01 AM   #3
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
make: *** [dsr/linkcache.o] Error 1 Ns make failed!

Quote:
Originally Posted by knudfl View Post
Welcome to LQ.


ns-2.35 : Right, linkcache.cc apparently wants to use the file list.h .
`list.h' is not present in a contemporary 'Linux OS'.

But I have never seen any errors caused by the missing `list.h'.
Hundreds of builds, many different OS`s, most g++ versions 4.4.4 ... 5.2.0 :
Always with the ./install command : No errors.
**** Please do not use ./configure, 'make' in ns-2.35 ....
The right command for ns235 is './install', in the top directory `ns-allinone-2.35/'.

No errors :
Probably why it hasn't been commented out long time ago.
You can do that with two times slash ( // ) :
// #include <list.h>
.... or you can simply delete the line.


? Any questions ?
Then please supply the essential information : The command causing the error.
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html



-
I made // to #include<list.h> at linkcache. The follow message error appear

dsr/linkcache.cc:231:0: warning: "INFINITY" redefined [enabled by default]
./routing/route.h:47:0: note: this is the location of the previous definition
dsr/linkcache.cc:437:58: error: default argument given for parameter 3 of ‘bool LinkCache::findRoute(ID, Path&, int)’ [-fpermissive]
dsr/linkcache.cc:191:7: error: after previous specification in ‘virtual bool LinkCache::findRoute(ID, Path&, int)’ [-fpermissive]
make: *** [dsr/linkcache.o] Error 1
Ns make failed!
 
Old 10-02-2015, 05:06 AM   #4
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I made // to #include <list.h> at linkcache . The following message error appear

dsr/linkcache.cc:231:0: warning: "INFINITY" redefined [enabled by default]
./routing/route.h:47:0: note: this is the location of the previous definition
dsr/linkcache.cc:437:58: error: default argument given for parameter 3 of bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
dsr/linkcache.cc:191:7: error: after previous specification in virtual bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
make: *** [dsr/linkcache.o] Error 1
Ns make failed!
 
Old 10-02-2015, 06:17 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Repeat : Which command are you using ?


Besides that : Get an updated "ns-allinone-2.35" >> ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... Never seen any errors with that package.
Any gcc version 4.4.x .. 5.2.0 can be used.


** The old year 2011 ns-allinone-2.35 : The version -4.4 must be set ...
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install


-
 
Old 10-02-2015, 07:00 AM   #6
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
First I made //#include <list.h> at linkcache then ./install at ns-allinone-2.35
 
Old 10-02-2015, 07:08 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #5.

Ubuntu 12.04 :
$ sudo apt-get update
$ sudo apt-get install g++ g++-4.4 autoconf libtool libxmu-dev xgraph


Quote:
.... then ./install at ns-allinone-2.35
Please read post #5 : The command is not './install'.
But : 'export CC=gcc-4.4 CXX=g++-4.4 && ./install'.

Much better ,,, and may be the solution :
Start from scratch in a new directory (The Desktop/ cannot be used.)
And unpack a new ns-allinone-2.35 :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz


-

Last edited by knudfl; 10-07-2015 at 04:06 AM.
 
Old 10-06-2015, 05:43 PM   #8
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I downloaded NS2.35 from the link you have sent me and installed it with the above steps.
The DSR work with mobicache but when I change the cache type to linkcache then I executed the commands make clean ,, make depend ,, make then the following error appeared

dsr/linkcache.cc:56:18: fatal error: list.h: No such file or directory compilation terminated.
make: *** [dsr/linkcache.o] Error 1


Then I did // to #include<list.h> at linkcache. Then make clean ,, make depend ,, make
The following message error appeared

dsr/linkcache.cc: In member function virtual int LinkCache::command(int, const char* const*):
dsr/linkcache.cc:310:15: warning: deprecated conversion from string constant to char* [-Wwrite-strings]
dsr/linkcache.cc: At global scope:
dsr/linkcache.cc:437:58: error: default argument given for parameter 3 of bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
dsr/linkcache.cc:191:7: error: after previous specification in virtual bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
dsr/linkcache.cc: In member function void LinkCache::dump_dijkstra(int):
dsr/linkcache.cc:728:18: warning: deprecated conversion from string constant to char* [-Wwrite-strings]
dsr/linkcache.cc: In member function void LinkCache::dumpLink():
dsr/linkcache.cc:875:18: warning: deprecated conversion from string constant to char* [-Wwrite-strings]
make: *** [dsr/linkcache.o] Error 1
 
Old 10-07-2015, 03:49 AM   #9
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I run the command ./install, in the top directory ns-allinone-2.35
There is the error meesage

dsr/linkcache.cc:231:0: warning: "INFINITY" redefined [enabled by default]
./routing/route.h:47:0: note: this is the location of the previous definition
dsr/linkcache.cc:437:58: error: default argument given for parameter 3 of bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
dsr/linkcache.cc:191:7: error: after previous specification in virtual bool LinkCache::findRoute(ID, Path&, int) [-fpermissive]
make: *** [dsr/linkcache.o] Error 1
Ns make failed!
 
Old 10-07-2015, 04:44 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #8, #9
Quote:
The DSR work with mobicache but when I change the cache type to linkcache
? Which file was edited ?

Example : You edited xxx.cc, then delete xxx.o , to avoid 'making clean'.

And : Do never use 'make depend' !
'make depend' was executed with the ./install command. Not required more than once.

Conclusion : Delete the one object (file.o), from the file.cc you edited.
And delete 'ns'. Run 'make', to compile the edited file, and to link a new 'ns'.


-
 
Old 10-08-2015, 02:22 PM   #11
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I need to change the type of cache at DSR from mobicache to linkcache. I edited mobicache.cc file by removing // from #ifdef DSR_MOBICACHE and I edited linkcache.cc by adding // to #ifdef DSR_LINKCACHE , so the code of mobicache is not compiled, this leaves linkcache as the only available cache.
note:
I'm sorry but I didn't clearly understand what you meant by delete 'ns'.
 
Old 10-08-2015, 03:36 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #11.

If you have a successful build you get ns-2.35/ns
.. That's is your executable 'ns'.
Can be deleted if you want to link a new 'ns' with your new mobicache.o

.... Is simpler than 'make clean' :
You don't have to compile all ~400 files.cc, just one : mobicache.cc >> mobicache.o
 
Old 10-08-2015, 04:03 PM   #13
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you I understand now
But still my problem exist
When I type locate list.h at terminal this directory appear
/usr/src/linux-headers-3.2.0-29/include/linux/list.h

is there any method to make the file linkcache.cc see this directory?
 
Old 10-08-2015, 05:12 PM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #13.

You can try copying `/usr/src/linux-headers-3.2.0-29/include/linux/list.h'
.. to ns-2.35/common/ ,,, then headers are usually found.

( And may be change #include <list.h>
.. to #include "list.h" ,,, if it isn't found in common/.)


-
 
Old 10-12-2015, 02:03 PM   #15
monasayed
LQ Newbie
 
Registered: Oct 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I copied list.h to ns-allinone-2.35/ns-2.35/common and then made make. This error appear

In file included from dsr/linkcache.cc:56:0:
./common/list.h:6:26: fatal error: linux/poison.h: No such file or directory compilation terminated.

Then I copied the file poison.h to ns-allinone-2.35/ns-2.35/common but again this error appear

In file included from dsr/linkcache.cc:56:0:
./common/list.h:6:26: fatal error: linux/poison.h: No such file or directory compilation terminated.
 
  


Reply

Tags
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
Can not compile gcc, fatal error: stdio.h: No such file or directory StefanTh Linux - Newbie 6 02-10-2014 01:06 AM
[SOLVED] fatal error: asm/mach/dma.h: No such file or directory Rezo Linux - Kernel 5 11-21-2013 06:14 AM
fatal error: goo/gmem.h: No such file or directory; but file does exist!! lgoldma Linux - General 3 03-07-2013 05:00 PM
gcc fatal error :no such file or directory question NoobLion Programming 2 08-26-2011 01:53 AM
[SOLVED] dpkg fatal error unable to open files list file Stale NFS file handle cmr26 Linux - Software 5 09-06-2009 05:10 PM

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

All times are GMT -5. The time now is 09:28 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