 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

13th November 2010, 03:33 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Cant make make work as expected!
Hi,
I have been trying to compile some downloads and make does not behave as it is expected to. Here is a copy of the dir and command that i am currently having trouble with.
Code:
[george@teraquad src]$ dir
algebra.cpp database.hpp interface.h Render3D.h texture.hpp
algebra.hpp files.cpp loadsound.cpp settings.cpp timeline.cpp
callbacks.cpp files.h loadsound.hpp settings.h timeline.hpp
callbacks.h fractal.cpp morph.cpp shaders.cpp undo.cpp
cimage.cpp fractal.h morph.hpp shaders.h undo.hpp
cimage.hpp fractparams.h objects.mk smartptr.h
common_math.cpp image.cpp README.txt sources.mk
common_math.h image.h Release subdir.mk
database.cpp interface.cpp Render3D.cpp texture.cpp
[george@teraquad src]$ make clear
make: *** No rule to make target `clear'. Stop.
[george@teraquad src]$ make all
make: *** No rule to make target `all'. Stop.
[george@teraquad src]$
What is it trying to tell me and how do i fix it? It works fine on my other f14 machine. I am sure i trashed it by installing something over or along side it.
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

13th November 2010, 05:07 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,929

|
|
|
Re: Cant make make work as expected!
Code:
./configure
make
make install
You'll probably need to be root or use sudo / su -c. Do you have all the support / development packages needed?
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

13th November 2010, 07:11 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Re: Cant make make work as expected!
Hi, Thanks for the response.
It seems i just dont know what files need to be present to use the make command.
I tried as root to compile (mandelbulber) and it worked fine. So may be i am jumping the gun.
I dont know what packages i have installed. it's just what came with the standard installation.
Is there a quick way to prove it's operator trouble....
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

13th November 2010, 08:07 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: Cant make make work as expected!
Ahh, yeah, take a look in your post #1 file listing, actually having a file in there called:
GNUmakefile, makefile, or Makefile
would be nice  . See the man page for "make" (espec. the bold part I quote)
Quote:
make executes commands in the makefile to update one or more target names, where name is typically a program. If no -f
option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order.
Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears promi-
nently near the beginning of a directory listing, right near other important files such as README.) The first name
checked, GNUmakefile, is not recommended for most makefiles. You should use this name if you have a makefile that is
specific to GNU make, and will not be understood by other versions of make. If makefile is ‘-’, the standard input is
read.
|
|

13th November 2010, 08:46 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Re: Cant make make work as expected!
Ok, I have learned if it looks like a makefile, that is probably what it is. Also i have learned that they are not necessarily in the top directory. I should look for the Readme to determine any libs that should be installed first. Last but not least read the man page.
I guess i'll attempt to install something else to see if i have another success.
Thanks for all the help. you guys are patient.
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

13th November 2010, 08:55 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: Cant make make work as expected!
The other gotcha is that make is overly sensitive to non-obvious stuff that really shouldn't matter like if you have a rule it has to be indented with a tab and not spaces:
OK:
<tab>clean:
rm -f myfile.o otherfile.so
Not OK
<space><space>clean:
rm -f myfile.o otherfile.so
Your makefile will look just fine to the eye but make will say something obscure like "missing separator"
Last edited by marko; 13th November 2010 at 09:23 PM.
|

13th November 2010, 11:54 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Re: Cant make make work as expected!
That is particular! You could look forever for a problem like that. I guess I have a lot to digest.
Thanks!
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

14th November 2010, 12:23 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: Cant make make work as expected!
Especially peculiar - as it is in the wrong place in the example...
This is the correct example.
clean:
<space><space>rm -f myfile.o otherfile.so
Is wrong, but replacing the spaces with a tab is correct.
The basics are:
Targets start in the first column, and are terminated with a ":".
Following the target are the files the target depends on (which
may be an empty list). I don't remember if the space/tab following
the ":" is mandatory or not - I always use a space/tab as it makes
it easier to scan the file for targets by eyeball.
The rule(s) following the target line are to tell make how to transform
the dependency list into the target. Rules must be indented by a tab.
This is because the line is to be interpreted as a shell command, but
the tab is to distinguish between a target and a rule. Multi-line rules
are allowed, but each line (except the last) must have a "\" at the end.
This tells make that the rule is multi-line. The next line still must start
with a tab.
targets their rules are grouped together to form paragraphs, and an
empty line separates paragraphs.
Make itself is a very simple rules evaluator. The conditions on whether a
rule is executed is determined by the dates on the files representing the
targets and its dependencies. If a dependency file is newer that the target
file, then the target gets remade by executing the rules.
The combination of rules allows make to chain rules together so that
changing/updating any dependency will cause all targets that depend
on that dependency bet remade, and targets that depend on other
targets (such as executables depending on a library, and the library
depending on the source code + include files) will also get remade.
This is also why the targets+rules can be in any order, and still get
processed correctly.
One of the odd gotchas in this comes with network filesystems- the
dependency is depending on the dates assigned to the files as they are
modified. If a client has a date in the future, it is possible for a file to
be updated, but the target (having a date in the future) is not remade.
This also has some issues now that systems are very fast - the time
between dependency update, and target update can be less than a
second- or whatever the resolution of the date recorded with the file is.
Older filesystems (non-64bit based) tend to have a resolution down to
the second. Newer filesystems are into the nanoseconds. This can
introduce some oddities if the filesystem is FAT32/NTFS (not sure on the
NTFS resolution though).
|

14th November 2010, 03:23 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: Cant make make work as expected!
Quote:
Originally Posted by jpollard
Especially peculiar - as it is in the wrong place in the example...
This is the correct example.
clean:
<space><space>rm -f myfile.o otherfile.so
Is wrong, but replacing the spaces with a tab is correct.
|
Sorry I was running from old memory, I just remembered a few times where
a Makefile would fail if a space was used instead of a tab somewhere.
For most people accustomed to coding scripts where the parser doesn't care what the whitespace is or even the amount this is a strange problem.
|

14th November 2010, 03:11 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Re: Cant make make work as expected!
Hi,
Wow, that's a lot to keep track of. I guess it takes more than my 6 months or so to get a handle on things. I didn't realize time was that important. But i can see how it could be.
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

14th November 2010, 04:26 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: Cant make make work as expected!
For the most part, the system handles it automatically.
The only real requirement for program development is just getting
the right rules and targets.
For small projects (5-15 files), this is not a big problem. But when
small projects grow into large ones... there is autoconf. Not perfect,
but it can help. autoconf is a collection of utilities than help maintain
Makefiles using macro expansion, dependency tracing (it can scan
source files looking for includes), and there are some added utilities
that can be used for configuration. These extend the Makefile by
searching for system provided dependencies (include files, libraries,
and such), and provide configurations for local use.
These help in creating portable programs, and make it easier to manage
large projects.
|

14th November 2010, 06:28 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: New Bern NC USA
Age: 56
Posts: 217

|
|
|
Re: Cant make make work as expected!
So what's happening when i type "./configure" before "make" is that the particulars of my environment/machine are gathered. Presenting make with a corrected set of expectations. Well i think i see but it's tough to wrap my rusty brain around. Any good on-line material you would recommend.
__________________
FC 19-64 Q9400 Home Built!
FC 19-64 Sony Vaio VGN-FW190!
FC 19-64 Dell Dimension 9100!
Win XP Dell Dimension 9100!
Droid X Phone, De N4ZPO!
|

14th November 2010, 08:47 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: Cant make make work as expected!
You can start with:
http://www.gnu.org/software/autoconf/
I believe somewhere in their documentation there is a reference manual
as well.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 01:44 (Wednesday, 22-05-2013)
|
|
 |
 |
 |
 |
|
|