tcl.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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">
  5. %general-entities;
  6. <!ENTITY tdbc-ver "1.1.1">
  7. <!ENTITY itcl-ver "4.2.0">
  8. ]>
  9. <sect1 id="ch-tools-tcl" role="wrap">
  10. <?dbhtml filename="tcl.html"?>
  11. <sect1info condition="script">
  12. <productname>tcl</productname>
  13. <productnumber>&tcl-version;</productnumber>
  14. <address>&tcl-url;</address>
  15. </sect1info>
  16. <title>Tcl-&tcl-version;</title>
  17. <indexterm zone="ch-tools-tcl">
  18. <primary sortas="a-Tcl">Tcl</primary>
  19. </indexterm>
  20. <sect2 role="package">
  21. <title/>
  22. <para>The <application>Tcl</application> package contains the Tool Command Language,
  23. a robust general-purpose scripting language. The <application>Expect</application> package
  24. is written in the <application>Tcl</application> language.</para>
  25. <segmentedlist>
  26. <segtitle>&buildtime;</segtitle>
  27. <segtitle>&diskspace;</segtitle>
  28. <seglistitem>
  29. <seg>&tcl-tmp-sbu;</seg>
  30. <seg>&tcl-tmp-du;</seg>
  31. </seglistitem>
  32. </segmentedlist>
  33. </sect2>
  34. <sect2 role="installation">
  35. <title>Installation of Tcl</title>
  36. <para>This package and the next two (Expect and DejaGNU) are
  37. installed to support running the test suites for GCC and binutils and other
  38. packages. Installing three packages for testing purposes may seem
  39. excessive, but it is very reassuring, if not essential, to know that the
  40. most important tools are working properly. These packages are required
  41. to run the test suites in this chapter.</para>
  42. <!-- <para>Note that the Tcl package used here is a minimal version needed
  43. to run the LFS tests. For the full package, see the
  44. <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>-->
  45. <para>First, unpack the documentation by issuing the following command:</para>
  46. <screen><userinput remap="pre">tar -xf ../tcl8.6.10-html.tar.gz --strip-components=1</userinput></screen>
  47. <para>Prepare Tcl for compilation:</para>
  48. <screen><userinput remap="configure">SRCDIR=$(pwd)
  49. cd unix
  50. ./configure --prefix=/usr \
  51. --mandir=/usr/share/man \
  52. $([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
  53. <variablelist>
  54. <title>The meaning of the configure options:</title>
  55. <varlistentry>
  56. <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
  57. <listitem>
  58. <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
  59. is replaced by the output of the shell command. Here this output is
  60. empty if running on a 32 bit machine, and is
  61. <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
  62. </para>
  63. </listitem>
  64. </varlistentry>
  65. </variablelist>
  66. <para>Build the package:</para>
  67. <screen><userinput remap="make">make
  68. sed -e "s|$SRCDIR/unix|/usr/lib|" \
  69. -e "s|$SRCDIR|/usr/include|" \
  70. -i tclConfig.sh
  71. sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
  72. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
  73. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
  74. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
  75. -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
  76. sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
  77. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
  78. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
  79. -i pkgs/itcl&itcl-ver;/itclConfig.sh
  80. unset SRCDIR</userinput></screen>
  81. <para>The various <quote>sed</quote> instructions after the
  82. <quote>make</quote> command removes references to the build directory from
  83. the configuration files and replaces them with the install directory.
  84. This is not mandatory for the remainder of LFS, but may be needed in case a
  85. package built later uses Tcl.</para>
  86. <para>To test the results, issue:</para>
  87. <screen><userinput remap="test">make test</userinput></screen>
  88. <note>
  89. <para>
  90. In the test results there are several places associated with clock.test
  91. that indicate a failure, but the summary at the end indicates no
  92. failures. clock.test passes on a complete LFS system.
  93. </para>
  94. </note>
  95. <para>Install the package:</para>
  96. <screen><userinput remap="install">make install</userinput></screen>
  97. <para>Make the installed library writable so debugging symbols can
  98. be removed later:</para>
  99. <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
  100. <para>Install Tcl's headers. The next package, Expect, requires them.</para>
  101. <screen><userinput remap="install">make install-private-headers</userinput></screen>
  102. <para>Now make a necessary symbolic link:</para>
  103. <screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
  104. </sect2>
  105. <sect2 id="contents-tcl" role="content">
  106. <title>Contents of Tcl</title>
  107. <segmentedlist>
  108. <segtitle>Installed programs</segtitle>
  109. <segtitle>Installed library</segtitle>
  110. <seglistitem>
  111. <seg>
  112. tclsh (link to tclsh&tcl-major-version;) and
  113. tclsh&tcl-major-version;
  114. </seg>
  115. <seg>
  116. libtcl&tcl-major-version;.so and
  117. libtclstub&tcl-major-version;.a
  118. </seg>
  119. </seglistitem>
  120. </segmentedlist>
  121. <variablelist>
  122. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  123. <?dbfo list-presentation="list"?>
  124. <?dbhtml list-presentation="table"?>
  125. <varlistentry id="tclsh&tcl-major-version;">
  126. <term><command>tclsh&tcl-major-version;</command></term>
  127. <listitem>
  128. <para>The Tcl command shell</para>
  129. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  130. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  131. </indexterm>
  132. </listitem>
  133. </varlistentry>
  134. <varlistentry id="tclsh">
  135. <term><command>tclsh</command></term>
  136. <listitem>
  137. <para>A link to tclsh&tcl-major-version;</para>
  138. <indexterm zone="ch-tools-tcl tclsh">
  139. <primary sortas="b-tclsh">tclsh</primary>
  140. </indexterm>
  141. </listitem>
  142. </varlistentry>
  143. <varlistentry id="libtcl&tcl-major-version;.so">
  144. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  145. <listitem>
  146. <para>The Tcl library</para>
  147. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  148. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  149. </indexterm>
  150. </listitem>
  151. </varlistentry>
  152. <varlistentry id="libtclstub&tcl-major-version;.a">
  153. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  154. <listitem>
  155. <para>The Tcl Stub library</para>
  156. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  157. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  158. </indexterm>
  159. </listitem>
  160. </varlistentry>
  161. </variablelist>
  162. </sect2>
  163. </sect1>