Tech Support > Operating Systems > Linux / Variants > make Makefile
make Makefile
Posted by Allodoxaphobia on March 4th, 2004


Mandrake 9.1 , Kde , fully "updated"

I am unable to "make". I've downloaded the tar.gz's for several
"utility" programs and I *always* have BIG errors on the "make".
The first time I thought: "Broken package." But, it keeps
happening. These have been "simple" programs -- like xclip.
The most recent was with png2ico-src-2002-12-08.tar.gz.
The README says:
:
|To build png2ico on a Unix-like platform simply issue the
|command
| make
|
|You need to have libpng installed. <<<----- I DO.

So,
|[jonesy@nix png2ico]$ make
|make: File name needed.

hmmmm, man make claims:
" If no -f option is present, make will look for the makefiles "
" GNUmakefile, makefile, and Makefile, in that order. "

Well, there _is_ a Makefile.
So,
|[jonesy@nix png2ico]$ make Makefile
|"Makefile", line 1, col 41, terminal 'CPPFLAGS=-W -Wall
-O2 -finline-functions': whitespace in name or alias field
|"Makefile", line 5, col 13, terminal 'all': Illegal character - ^J
|"Makefile", line 5, col 13, terminal 'all': unknown capability 'png2ico'
|"Makefile", line 7, col 17, terminal 'png2ico': Illegal character - .
:
:...and so on for maybe another 30 errors...

Here are the first 8 lines of png2ico's Makefile:
|CPPFLAGS=-W -Wall -O2 -finline-functions
|#CPPFLAGS=-O0 -W -Wall
|DEBUG=-g
|
|all: png2ico
|
|png2ico: png2ico.cpp
| g++ $(CPPFLAGS) $(DEBUG) -o $@ $< -lpng -lz -lm
:

I am fairly new on linux, and an absolute BEGINNER on compiling
programs from source in linux.
My first suspicion is that the "make" I'm running is something
else altogether. But, I think not. I only find one here.
Am I making some bone-headed mistake here? Each of the other
packages I have attempted also state "...just run make..." in the
README. All have failed in the same 'spectacular' manner.

To date I've been able to get past this by ultimately finding
a Mandrake /contrib RPM for what I was after. But, someday
I'll *have* to build from source, and I want to beat this
problem into submission.

Thanks in advance,
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Chris F.A. Johnson on March 4th, 2004


On Thu, 04 Mar 2004 at 21:44 GMT, Allodoxaphobia wrote:
Most packages require ./configure before make.

--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
================================================== =================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License

Posted by Ryan Reich on March 4th, 2004


Allodoxaphobia wrote:
What version make?

$ make -v

If you wanted to specify a makefile, you would type

$ make -f Makefile

for example. What you did was to tell it to build the target "Makefile,"
which probably doesn't exist.

--
Ryan Reich
ryanr@uchicago.edu

Posted by Allodoxaphobia on March 5th, 2004


On Thu, 04 Mar 2004 17:07:57 -0600, Ryan Reich hath writ:
This is all too weird.
|[jonesy@nix jonesy]$ make -v
|make: File name needed. Usage:
| make [-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file
|[jonesy@nix jonesy]$ make -V
|ncurses 5.3.20030215
|

huh?!!!

As I said in my first post "There is (was) a 'Makefile'" in the pkg.
But, I've also been trying make -f xxxx:
|[jonesy@nix png2ico]$ make -f Makefile
|"Makefile", line 1, col 41, terminal 'CPPFLAGS=-W -Wall -O2
| -finline-functions': whitespace in name or alias field

Again, here's line1 in Makefile:

|CPPFLAGS=-W -Wall -O2 -finline-functions

Datapoint: I just uploaded the tar.gz file I'm futzing with
to my shell account (FreeBSD that). I tar -xzvf's the file
there and -- viola! - make "does it".

Does I have some sort of bogus "make" here? !!!!

sigh...
Tnx for your reply!
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Allodoxaphobia on March 5th, 2004


On 4 Mar 2004 22:24:29 GMT, Chris F.A. Johnson hath writ:
And, this one does not. There was no configure file with the
package. Nor, with the xclip package. There was one (IIRC) with
the html2text pkg I also was attempting -- The ./configure
worked - the make did not.

Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Ryan Reich on March 5th, 2004


Allodoxaphobia wrote:
Looks weird, all right. It seems almost as though some other program
called make has been installed in place of the usual make. You say you're
a beginner, so you don't know if make used to work? Where did the program
come from?

A short Google search turns up nothing, but it's very hard to look up
something with a name like "make", or to look up a list of command-line
options.

--
Ryan Reich
ryanr@uchicago.edu

Posted by John J. Trammell on March 5th, 2004


On 5 Mar 2004 01:04:18 GMT, Allodoxaphobia <bit-bucket@config.com> wrote:
Do you perhaps have a script named "make" in your path that's
being run instead?

$ which make
/usr/bin/make


Posted by Allodoxaphobia on March 5th, 2004


On Fri, 5 Mar 2004 02:39:12 +0000 (UTC), John J. Trammell hath writ:
I'd guess this pretty much covers the
bases :
|[jonesy@nix jonesy]$ which make
|/usr/bin/make
|[jonesy@nix jonesy]$ locate make | egrep "\/make$"
|/usr/bin/make
|[jonesy@nix jonesy]$
:

At a slackware shell account:
|[jonz~]ls -ol /usr/bin/make
|-rwxr-xr-x 1 root 103620 Aug 2 1999 /usr/bin/make*

At a FreeBSD shell account:
|[jonz~]ls -ol /usr/bin/make
|-r-xr-xr-x 1 root wheel - 206596 Oct 9 2002 /usr/bin/make

On a small MDK 8.2 box here:
|[jonesy@cathie jonesy]$ ls -ol /usr/bin/make
|-rwxr-xr-x 1 root 127768 Feb 21 2002 /usr/bin/make

Here on MDK 9.1:
|[jonesy@nix jonesy]$ ls -ol /usr/bin/make
|-rwxr-xr-x 1 root 43472 Feb 18 2003 /usr/bin/make

This ain't "make" -- is it?

This, below, looks *nothing* like any "make -h" on the other systems:
(Note the "invalid option")

|[jonesy@nix jonesy]$ make -h
|make: invalid option -- h
|Usage: make [-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file
|
|Options:
| -1 format translation output one capability per line
| -a retain commented-out capabilities (sets -x also)
| -C translate entries to termcap source form
| -c check only, validate input without compiling or translating
| -e<names> translate/compile only entries named by comma-separated list
| -f format complex strings for readability
| -G format %{number} to %'char'
| -g format %'char' to %{number}
| -I translate entries to terminfo source form
| -L translate entries to full terminfo source form
| -N disable smart defaults for source translation
| -o<dir> set output directory for compiled entry writes
| -R<name> restrict translation to given terminfo/termcap version
| -r force resolution of all use entries in source translation
| -s print summary statistics
| -T remove size-restrictions on compiled description
| -t suppress commented-out capabilities
| -V print version
| -v[n] set verbosity level
| -w[n] set format width for translation output
| -x treat unknown capabilities as user-defined
|
|Parameters:
| <file> file to translate or compile

Oh, crap!!!
What the @$%!*&~! is it? Anybody recognise it?

Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Allodoxaphobia on March 5th, 2004


On Thu, 04 Mar 2004 20:28:34 -0600, Ryan Reich hath writ:
See my other follow-up: Yes, it would appear so.

Unless the MDK install process(es) used/required it, it has not
been used here to date.

The MDK 9.1 came off a CheapBytes CD set.
When we finally got DSL about 2 months ago, I URPMI'd the devil
out of it. Nothing else seems to be untoward on it.

Ya! I did a Google on "make install". That sure be a "unique"
search string -- even restricting it to google.com/linux. :-)

Tnx for your reply,
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Ryan Reich on March 5th, 2004


Allodoxaphobia wrote:
Ah, that is a big help. What you have there is 'captoinfo', a utility for
converting old termcap entries to shiny new terminfo entries. Hence the
reference to ncurses. I have no idea why it's called make. For what it's
worth, they are both located in /usr/bin (like everything else). Do you
happen to have a program actually called captoinfo?

--
Ryan Reich
ryanr@uchicago.edu

Posted by James Gray on March 5th, 2004


Allodoxaphobia wrote:

** SNIIPED **

Possibly. Please run the following and report back with the results:
which make
ls -l `which make`
rpm -q make

There are 3 possibilities;
1. you have a script or something in you path that gets run BEFORE the real
make.
2. something has over-written the real make with some fubar 'make'
3. something has replaced the real make with a symlink.

The above three commands should shed a little light on the subject. BTW,
watch the back-ticks ` on the second one - the back-tick is usually on the
same key as ~.

Cheers
--
James Gray james@grayoffline.id.au (s/off/on/)
Unix Systems Engineer Sydney, Australia.
Let a fool hold his tongue and he will pass for a sage.
-- Publilius Syrus

Posted by Allodoxaphobia on March 5th, 2004


On Thu, 04 Mar 2004 21:48:20 -0600, Ryan Reich hath writ:
.... some BIG snipping

Yes! Whilst you were so kindly working it out the Easy Way (aka
from experience), I used a sledgehammer to determine the same thing.
I picked off what I believed to be a Most Unique character string
in the 'bogus' make's -h ("invalid option") and grep'ed for
it:

|[jonesy@nix bin]$ grep "one capability per" *
|Binary file captoinfo matches
|Binary file infotocap matches
|Binary file make matches
|Binary file tic matches

hmmmmmmm....

|[jonesy@nix bin]$ ls -oli captoinfo infotocap make tic
| 275293 lrwxrwxrwx 1 root 3 Sep 5 11:21 captoinfo -> tic*
| 275296 lrwxrwxrwx 1 root 3 Sep 5 11:21 infotocap -> tic*
| 275328 -rwxr-xr-x 1 root 43472 Feb 18 2003 make*
| 275300 -rwxr-xr-x 1 root 43472 Feb 18 2003 tic*

How can I tell if this is a hard link or just a duplicate copy?

And, is make inside the gcc package - or where?
I suppose I can "fix" it with a rpm --force execution....

Off to bed. I've had enough `fun` for 1 day.
Thanks!
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Hamilcar Barca on March 5th, 2004


In article <slrnc4fkgh.1oj5.bit-bucket@localhost.config.com>, on Fri, 05
Mar 2004 01:04:18 +0000, Allodoxaphobia wrote:

You don't seem to have GNU make. (Do any Linux distributions ship without
it?)

I get

$ make -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
[...]

I get

$ make -V
make: invalid option -- V
Usage: make [options] [target] ...
Options:
[...]

I think so. What does

which make

tell you? I get

$ which make
/usr/bin/make

but I don't think it's a required location.


Posted by Ryan Reich on March 5th, 2004


Allodoxaphobia wrote:
Well, there's SOME experience involved, but once I saw the description from
the detailed command options, I knew it had to be a terminfo thing. So I
just typed 'apropos terminfo' and looked for the simplest command. It
wasn't especially elegant.

When you run ls -i, it tells you the inode number; two files with the same
inode number are hard links to the same place. In your listing, it shows
up on the left, and I see that you have no hard links. So it's a duplicate.

Make is separate from gcc...it should be called just "make" with some sort
of version number. I'd suggest compiling it from source but, well....

--
Ryan Reich
ryanr@uchicago.edu

Posted by P.T. Breuer on March 5th, 2004


Allodoxaphobia <bit-bucket@config.com> wrote:
Looks like tic to me:


% tic -v
tic: File name needed. Usage:
tic [-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file
nbd:/usr/oboe/ptb/lang/c/nbd/nbd-2.4.32%

% tic -h
tic: invalid option -- h
Usage: tic [-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file

Options:
-1 format translation output one capability per line
-C translate entries to termcap source form
-I translate entries to terminfo source form
-L translate entries to full terminfo source form
-N disable smart defaults for source translation
-R restrict translation to given terminfo/termcap version
-T remove size-restrictions on compiled description
-V print version
-a retain commented-out capabilities (sets -x also)
-c check only, validate input without compiling or
translating
-f format complex strings for readability
-G format %{number} to %'char'
-g format %'char' to %{number}
-e<names> translate/compile only entries named by comma-separated
list
-o<dir> set output directory for compiled entry writes
-r force resolution of all use entries in source translation
-s print summary statistics
-v[n] set verbosity level
-w[n] set format width for translation output
-x treat unknown capabilities as user-defined

Parameters:
<file> file to translate or compile



Peter

Posted by Allodoxaphobia on March 5th, 2004


On Thu, 04 Mar 2004 23:26:35 -0600, Ryan Reich hath writ:

Well, I'll reply here -- but, I also want to thank
Peter Breuer
Hamilcar Barca
and, James Gray
who also solved The Puzzle in other postings.

Yep. I it was a 'bogus' make. It was tic -- the "terminfo
entry-description compiler". Which *rellay* made it confusing,
because it issued compiler-like nonsense when I thought I was
running make.

So, I (re)RPM--force'd it from the install CD's and it now
works:

|[jonesy@nix png2ico]$ make
|g++ -W -Wall -O2 -finline-functions -g -o png2ico png2ico.cpp -lpng -lz -lm
|[jonesy@nix png2ico]$ ls -ol
:
|-rwxr-xr-x 1 jonesy 180191 Mar 5 09:32 png2ico*
:

So, the problem is CORRECTED -- but not SOLVED. I have no idea
how it came about. Obviously make from the install disks was
not bogus. Maybe some heavy-duty urpmi updating contributed to
the snafu -- I know I went a little crazy when "they" finally
delivered DSL to the house back in January....

Maybe I'll write a wee little script to check it (make) often
and alert me if it goes Kah-Kah again.

Along these same lines: Is there a way to check some/most/all
of the files in - say - /usr/bin to see if the _contents_ are
kewl? I guess a checksum of the sum of all the individual
sizes in the directory would be A Thing To Check. You'd need
a "refresh" after any maintenance activity, tho'.

I want to thank you folks for your help here! I tried posting this
problem in another *nix ng, and got _one_ reply from a fella saying
(in effect):
"Well, of course it's wrong! You're trying
to run it on a MS-DOS file system!"

sigh...
But, you guys are Great!

Best regards,
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | OS/2
| Gunnison, Colorado | @ | Jonesy | linux __
| 7,703' -- 2,345m | config.com | DM68mn SK

Posted by Ed Murphy on March 5th, 2004


On Fri, 05 Mar 2004 17:50:31 +0000, Allodoxaphobia wrote:

http://www.tripwire.org/


Posted by Ryan Reich on March 5th, 2004


Allodoxaphobia wrote:
Something similarly inexplicable once happened to me. I noticed one day
that I couldn't install a package; it would run `install foo` and then the
next line would be to do something based on the installed file, and it
inexplicably failed. I copied the file by hand, and it failed again a few
lines later. Running install by hand also failed. Finally, I checked the
executable and found that it had zero size. Weird. I recompiled it and
copied the executable into place by hand and that fixed things. I have no
idea what happened; the date of last modification was, I think, the same
day I had compiled and installed dosemu or dosbox, so it's marginally
conceivable that some screwup happened there. It may have been some
isolated filesystem error.

Posted by Anonymous on March 5th, 2004


"A" == Allodoxaphobia <bit-bucket@config.com>:

A> |[jonesy@nix png2ico]$ make Makefile

Type
make -f Makefile

instead.

Posted by Floyd L. Davidson on March 5th, 2004


Allodoxaphobia <bit-bucket@config.com> wrote:
I just downloaded it and tried myself, and it worked perfectly.
Hence, it isn't the png2ico-src-2002-12-08.tar.gz package itself
that is a problem, unless you just have a bad copy... which does
not appear to be the case.

What _make_ do you have? Try something like one of these,

make --version
make -V
make -v
make -?
make --help

The idea being to figure out what version of _make_ you have.
That is because I know of no way that _make_ would come up with
the message you are showing above. Running _strings_ on GNU
_make_ did not produce anything similar, and there is nothing
in the Makefile which prints it.

Obviously the above should have been "make -f Makefile". If you
had actually entered the command as shown, with GNU _make_ it should
produced something like this: "make: Nothing to be done for `Makefile'."

That doesn't look anything like output from _make_! Wierd.

It sure looks like something else altogether to me too!

If the above commands don't provide any clues as to what it
really is... first do "whereis make", which will show you where
you might have things named "make" (executables, but man pages
too). There should only be one, and it should be in
/usr/bin/make.

Then, try this, "strings /usr/bin/make | more" and look through
what it gives you for clues as to what it is. The first thing
you'll get will be a dump of symbol names from the libraries it
is linked to. Ignore that. Then you'll get a lot of real
gibberish, mostly in 4 letter increments. Ignore that too, its
parts of the program code that just happen to also be ASCII
characters. Then will come the data section of the binary,
where all of the strings in the program are stored. You'll know
fairly soon if you are looking at a real _make_ program or not,
but figuring out what version, or what else it might be if it
isn't make, could take some searching.

Sure looks wierd to me. Perhaps something went wrong during
installation? (I've never used Mandrake and wouldn't touch
KDE with your ten foot pole, so I'm no help at all.)

That's a real bummer.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com


Similar Posts