LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-08-2012, 10:52 AM   #1
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Rep: Reputation: Disabled
NS2.34 error in Ubuntu 12.04 LTS


hi
am having difficulties with ns2.34, i mean while trying to install it i got the following error
Code:
g++: error: simulation: No such file or directory
make: *** [tools/random.o] Error 1
Ns make failed!
does anyone have an idea on how to solve it
thanx
 
Old 08-08-2012, 11:15 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
sudo apt-get install g++-4.4

And read http://erl1.wordpress.com/2011/10/14...neiric-ocelot/

Then :
cd ns-allinone-2.34/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
( No need to edit any Makefile's, when the command
'export CC=gcc-4.4 CXX=g++-4.4' is used.)

.
 
Old 08-08-2012, 11:50 AM   #3
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Yeah I thought it was the about gcc and g++ as well
So I did try to update them!and the exact version
Of my cc is 4.4, But nothing comes out of it
! But will try it again and let you know soon!
Thanks one more time
 
Old 08-09-2012, 04:21 AM   #4
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
sudo apt-get install g++-4.4

And read http://erl1.wordpress.com/2011/10/14...neiric-ocelot/

Then :
cd ns-allinone-2.34/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
( No need to edit any Makefile's, when the command
'export CC=gcc-4.4 CXX=g++-4.4' is used.)
i thought it was a permission error while doing ./install so i got to do sudo ./install, and it gives me the random.o problem again. i will remove all the gcc and try to update and export to see
.
well now am getting this message
Code:
tcl8.4.18 make succeeded.
Warning: tclStubInit.c may be out of date.
Developers may want to run "make genstubs" to regenerate.
This warning can be safely ignored, do not report as a bug!
Installing libtcl8.4.a to /home/williams/ns-allinone-2.34/lib/
cp: cannot create regular file `/home/williams/ns-allinone-2.34/lib/#inst.4575#': Permission denied
rm: cannot remove `/home/williams/ns-allinone-2.34/lib/libtcl8.4.a': Permission denied
mv: cannot stat `/home/williams/ns-allinone-2.34/lib/#inst.4575#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.4.18 installation failed.
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.

Last edited by r0w225; 08-09-2012 at 04:25 AM.
 
Old 08-09-2012, 05:22 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
? May be the "Erlend edits" won't work with Ubuntu 12.04 ?
( You could try to follow his advices strictly.)

But : Better start from scratch with a new unpacked
ns-allinone-2.34.tar.gz for every retry.
Alternatively : 'make clean' in all applications,
and delete all the generated 'Makefile', if any.
( tcl8.4.18/unix/, tk8.4.18/unix/, otcl*/, tclcl*/ etc. etc.)

The method I am using : A gcc41-compat*, gcc version 4.1.2.
A 32bits Ubuntu 12.04 is required. No edits at all, ns-2.34.
( gcc41-compat* / g++41-compat works with ns-allinone -2.27..-2.34 ).

The command 'uname -m' will reply with your architecture :
i686 (32bits) or x86_64 (64bits).

.
 
Old 08-09-2012, 05:27 AM   #6
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by knudfl View Post
? May be the "Erlend edits" won't work with Ubuntu 12.04 ?
( You could try to follow his advices strictly.)

But : Better start from scratch with a new unpacked
ns-allinone-2.34.tar.gz for every retry.
Alternatively : 'make clean' in all applications,
and delete all the generated 'Makefile', if any.
( tcl8.4.18/unix/, tk8.4.18/unix/, otcl*/, tclcl*/ etc. etc.)

The method I am using : A gcc41-compat*, gcc version 4.1.2.
A 32bits Ubuntu 12.04 is required. No edits at all, ns-2.34.
( gcc41-compat* / g++41-compat works with ns-allinone -2.27..-2.34 ).

The command 'uname -m' will reply with your architecture :
i686 (32bits) or x86_64 (64bits).

.
yeah i have started from crash and it has installed perfectly (had to fix some bugs --ranvar.o, Mac-802.11Ext.h..), now am setting my environment and adding some new protocols /modules and i hope it wont bug again! let you know when am done . thanks one more time

Last edited by r0w225; 08-09-2012 at 05:32 AM.
 
Old 08-09-2012, 05:51 AM   #7
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
new error
when i do : Make clean it says permission denied, so i sudi su
then after make clean , i did "make depend" which gives me the following error
Code:
root@williams-Veriton-M680G:/home/williams/ns-allinone-2.34/ns-2.34# make dependmake: *** No rule to make target `tcp/linux/tcp_naivereno.cc', needed by `depend'.  Stop.
 
Old 08-09-2012, 06:40 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#7
Quote:
Make clean
It's 'make clean', not 'Make clean'.
And : If you use 'sudo' ( or root ) for any commands in
home/williams/ns-allinone-2.34/ns-2.34 : Troubles to come,
i.e. you will have no access as unprivileged user.
May be you will have to start from scratch, and then: no sudo at all.

Quote:
`tcp/linux/tcp_naivereno.cc'
There is no tcp/linux/tcp_naivereno.cc, but tcp/linux/tcp_naivereno.c
.. Unless you added a file.cc ?

.
 
1 members found this post helpful.
Old 08-09-2012, 06:45 AM   #9
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
#7

It's 'make clean', not 'Make clean'.
And : If you use 'sudo' ( or root ) for any commands in
home/williams/ns-allinone-2.34/ns-2.34 : Troubles to come,
i.e. you will have no access as unprivileged user.
May be you will have to start from scratch, and then: no sudo at all.


There is no tcp/linux/tcp_naivereno.cc, but tcp/linux/tcp_naivereno.c
.. Unless you added a file.cc ?

.
indeed i checked in the directory and there isnt , idont know why this error is anoying me, ..for 'make' its a mistake while i was typing this post ,i know that its not capital "M"... but good news everything is working fine and i can keep on with my simulation...
thank you so much i mark it as solved
you right about the sudo thing. the root will lock it but for now i will just finish what i have to do and start over again. ;-)

Last edited by r0w225; 08-09-2012 at 06:48 AM.
 
1 members found this post helpful.
Old 04-04-2014, 06:58 AM   #10
Mayank2933
LQ Newbie
 
Registered: Mar 2014
Posts: 6

Rep: Reputation: Disabled
how to change make target from .cc to .c

I also found out that there is no naivereno.cc but naivereno.c. so now what to do, and how to make the "make depend" work properly , pls help , i am new to ns2 and fedora
 
Old 04-04-2014, 07:29 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #10 , @Mayank2933 : Welcome to LQ.

'make depend' is something that is done automatically,
with the ./install command in the top directory.
No reason to repeat the 'make depend', if you redo e.g.make in ns-2.xx/.

I know that somebody wrote 'make depend' in a paper (many?) years ago,
and that a lot of students just repeat writing 'make depend' in their "copy advise".
But I have never experienced a situation where it actually was required.
Conclusion : Skip 'make depend'. Or run ./install , if you edited Makefile.in .


-

Last edited by knudfl; 04-04-2014 at 07:32 AM.
 
1 members found this post helpful.
Old 04-04-2014, 12:10 PM   #12
Mayank2933
LQ Newbie
 
Registered: Mar 2014
Posts: 6

Rep: Reputation: Disabled
another error while make

Quote:
Originally Posted by knudfl View Post
Post #10 , @Mayank2933 : Welcome to LQ.

'make depend' is something that is done automatically,
with the ./install command in the top directory.
No reason to repeat the 'make depend', if you redo e.g.make in ns-2.xx/.

I know that somebody wrote 'make depend' in a paper (many?) years ago,
and that a lot of students just repeat writing 'make depend' in their "copy advise".
But I have never experienced a situation where it actually was required.
Conclusion : Skip 'make depend'. Or run ./install , if you edited Makefile.in .


-
Thanks a lot knudfl, it was great to have quick reply .
Actually i have installed ns2.34 successfully. now i have to add leach to it. I have downloaded leach code and installing file from http://arungupta.co.in/blog/?p=113 and, now after skipping make depend, and running make i am getting this error :

Assembler messages:
Fatal error: can't create mit/rca/energy.o: Permission denied
make: *** [mit/rca/energy.o] Error 1

what can be the possible flaw and how may i remove it.
 
Old 04-04-2014, 12:40 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 12 .
Quote:
... mit/rca/energy.o: Permission denied
.
what can be the possible flaw and how may i remove it
The permissions are looking OK here in the "ns-234-leach-arungupta" package.
? Did you unpack the files with $ sudo tar xvf ns-234-leach.tar.gz ?
.. Then you have no access to all the files. No "sudo" in ns2, please.
Suggest : cd mit/rca/ , and then delete the old unusable <files>.o
.. And the same in mit/uAMPS/.

-

Last edited by knudfl; 04-04-2014 at 12:43 PM.
 
1 members found this post helpful.
Old 04-04-2014, 01:16 PM   #14
Mayank2933
LQ Newbie
 
Registered: Mar 2014
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 12 .

.. Then you have no access to all the files. No "sudo" in ns2, please.
Suggest : cd mit/rca/ , and then delete the old unusable <files>.o
.. And the same in mit/uAMPS/.

-
no sudo is used in the shell script. for the above problem i changed to root user and then tried , it worked this time. But now i have another problem . According to the blog i should get some specific error upon running ./leach_test , but that error is not showing up in leach.err. instead the error is :

./leach_test: line 37: ns: command not found

but still i tried to run leach.out . and here it says again permission denied.
 
Old 04-04-2014, 05:04 PM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 14 .

May be no 'ns' was ever created ?

If the file ns-allinone/ns-2.34/ns is present, please do :
$ cd ns-allinone/ns-2.34/ && sudo make install
.. I.e. 'make install' will copy ns to a system PATH = /usr/local/bin/

-
 
1 members found this post helpful.
  


Reply

Tags
chmod



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 on Ubuntu 12.04 LTS 20deoctubre Linux - Laptop and Netbook 3 05-09-2012 10:49 AM
Need Help in the NS2 error on Ubuntu maneshmotts Ubuntu 0 02-25-2012 01:20 AM
No enough space error when trying upgrade ubuntu from 8.04 lts to 10.04 lts flik shen Ubuntu 5 06-15-2010 12:44 PM
ns2.1b9 install on ubuntu 10.04 LTS mohxinn Linux - Software 1 06-02-2010 03:08 PM
LXer: I update Ubuntu 6.06 LTS and 8.04 LTS ... one has SSH issues, one does not LXer Syndicated Linux News 0 05-20-2008 07:30 AM

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

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