LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 08-15-2010, 05:50 AM   #1
bilalPolito
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
ns-allinone-2.31 make: *** [tools/random.o] Error 127


Hello,
this is my first question on this forum,hope to get a satisfactory answer.

i have ubuntu 9.10 installed on my laptop with ns-allinone-2.31.
i want to add a new module to NS2. i edited Makefile.in under
/home/ns-allinone-2.31/ns-2.31 directory. whenever i enter command
make -f Makefile.in
i get
make: *** [tools/random.o] Error 127
error.
i have gcc version 4.4.1.

i think some bug in ns-allinone-2.31 or some thing?

thanks
 
Old 08-15-2010, 11:20 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
Welcome to LQ. .. .. ..

The usual approach would be, I think : cp Makefile Makefile-backup
&& cp Makefile.in Makefile.in-backup.
Then edit Makefile.in to include the new object, and run configure
to have a new Makefile created. ( And then run 'make'.)
.. Or you can edit the Makefile itself.
Running make -f Makefile.in is quite unusual.
Makefile and Makefile.in are not identical.
( 'diff Makefile.in Makefile' will show.)

It can of course be an error in your code.
Don't know, what "error 127" means.
..
Attached Files
File Type: txt diff-Makefile.in-Makefile.txt (2.1 KB, 19 views)
 
Old 08-17-2010, 11:21 AM   #3
bilalPolito
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Question Not solved

thanks for reply.
there is no "Makefile" in ns2-31 ,just Makefile.in and makefile.vc.

i edited Makefile.in and added my own project.
when i run command
make
with no arguments it says
make: **** NO targets specified,
thats why i run
make -f Makefile.in
and it gives me error
make: *** [tools/random.o] Error 127

i havent done any thing to built in NS2 classes.
i dont know where is the problem.

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

The usual approach would be, I think : cp Makefile Makefile-backup
&& cp Makefile.in Makefile.in-backup.
Then edit Makefile.in to include the new object, and run configure
to have a new Makefile created. ( And then run 'make'.)
.. Or you can edit the Makefile itself.
Running make -f Makefile.in is quite unusual.
Makefile and Makefile.in are not identical.
( 'diff Makefile.in Makefile' will show.)

It can of course be an error in your code.
Don't know, what "error 127" means.
..
 
Old 08-18-2010, 10:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
Makefle.in is used by 'configure' to create a Makefile.
Makefile.in cannot be used by 'make'.

Just run ./configure to get a Makefile created.
But the correct / best way to do it is :
cd ns-allinone-2.31/ && ./install
Then you are sure, that the four dependencies tcl, tk, otcl, tclcl
are created. ( And can be used, when you compile ns.)

I.e first run install, then :
cd ns-allinone-2.31/ && mv ns ns-backup
And now you can add your own code, and edit Makefile.in + run ./configure.
Or alternatively edit Makefile, and run make.
..
 
1 members found this post helpful.
  


Reply

Tags
ns2, ns231


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I resolve this error: make: *** [HelloWorld.o] error 127 for Eclipse C++ ? drcshavers Red Hat 4 06-05-2010 10:32 AM
Unable to compile C++ programs.make:g++ command not found error.Error 127 PrathuD Programming 3 03-16-2009 12:44 PM
make: *** [primer.o] Error 127 Insomnia6 Linux - Newbie 1 12-16-2008 10:49 AM
module-init-tools-3.1 error 127 Homer Glemkin Linux - Software 0 11-23-2004 11:11 AM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 09:58 AM


All times are GMT -5. The time now is 10:55 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
Open Source Consulting | Domain Registration