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 12-14-2006, 04:03 AM   #1
newbie06
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
problem with re-make in ns


hi everybody,

i've added some files in my subdirectories which i'm currently working. when i tried to re-make (which i've already re-configure), it returned an error message:

make:***No rule to make target `apps/sctp_app1.cc', needed by `apps/sctp_app1.o'. Stop.

can anybody tell me what is the problem?

thank you in advance for your help..
 
Old 12-14-2006, 10:35 PM   #2
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
There is a problem in your Makefile. make has a number of suffix rules. The rules tell it how to handle different types of files such as C source code or an object file. Somewhere in your Makefile is a line with a target of apps/sctp_app1.o. That means you'll see apps/sctp_app1.cc to the right of a colon. Something like this...
Code:
apps/sctp_appl1.o: apps/sctp_app1.cc
There may be more than one entry to the right. Notice that this entry has .cc on the end of it. That's no good because make does have a rule for that type of file. It should most likely be .c. make does not have any rules for a .cc filetype. Change it to .c and it will probably run to completion.

Bill

Last edited by wmakowski; 12-15-2006 at 07:20 AM.
 
Old 12-15-2006, 10:51 PM   #3
newbie06
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
hi wrnakowski,

thank you for your reply..I have checked into Makefile and there is no such line of 'apps/sctp_appl1.o: apps/sctp_app1.cc' or even 'sctp_app1.cc'..it returned an error message; 'pattern not found: sctp_app1.cc'. what i have found is that a line containing a suffixes like this:

.SUFFIXES: .cc # $(.SUFFIXES)

.cc.o:

@rm -f $@
$(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc

.c.o:
@rm -f $@
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c

Is that line have something to do with my problem? or is there any other line that affect my Makefile? what i have to do to solve this prblem? Thank you for your help.
 
Old 12-16-2006, 12:05 AM   #4
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
My apologies, I was wrong about the .cc. That is a C++ program and if things are laid out properly in the makefile this error should not be happening. In makefiles there are typically a lot of macros that substitute names of files, commands, all kinds of parameters, etc. It is difficult for me to understand what is going on without being able to go through the makefile. If you want me to try and take a look, you can email it to me. Click on my name on the left side of the post and choose the send email option. I will forewarn you though, if it is a large package makefiles typically pass other macro information from higher level makefiles. I may not be able to solve this one without seeing the big picture.

Bill
 
Old 12-16-2006, 02:31 AM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Usually when you want to reconfigure you need to do a "make clean" first. Then, "./configure --options".
 
Old 12-16-2006, 07:47 AM   #6
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
True, but newbie06 already told us he reconfigured. Also, it says he is adding files to his subdirectory. The beauty of make is it will only recompile anything that has changed. This error leads me to believe that something is wrong with the makefile, not the steps taken to perform a standard install.

Bill
 
Old 12-17-2006, 12:43 AM   #7
newbie06
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Wink re: problem with re-make in ns

hi wmakowski and all,

Thank you again for your response and effort to understand my problem..I really appreciate it. The good news is I have already solve the problem by downloaded the original ns2.26, and install it again, set the environment path, validate,..bla..bla.. (although it takes me the whole day to do it), re-download the files I've mentioned before, put them in their respected directories, and try to re-configure and re-make ns..and it works!!!..I think may be I have accidently deleted some files before, that's why I got the error. Sorry..for my mistake..By the way, thank you so much for your help Bill, hope you can help me again in the future...Thanks..
 
  


Reply



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
Make Trouble linking some fortran code Make file problem? any ideas? TheBrick Linux - General 0 05-17-2006 11:21 AM
make xconf;make gconf problem Soqool Linux - Newbie 3 06-12-2005 12:00 PM
Problem with Configure, Make, Make Install n8tgc Linux - Newbie 2 07-13-2004 03:16 PM
make clean, make dep problem carscht Linux - Newbie 2 02-21-2004 10:32 AM
make dep,make clean,make bzImage problem Babba Linux - Newbie 2 01-08-2003 03:49 AM

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

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