Introduction to Tcl

The Tcl package contains the Tool Command Language, a robust general-purpose scripting language.

This package is known to build and work properly using an LFS-8.3 platform.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 81656d3367af032e0ae6157eff134f89

  • Download size: 9.3 MB

  • Estimated disk space required: 65 MB (including html documentation)

  • Estimated build time: 0.6 SBU (using parallelism=4; add 2.8 SBU for tests)

Additional Downloads

Optional Documentation

User Notes:

Installation of Tcl

This package is also installed in LFS during the bootstrap phase. As it is not installed during Chapter 6 of LFS, installation instructions are included here in BLFS.

If you downloaded the optional documentation, unpack the tarball by issuing the following command:

tar -xf ../tcl8.6.8-html.tar.gz --strip-components=1

Install Tcl by running the following commands:

export SRCDIR=`pwd` &&

cd unix &&

./configure --prefix=/usr           \
            --mandir=/usr/share/man \
            $([ $(uname -m) = x86_64 ] && echo --enable-64bit) &&
make &&

sed -e "s#$SRCDIR/unix#/usr/lib#" \
    -e "s#$SRCDIR#/usr/include#"  \
    -i               &&

sed -e "s#$SRCDIR/unix/pkgs/tdbc1.0.6#/usr/lib/tdbc1.0.6#" \
    -e "s#$SRCDIR/pkgs/tdbc1.0.6/generic#/usr/include#"    \
    -e "s#$SRCDIR/pkgs/tdbc1.0.6/library#/usr/lib/tcl8.6#" \
    -e "s#$SRCDIR/pkgs/tdbc1.0.6#/usr/include#"            \
    -i pkgs/tdbc1.0.6/                        &&

sed -e "s#$SRCDIR/unix/pkgs/itcl4.1.1#/usr/lib/itcl4.1.1#" \
    -e "s#$SRCDIR/pkgs/itcl4.1.1/generic#/usr/include#"    \
    -e "s#$SRCDIR/pkgs/itcl4.1.1#/usr/include#"            \
    -i pkgs/itcl4.1.1/                        &&

unset SRCDIR

To test the results, issue: make test. Tests known to fail: cmdAH.test and tdbcodbc.test.

Now, as the root user:

make install &&
make install-private-headers &&
ln -v -sf tclsh8.6 /usr/bin/tclsh &&
chmod -v 755 /usr/lib/

If you downloaded the optional documentation, install it by issuing the following commands as the root user:

mkdir -v -p /usr/share/doc/tcl-8.6.8 &&
cp -v -r  ../html/* /usr/share/doc/tcl-8.6.8

Command Explanations

$([ $(uname -m) = x86_64 ] && echo --enable-64bit): This switch is used to enable 64 bit support in Tcl on 64 bit operating systems.

make install-private-headers: This command is used to install the Tcl library interface headers used by other packages if they link to the Tcl library.

ln -v -sf tclsh8.6 /usr/bin/tclsh: This command is used to create a compatibility symbolic link to the tclsh8.6 file as many packages expect a file named tclsh.

sed -e ...: The Tcl package expects that its source tree is preserved so that packages depending on it for their compilation can utilize it. These sed remove the references to the build directory and replace them with saner system-wide locations.


Installed Programs: tclsh and tclsh8.6
Installed Libraries: and libtclstub8.6.a
Installed Directories: /usr/lib/itcl4.0.1, /usr/lib/sqlite3.8.6 /usr/lib/tcl8, /usr/lib/tcl8.6, /usr/lib/tdbc1.0.1, /usr/lib/tdbcmysql1.0.1, /usr/lib/tdbcodbc1.0.1, /usr/lib/tdbcpostgres1.0.1, /usr/lib/thread2.7.1, /usr/share/doc/tcl-8.6.8, and /usr/share/man/mann

Short Descriptions


is a symlink to the tclsh8.6 program.


is a simple shell containing the Tcl interpreter.

contains the API functions required by Tcl.

Last updated on 2018-08-18 12:42:11 -0700