tcl.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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.2">
  7. <!ENTITY itcl-ver "4.2.1">
  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 ../tcl&tcl-version;-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. <para>Finally, rename a man page that conflicts with a Perl man page:</para>
  105. <screen><userinput remap="install">mv /usr/share/man/man3/{Thread,Tcl_Thread}.3</userinput></screen>
  106. </sect2>
  107. <sect2 id="contents-tcl" role="content">
  108. <title>Contents of Tcl</title>
  109. <segmentedlist>
  110. <segtitle>Installed programs</segtitle>
  111. <segtitle>Installed library</segtitle>
  112. <seglistitem>
  113. <seg>
  114. tclsh (link to tclsh&tcl-major-version;) and
  115. tclsh&tcl-major-version;
  116. </seg>
  117. <seg>
  118. libtcl&tcl-major-version;.so and
  119. libtclstub&tcl-major-version;.a
  120. </seg>
  121. </seglistitem>
  122. </segmentedlist>
  123. <variablelist>
  124. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  125. <?dbfo list-presentation="list"?>
  126. <?dbhtml list-presentation="table"?>
  127. <varlistentry id="tclsh&tcl-major-version;">
  128. <term><command>tclsh&tcl-major-version;</command></term>
  129. <listitem>
  130. <para>The Tcl command shell</para>
  131. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  132. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="tclsh">
  137. <term><command>tclsh</command></term>
  138. <listitem>
  139. <para>A link to tclsh&tcl-major-version;</para>
  140. <indexterm zone="ch-tools-tcl tclsh">
  141. <primary sortas="b-tclsh">tclsh</primary>
  142. </indexterm>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry id="libtcl&tcl-major-version;.so">
  146. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  147. <listitem>
  148. <para>The Tcl library</para>
  149. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  150. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="libtclstub&tcl-major-version;.a">
  155. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  156. <listitem>
  157. <para>The Tcl Stub library</para>
  158. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  159. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  160. </indexterm>
  161. </listitem>
  162. </varlistentry>
  163. </variablelist>
  164. </sect2>
  165. </sect1>