Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2025-01-21
16:32 • Ticket [573292ffff] prefix not honoured on make install status still Open wi... artifact: 4a8536d156 user: stu
2025-01-20
11:02 • Ticket [573292ffff]: 8 changes artifact: 0aa9e4ac7b user: stu
2003-02-26
23:55 • Ticket [573292ffff]: 4 changes artifact: ec56ebb193 user: dgp
14:11 • Ticket [573292ffff]: 4 changes artifact: c5f12e908c user: dgp
2003-02-25
05:15 • Ticket [573292ffff]: 4 changes artifact: ecc19a1e02 user: mdejong
04:58 • Ticket [573292ffff]: 4 changes artifact: f8aabae4fa user: stephenhill
2002-09-01
03:11 • Ticket [573292ffff]: 4 changes artifact: c6966bd2c7 user: pifpafpuf
2002-07-15
17:23 • Ticket [573292ffff]: 4 changes artifact: 1c779788b2 user: rmax
2002-06-26
23:23 • Ticket [573292ffff]: 5 changes artifact: b9ec6c2cd2 user: dgp
23:15 • Ticket [573292ffff]: 4 changes artifact: c0acb68b5e user: dgp
22:19 • Ticket [573292ffff]: 4 changes artifact: 02f63352a8 user: pifpafpuf
2002-06-25
03:39 • Ticket [573292ffff]: 4 changes artifact: a1aec140d9 user: mdejong
2002-06-24
20:25 • New ticket [573292ffff]. artifact: 8f1a873593 user: pifpafpuf

prefix not honoured on make install

Open573292ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 2 years ago
Descriptionplain2002-06-24 20:25:20
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
mdejongplain2002-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.
pifpafpufplain2002-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
dgpplain2002-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.
dgpplain2002-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?
rmaxplain2002-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.
pifpafpufplain2002-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.
stephenhillplain2003-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.
mdejongplain2003-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.
dgpplain2003-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.
dgpplain2003-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".
stuplain2025-01-20 11:02:10
I think this can be closed.

Seems like
$ make install DESTDIR=...
(which now exists) is what was desired.
stu Ticket [573292ffff]: 3 changes [History diff]2025-01-21 16:32:54
Log in (anonymous is fine) to add a comment.