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 08-08-2012, 11: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, 12:15 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
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, 12:50 PM   #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, 05: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 05:25 AM.
 
Old 08-09-2012, 06:22 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
? 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, 06: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 06:32 AM.
 
Old 08-09-2012, 06: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, 07:40 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
#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, 07: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 07:48 AM.
 
1 members found this post helpful.
Old 04-04-2014, 07: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, 08:29 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
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 08:32 AM.
 
1 members found this post helpful.
Old 04-04-2014, 01: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, 01:40 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
# 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 01:43 PM.
 
1 members found this post helpful.
Old 04-04-2014, 02: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, 06:04 PM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
# 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


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 on Ubuntu 12.04 LTS 20deoctubre Linux - Laptop and Netbook 3 05-09-2012 11:49 AM
Need Help in the NS2 error on Ubuntu maneshmotts Ubuntu 0 02-25-2012 02: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 01:44 PM
ns2.1b9 install on ubuntu 10.04 LTS mohxinn Linux - Software 1 06-02-2010 04: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 08:30 AM


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