View Ticket
Ticket Hash: 37bbdb9fb2abbc383fb4657118642fd495cf723d
Title: `make install` does not work when `configure` was called without --prefix
Status: Open Type: Build Problem
Severity: Important Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2022-03-12 18:13:54
Version Found In: 1.7.22
User Comments:
anonymous added on 2021-01-27 08:17:35: (text/x-fossil-wiki)
The TCL_PACKAGE_PATH variable is set to {/usr/lib} <em>with braces</em>.

<pre>
  $ sudo make install
  ...
  /usr/bin/install -c -d '{/usr/lib}/tcltls1.7.22'
  /usr/bin/install -c tcltls.so '{/usr/lib}/tcltls1.7.22'
  /usr/bin/install -c -m 644    pkgIndex.tcl '{/usr/lib}/tcltls1.7.22'
</pre>

As this is not valid brace expansion (comma is required), that results in creating a directory called <code>{</code> and installing the files under it, instead of /usr/lib.

anonymous added on 2022-03-12 18:13:54: (text/x-markdown)
This is actually a bug in the Tcl configure script. Starting in Tcl 8.6.11, the lines:

    if test "$prefix/lib" != "$libdir"; then
        TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
    else
        TCL_PACKAGE_PATH="${prefix}/lib"
    fi
 
were changed to:

    if test "$prefix/lib" != "$libdir"; then
        TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib}"
    else
        TCL_PACKAGE_PATH="{${prefix}/lib}"
    fi

The extra braces propagate into the tclConfig.sh file, which then breaks the makefile.