1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
6 <!ENTITY tdbc-ver "1.1.2">
7 <!ENTITY itcl-ver "4.2.1">
10 <sect1 id="ch-tools-tcl" role="wrap">
11 <?dbhtml filename="tcl.html"?>
13 <sect1info condition="script">
14 <productname>tcl</productname>
15 <productnumber>&tcl-version;</productnumber>
16 <address>&tcl-url;</address>
19 <title>Tcl-&tcl-version;</title>
21 <indexterm zone="ch-tools-tcl">
22 <primary sortas="a-Tcl">Tcl</primary>
25 <sect2 role="package">
28 <para>The <application>Tcl</application> package contains the Tool Command Language,
29 a robust general-purpose scripting language. The <application>Expect</application> package
30 is written in the <application>Tcl</application> language.</para>
33 <segtitle>&buildtime;</segtitle>
34 <segtitle>&diskspace;</segtitle>
37 <seg>&tcl-tmp-sbu;</seg>
38 <seg>&tcl-tmp-du;</seg>
44 <sect2 role="installation">
45 <title>Installation of Tcl</title>
47 <para>This package and the next two (Expect and DejaGNU) are
48 installed to support running the test suites for GCC and binutils and other
49 packages. Installing three packages for testing purposes may seem
50 excessive, but it is very reassuring, if not essential, to know that the
51 most important tools are working properly. These packages are required
52 to run the test suites in this chapter.</para>
54 <!-- <para>Note that the Tcl package used here is a minimal version needed
55 to run the LFS tests. For the full package, see the
56 <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>-->
58 <para>First, unpack the documentation by issuing the following command:</para>
60 <screen><userinput remap="pre">tar -xf ../tcl&tcl-version;-html.tar.gz --strip-components=1</userinput></screen>
62 <para>Prepare Tcl for compilation:</para>
64 <screen><userinput remap="configure">SRCDIR=$(pwd)
66 ./configure --prefix=/usr \
67 --mandir=/usr/share/man \
68 $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</userinput></screen>
71 <title>The meaning of the configure options:</title>
74 <term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term>
76 <para>The construct <parameter>$(<shell command>)</parameter>
77 is replaced by the output of the shell command. Here this output is
78 empty if running on a 32 bit machine, and is
79 <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
86 <para>Build the package:</para>
88 <screen><userinput remap="make">make
90 sed -e "s|$SRCDIR/unix|/usr/lib|" \
91 -e "s|$SRCDIR|/usr/include|" \
94 sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
95 -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
96 -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
97 -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
98 -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
100 sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
101 -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
102 -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
103 -i pkgs/itcl&itcl-ver;/itclConfig.sh
105 unset SRCDIR</userinput></screen>
107 <para>The various <quote>sed</quote> instructions after the
108 <quote>make</quote> command removes references to the build directory from
109 the configuration files and replaces them with the install directory.
110 This is not mandatory for the remainder of LFS, but may be needed in case a
111 package built later uses Tcl.</para>
113 <para>To test the results, issue:</para>
115 <screen><userinput remap="test">make test</userinput></screen>
119 In the test results there are several places associated with clock.test
120 that indicate a failure, but the summary at the end indicates no
121 failures. clock.test passes on a complete LFS system.
125 <para>Install the package:</para>
127 <screen><userinput remap="install">make install</userinput></screen>
129 <para>Make the installed library writable so debugging symbols can
130 be removed later:</para>
132 <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
134 <para>Install Tcl's headers. The next package, Expect, requires them.</para>
136 <screen><userinput remap="install">make install-private-headers</userinput></screen>
138 <para>Now make a necessary symbolic link:</para>
140 <screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
142 <para>Finally, rename a man page that conflicts with a Perl man page:</para>
144 <screen><userinput remap="install">mv /usr/share/man/man3/{Thread,Tcl_Thread}.3</userinput></screen>
148 <sect2 id="contents-tcl" role="content">
149 <title>Contents of Tcl</title>
152 <segtitle>Installed programs</segtitle>
153 <segtitle>Installed library</segtitle>
157 tclsh (link to tclsh&tcl-major-version;) and
158 tclsh&tcl-major-version;
161 libtcl&tcl-major-version;.so and
162 libtclstub&tcl-major-version;.a
168 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
169 <?dbfo list-presentation="list"?>
170 <?dbhtml list-presentation="table"?>
172 <varlistentry id="tclsh&tcl-major-version;">
173 <term><command>tclsh&tcl-major-version;</command></term>
175 <para>The Tcl command shell</para>
176 <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
177 <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
182 <varlistentry id="tclsh">
183 <term><command>tclsh</command></term>
185 <para>A link to tclsh&tcl-major-version;</para>
186 <indexterm zone="ch-tools-tcl tclsh">
187 <primary sortas="b-tclsh">tclsh</primary>
192 <varlistentry id="libtcl&tcl-major-version;.so">
193 <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
195 <para>The Tcl library</para>
196 <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
197 <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
202 <varlistentry id="libtclstub&tcl-major-version;.a">
203 <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
205 <para>The Tcl Stub library</para>
206 <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
207 <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>