aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/tcl.xml
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2020-06-16 11:56:28 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2020-06-16 11:56:28 +0000
commit675606bde2ba53946537b42a5aa576692a311621 (patch)
treeaf20c20ce3841c16b24d0b9903af6878a4a0f5a6 /chapter07/tcl.xml
parent560065f976e371779928dbf8b9428217f3f57331 (diff)
parent1cd59612d00603c9ce773ad821a15d20bc4fa0b7 (diff)
Split Chapter 5 into three separate chapters.
Implement a new method of cross-building the LFS tool chain and other tools to simplify the method of isolating the new system from the original host. This will be the start of LFS-10.0. Move old trunk/BOOK to branches/old-trunk. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11946 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/tcl.xml')
-rw-r--r--chapter07/tcl.xml196
1 files changed, 196 insertions, 0 deletions
diff --git a/chapter07/tcl.xml b/chapter07/tcl.xml
new file mode 100644
index 000000000..39219b06b
--- /dev/null
+++ b/chapter07/tcl.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+ <!ENTITY tdbc-ver "1.1.1">
+ <!ENTITY itcl-ver "4.2.0">
+]>
+
+<sect1 id="ch-tools-tcl" role="wrap">
+ <?dbhtml filename="tcl.html"?>
+
+ <sect1info condition="script">
+ <productname>tcl</productname>
+ <productnumber>&tcl-version;</productnumber>
+ <address>&tcl-url;</address>
+ </sect1info>
+
+ <title>Tcl-&tcl-version;</title>
+
+ <indexterm zone="ch-tools-tcl">
+ <primary sortas="a-Tcl">Tcl</primary>
+ </indexterm>
+
+ <sect2 role="package">
+ <title/>
+
+ <para>The <application>Tcl</application> package contains the Tool Command Language,
+ a robust general-purpose scripting language. The <application>Expect</application> package
+ is written in the <application>Tcl</application> language.</para>
+
+ <segmentedlist>
+ <segtitle>&buildtime;</segtitle>
+ <segtitle>&diskspace;</segtitle>
+
+ <seglistitem>
+ <seg>&tcl-tmp-sbu;</seg>
+ <seg>&tcl-tmp-du;</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ </sect2>
+
+ <sect2 role="installation">
+ <title>Installation of Tcl</title>
+
+ <para>This package and the next two (Expect and DejaGNU) are
+ installed to support running the test suites for GCC and binutils and other
+ packages. Installing three packages for testing purposes may seem
+ excessive, but it is very reassuring, if not essential, to know that the
+ most important tools are working properly. These packages are required
+ to run the test suites in <xref linkend="chapter-building-system"/>.</para>
+
+ <para>Note that the Tcl package used here is a minimal version needed
+ to run the LFS tests. For the full package, see the
+ <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>
+
+ <para>Prepare Tcl for compilation:</para>
+
+<screen><userinput remap="configure">SRCDIR=$(pwd)
+cd unix
+./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ $([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
+
+ <variablelist>
+ <title>The meaning of the configure options:</title>
+
+ <varlistentry>
+ <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
+ <listitem>
+ <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
+ is replaced by the output of the shell command. Here this output is
+ empty if running on a 32 bit machine, and is
+ <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <para>Build the package:</para>
+
+<screen><userinput remap="make">make
+
+sed -e "s|$SRCDIR/unix|/usr/lib|" \
+ -e "s|$SRCDIR|/usr/include|" \
+ -i tclConfig.sh
+
+sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
+ -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
+ -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
+
+sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
+ -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
+ -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
+ -i pkgs/itcl&itcl-ver;/itclConfig.sh
+
+unset SRCDIR</userinput></screen>
+
+ <para>The various <quote>sed</quote> instructions after the
+ <quote>make</quote> command removes references to the build directory from
+ the configuration files and replaces them with the install directory.
+ This is not mandatory for the remainder of LFS, but may be needed in case a
+ package built later uses Tcl.</para>
+
+ <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+ <para>Make the installed library writable so debugging symbols can
+ be removed later:</para>
+
+<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
+
+ <para>Install Tcl's headers. The next package, Expect, requires them.</para>
+
+<screen><userinput remap="install">make install-private-headers</userinput></screen>
+
+ <para>Now make a necessary symbolic link:</para>
+
+<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
+
+ </sect2>
+
+ <sect2 id="contents-tcl" role="content">
+ <title>Contents of Tcl</title>
+
+ <segmentedlist>
+ <segtitle>Installed programs</segtitle>
+ <segtitle>Installed library</segtitle>
+
+ <seglistitem>
+ <seg>
+ tclsh (link to tclsh&tcl-major-version;) and
+ tclsh&tcl-major-version;
+ </seg>
+ <seg>
+ libtcl&tcl-major-version;.so and
+ libtclstub&tcl-major-version;.a
+ </seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <variablelist>
+ <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+ <?dbfo list-presentation="list"?>
+ <?dbhtml list-presentation="table"?>
+
+ <varlistentry id="tclsh&tcl-major-version;">
+ <term><command>tclsh&tcl-major-version;</command></term>
+ <listitem>
+ <para>The Tcl command shell</para>
+ <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
+ <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="tclsh">
+ <term><command>tclsh</command></term>
+ <listitem>
+ <para>A link to tclsh&tcl-major-version;</para>
+ <indexterm zone="ch-tools-tcl tclsh">
+ <primary sortas="b-tclsh">tclsh</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="libtcl&tcl-major-version;.so">
+ <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
+ <listitem>
+ <para>The Tcl library</para>
+ <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
+ <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="libtclstub&tcl-major-version;.a">
+ <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
+ <listitem>
+ <para>The Tcl Stub library</para>
+ <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
+ <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ </sect2>
+
+</sect1>