LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2006, 02:14 PM   #1
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Rep: Reputation: 18
install invokes make


Hey all-

The short story:

install seems to be invoking make. why should it do this? and how can I stop it?

The longer story:

I'm trying to install the lzo-2.02 compression libraries (although this has happened to me with some other packages as well). They build just fine, but I run into problems when I run "make install".

make seems to get stuck in a recursive loop. It will enter a directory to install some files, and then it will spawn another level of make and reenter the same directory. I've scattered various bits of debugging statements through the offending target of the makefile and I have determined that executing the following is causing the recursion:

$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f

filling in the variables this becomes:
/usr/bin/ginstall -c -m 644 "lzoconf.h" /usr/local/include/lzo/lzoconf.h

(note that on my system ginstall is just a symlink to install)
So, I tried running this command from the command line instead of running "make install". The result is make going into the same recursive loop. Why on earth should "install" be invoking make??

From the man page of install it looks like this programs is supposed to essentially be a shortcut for copying a file and then resetting the permissions of that file. If I replace the offending statement in the makefile with the following things work fine, or at least for that target!

cp "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"
chmod 644 "$(DESTDIR)$(pkgincludedir)/$$f"

which works out to be:

cp "lzoconf.h" "/usr/local/include/lzo/lzoconf.h"
chmod 644 "/usr/local/include/lzo/lzoconf.h"


Of course, now that part installs just fine, but the next install target runs into the same problem! I really don't want to have to make this change to every makefile, and I've had this same problem with other packages as well.

Anyone have any ideas?

--Chad
 
Old 09-09-2006, 02:29 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
What do you get when you type 'make --version' and 'install --version'?

What is ginstall?

What is your $PATH for the user that runs these commands?

What is the output of 'which make' and 'which install'?

--- rod.
 
Old 09-09-2006, 02:59 PM   #3
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Original Poster
Rep: Reputation: 18
Quote:
What do you get when you type 'make --version' and 'install --version'?
$ make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

$ install --version
make: *** No rule to make target `install'. Stop.

This is indeed a bizare result... if I go to /usr/bin and run "./install --version" I get:

$ ./install --version
GNUmakefile:36: /usr/include/make/commondefs: No such file or directory
GNUmakefile:74: no file name for `include'
make: *** No rule to make target `/usr/include/make/commondefs'. Stop.

Quote:
What is ginstall?
As far as I can tell, it's exactly the same as "install". I do notice this when I run ./configure:

checking for a BSD-compatible install... /usr/bin/ginstall -c

also,

$ ls -l /usr/bin | grep ginstall
lrwxrwxrwx 1 root root 7 2006-08-03 19:08 ginstall -> install*

and just to be sure,

$ ls -l /usr/bin | grep install
...
lrwxrwxrwx 1 root root 7 2006-08-03 19:08 ginstall -> install*
-rwxr-xr-x 1 503 503 24 2002-02-14 19:33 install*
...


Quote:
What is your $PATH for the user that runs these commands?
Since I need to be root to install...
Code:
$ sudo echo $PATH
Password:
/home/cparker/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.:/home/cparker/geant4/bin/Linux-g++
"cparker" is the user that is currently logged on.

Quote:
What is the output of 'which make' and 'which install'?
$ which make
/usr/bin/make

$ which install
/usr/bin/install

Any ideas?

Last edited by reddazz; 09-10-2006 at 10:49 AM. Reason: put code tags
 
Old 09-09-2006, 03:14 PM   #4
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Quote:
-rwxr-xr-x 1 503 503 24 2002-02-14 19:33 install*
This is bad. This file is owned by a user and group that does not even exist, and the filesize is WAY too small. The information near your name says that your distribution is Slackware 10.2. Is this the distribution that you are using exhibiting this problem?

I also use Slackware 10.2, and install works for me:
Code:
zmk@thinkpad:~$ ls -l $(which install) $(which ginstall)
lrwxrwxrwx  1 root root     7 2006-09-08 22:41 /usr/bin/ginstall -> install*
-rwxr-xr-x  1 root bin  47728 2004-03-15 18:08 /usr/bin/install*
zmk@thinkpad:~$ install --version
install (coreutils) 5.2.1
Written by David MacKenzie.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It looks like your install program may be a script. Perhaps it invokes make?

See if install is indeed an ELF executable on your system with
Code:
file /usr/bin/install
If it isn't, check its contents.
 
Old 09-09-2006, 03:31 PM   #5
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Original Poster
Rep: Reputation: 18
Quote:
The information near your name says that your distribution is Slackware 10.2. Is this the distribution that you are using exhibiting this problem?
Sure is.

Quote:
This is bad. This file is owned by a user and group that does not even exist, and the filesize is WAY too small.
Ya know, I noticed this and I figured that it was just a default system user/group that didn't have an identifier. I suppose that was a bad assumption to make... I wonder how many other executables have this tag... I'll have to check that and correct it!

Quote:

It looks like your install program may be a script. Perhaps it invokes make?

See if install is indeed an ELF executable on your system with
Code:
file /usr/bin/install
If it isn't, check its contents.
Wow, I can't believe I didn't think to do that! Good call! Okay so it turns out that ...

$ file /usr/bin/install
/usr/bin/install: Bourne shell script text executable

ah ha!

and the contents:

$ cat /usr/bin/install
#! /bin/sh
make install

Well, that's certainly the problem then! I wonder how this even happened? So, now here's a new question: to correct this, do I need to completely reinstall coreutils? I've noticed that there are some other "install" scripts in /usr/bin...

$ ls /usr/bin | grep install
Xinstall.sh*
aminstall.sh*
floppyd_installtest*
ginstall@
install*
install-catalog*
install-datebook*
install-expenses*
install-hinote*
install-info*
install-memo*
install-netsync*
install-sh*
install-todo*
install-todos*
install-user*
install.sh*
install.sv3*
install.sv4*
installbin.sh*
installdat.sh*
installdirs.sh*
installman.sh*
installmodules.sh*
installscripts.sh*
installswat.sh*
minstall.sh*
mkinstalldirs*
mysql_install_db*
mysql_secure_installation*
pinegpg-install@
pinepgpgpg-install*
sinstall.sh*
uninstallbin.sh*
uninstallman.sh*
uninstallmodules.sh*
uninstallscripts.sh*

some of these look promising... for example,

$ head install.sh
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written

Should /usr/bin/install be a symlink to /usr/bin/install.sh? or is install supposed to actually be an ELF executable?


--Chad
 
Old 09-09-2006, 03:53 PM   #6
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Quote:
Should /usr/bin/install be a symlink to /usr/bin/install.sh? or is install supposed to actually be an ELF executable?
/usr/bin/install should be an ELF executable, not a link of any sort - it's installed by coreutils and is about 48K in size.

You have many files in /usr/bin that aren't installed by Slackware. I chose to install every single package when Slackware was first installed on the computer I am using right now. I compared the listing of filenames with the word "install" on my machine to the one you posted (I copied your listing and pasted it into a file called filelist):
Code:
zmk@thinkpad:~$ vim filelist
zmk@thinkpad:~$ for f in $(tr --delete "*@" < filelist); do ls /usr/bin/$f &> /dev/null || echo "$f"; done
Xinstall.sh
aminstall.sh
install-sh
install.sh
install.sv3
install.sv4
installbin.sh
installdat.sh
installdirs.sh
installman.sh
installmodules.sh
installscripts.sh
installswat.sh
minstall.sh
mkinstalldirs
sinstall.sh
uninstallbin.sh
uninstallman.sh
uninstallmodules.sh
uninstallscripts.sh
zmk@thinkpad:~$
The files listed are files which you have that I do not.

I don't know where your extra files are coming from, but it looks like something simply overwrote the legitimate install program.

Reinstalling the coreutils package would fix the install problem, but I'm still curious about what overwrote it in the first place.

Last edited by reddazz; 09-09-2006 at 05:34 PM. Reason: trying to fix broken code tags
 
  


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
package compiling from source, make & make install concepts shujja Linux - Newbie 2 09-20-2005 12:18 AM
Firefox invokes Nautlus under KDE . . . PTrenholme Linux - Software 4 05-19-2005 12:37 PM
Chap 5 Binutils make LDFLAGS & make install errors shotokan Linux From Scratch 5 04-10-2005 03:01 AM
How to make rule for make install and make uninstall melinda_sayang Programming 1 06-14-2004 05:58 AM
'make' and 'make install' commands dont work on my system? ginda Linux - Newbie 9 04-18-2004 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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