| Ticket UUID: | 573292 | ||
| Title: | prefix not honoured on make install | ||
| Type: | Bug | Created on: | 2002-06-24 20:25:20 |
| Submitter: | pifpafpuf | Assigned to: | jan.nijtmans |
| Subsystem: | 53. Configuration and Build Tools | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2025-01-21 16:32:54 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | obsolete: 8.4a4 | ||
| Description: | ||||
I called make install prefix=/usr/local/stow/tcl8.4a4 and got unix# ll `which tclsh8.4` -rwxr-xr-x 1 root staff 6207 Jun 24 22:15 /usr/local/bin/tclsh8.4* I guess the wrong prefix comes from the --prefix given to configure. All other files are installed where requested. The different prefixes used during configure/make and 'make install' are necessary when using stow (http://www.gnu.org/software/stow/) or when packing distributions. Harald Kirsch | ||||
| User Comments: | ||||
mdejong added on 2002-06-25 03:39:19:
Logged In: YES user_id=90858 Tcl does not support setting the prefix variable at make time. I doubt it ever will. If you want to set the prefix it should be done at configure time. A handy patch might be to detect if the user changed the prefix variable on the command line an generate an error that tells them not too. It might have been useful to set the prefix like that in the old days of static libs, but these days there are far too many compiled in paths to even think about supporting this. pifpafpuf added on 2002-06-26 22:19:54:
Logged In: YES user_id=367359 It seems like we have a different understanding of how a prefix given to 'make install' should be handled. You write: but these days there are far too many compiled in paths to even think about supporting this. You seem to mean that the prefix for 'make install' must be fiddled into the software to tell it its own location. On the contrary 'make install' MUST NOT touch any compiled-in prefix anymore. It should only copy the files into the destination directory structure and maybe set permissions. This is necessary for stow as well as for package builders like dpkg or rpm: The software is intended to work e.g. in /usr/local but for packing (rpm) or other managing (stow) it is necessary to have it in a single clean directory hierarchy, i.e. in particular not in /usr/local. This is what the prefix given to 'make install' should be used for. That said you may find that supporting this is really trivial. Harald Kirsch dgp added on 2002-06-26 23:15:46:
Logged In: YES user_id=80530 Note that this issue is similar to the one raised in Tcl Bug 489370. You might want to read comments there for background. I also liked the ability to re-direct installs with a single redefine, but Mo insists it's not correct. You can still achieve the redirection, but you'll need to redefine all of prefix, exec_prefix, and libdir now. dgp added on 2002-06-26 23:23:27:
Logged In: YES user_id=80530 rmax, I think you look after the tcl.spec file and packaging of Tcl/Tk into RPMs. Does this issues affect those things? rmax added on 2002-07-15 17:23:22:
Logged In: YES user_id=124643 Harald, I think what you need is INSTALL_ROOT ./configure --prefix=/usr ... make make INSTALL_ROOT=/var/tmp/tcl-root install This creates a Tcl installation that is configured to work when installed under /usr, but prepends /var/tmp/tcl-root to any path during installation. pifpafpuf added on 2002-09-01 03:11:20:
Logged In: YES
user_id=367359
First, I would like to stress that I want to change prefix
*only* to redirect installation, i.e. where files are
copied. Of course it
makes no sense to configure for /X and compile for /Y.
mdejong says:
> Tcl does not support setting the prefix variable
> at make time.
Looking into configure.in, the main reason seems to be that
libdir is expanded
at configure time instead of when make is run. The comment in
configure.in around line 26 is:
# libdir must be a fully qualified path and (not
${exec_prefix}/lib)
What is the reason for this?
P.S.: No, INSTALL_ROOT is not suitable for use with stow.
stephenhill added on 2003-02-25 04:58:20:
Logged In: YES
user_id=452449
This is a fairly common need - you configure for location X,
you install under a stow tree, then you generate packages (
or whatever ) from the stow tree and they will be installed
and run from location X on other machines.
The eval that expands libdir is incorrect, since it affects
every use of libdir. The fix should have only affected the
one buggy use of libdir that was causing a ${exec_prefix} to
show up in the generated tclConfig.sh file.
For my use I commented out the eval and we don't care about
the bad line we get in the tclConfig.sh since we don't use it.
mdejong added on 2003-02-25 05:15:52:
Logged In: YES user_id=90858 I don't see how we can subst one value of libdir into the tclConfig.sh and another value into the Makefile. Could you work around this issue by running: make prefix=/some/path libdir='$(exec_prefix)/lib` install This would likely "fix" things for you, but if a --libdir option were to be passed to the configure script then things would be broken again. dgp added on 2003-02-26 14:11:02:
Logged In: YES
user_id=80530
Note this excerpt from unix/README:
(f) Type "make install" to install Tcl binaries and script
files in
standard places. You'll need write permission on the
installation
directories to do this. The installation directories are
determined by the "configure" script and may be
specified with
the --prefix and --exec-prefix options to "configure".
See the
Makefile for information on what directories were
chosen; you
can override these choices by modifying the "prefix" and
"exec_prefix" variables in the Makefile.
Is seems that the final sentence is no longer correct, because
'make install' has been modified so one cannot redirect the
location of an install by simply redefining "prefix".
Whatever the final resolution of this, the Makefile should
be checked to be correct.
There's a similar claim in the unix/Makefile for Tk.
dgp added on 2003-02-26 23:55:58:
Logged In: YES user_id=80530 shouldn't type so late at night. When I type "Makefile", I meant "README". stu added on 2025-01-20 11:02:10:
I think this can be closed. Seems like $ make install DESTDIR=... (which now exists) is what was desired. | ||||
