tcl.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. ]>
  7. <sect1 id="ch-tools-tcl" role="wrap">
  8. <?dbhtml filename="tcl.html"?>
  9. <sect1info condition="script">
  10. <productname>tcl</productname>
  11. <productnumber>&tcl-version;</productnumber>
  12. <address>&tcl-url;</address>
  13. </sect1info>
  14. <title>Tcl-&tcl-version;</title>
  15. <indexterm zone="ch-tools-tcl">
  16. <primary sortas="a-Tcl">Tcl</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <!--para>The Tcl package contains the Tool Command Language.</para-->
  21. <para>Tcl 软件包包含工具命令语言。</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&tcl-ch5-sbu;</seg>
  27. <seg>&tcl-ch5-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>安装 Tcl</title>
  33. <!--para>This package and the next two (Expect and DejaGNU) are
  34. installed to support running the test suites for GCC and Binutils and other
  35. packages. Installing three packages for testing purposes may seem
  36. excessive, but it is very reassuring, if not essential, to know that the
  37. most important tools are working properly. Even if the test suites are not
  38. run in this chapter (they are not mandatory), these packages are required
  39. to run the test suites in <xref linkend="chapter-building-system"/>.</para-->
  40. <para>为了支持 GCC 和 Binutils 等软件包测试套件的运行,
  41. 需要安装这个软件包和接下来的两个 (Expect 与 DejaGNU)。
  42. 为了测试目的安装三个软件包看似浪费,
  43. 但实际上,我们运行了测试,才能放心地确定多数重要工具可以正常工作,
  44. 即使测试不是必要的。另外,即使在本章中不运行测试套件
  45. (本章中的测试并不必要),我们必须安装这三个软件包,
  46. 才能执行 <xref linkend="chapter-building-system"/> 中的测试套件。
  47. </para>
  48. <!--para>Note that the Tcl package used here is a minimal version needed
  49. to run the LFS tests. For the full package, see the
  50. <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para-->
  51. <para>注意,这里使用的 Tcl 软件包是一个最小版本,仅用于运行 LFS 的测试。
  52. 如果需要完整的软件包,阅读
  53. <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl 安装过程</ulink>
  54. 。</para>
  55. <para>准备编译 Tcl:</para>
  56. <screen><userinput remap="configure">cd unix
  57. ./configure --prefix=/tools</userinput></screen>
  58. <para>构建该软件包:</para>
  59. <screen><userinput remap="make">make</userinput></screen>
  60. <!--para>Compilation is now complete. As discussed earlier, running the test
  61. suite is not mandatory for the temporary tools here in this chapter. To run
  62. the Tcl test suite anyway, issue the following command:</para-->
  63. <para>现在编译已经完成。正如之前讨论的,对于本章中的临时工具而言,
  64. 没有必要运行测试套件。如果无论如何要运行测试套件,
  65. 执行以下命令:</para>
  66. <screen><userinput remap="test">TZ=UTC make test</userinput></screen>
  67. <!--para>The Tcl test suite may experience failures under certain host
  68. conditions that are not fully understood. Therefore, test suite failures
  69. here are not surprising, and are not considered critical. The
  70. <parameter>TZ=UTC</parameter> parameter sets the time zone to Coordinated
  71. Universal Time (UTC), but only
  72. for the duration of the test suite run. This ensures that the clock tests
  73. are exercised correctly. Details on the <envar>TZ</envar> environment
  74. variable are provided in <xref linkend="chapter-bootscripts"/>.</para-->
  75. <para>在某些特定的宿主环境下,Tcl 测试套件可能失败,
  76. 失败原因还没有完全理解清楚。因此,测试套件的失败并不令人吃惊,
  77. 也不会造成严重问题。<parameter>TZ=UTC</parameter>
  78. 参数在测试套件的运行过程中将时区设为协调世界时 (UTC),
  79. 这保证时钟测试能够正常进行。<envar>TZ</envar>
  80. 环境变量的详细知识在 <xref linkend="chapter-bootscripts"/> 中讲解。
  81. </para>
  82. <para>安装该软件包:</para>
  83. <screen><userinput remap="install">make install</userinput></screen>
  84. <!--para>Make the installed library writable so debugging symbols can
  85. be removed later:</para-->
  86. <para>将安装好的库加上写入权限,以便将来移除调试符号:</para>
  87. <screen><userinput remap="install">chmod -v u+w /tools/lib/libtcl&tcl-major-version;.so</userinput></screen>
  88. <!--para>Install Tcl's headers. The next package, Expect, requires them
  89. to build.</para-->
  90. <para>安装 Tcl 的头文件,因为下一个软件包 Expect 需要它们才能构建。
  91. </para>
  92. <screen><userinput remap="install">make install-private-headers</userinput></screen>
  93. <!--para>Now make a necessary symbolic link:</para-->
  94. <para>创建一个必要的符号链接:</para>
  95. <screen><userinput remap="install">ln -sv tclsh&tcl-major-version; /tools/bin/tclsh</userinput></screen>
  96. </sect2>
  97. <sect2 id="contents-tcl" role="content">
  98. <title>Tcl 的内容</title>
  99. <segmentedlist>
  100. <segtitle>安装的程序</segtitle>
  101. <segtitle>安装的库</segtitle>
  102. <seglistitem>
  103. <seg>tclsh (到 tclsh&tcl-major-version; 的链接) 和 tclsh&tcl-major-version;</seg>
  104. <seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg>
  105. </seglistitem>
  106. </segmentedlist>
  107. <variablelist>
  108. <bridgehead renderas="sect3">简要描述</bridgehead>
  109. <?dbfo list-presentation="list"?>
  110. <?dbhtml list-presentation="table"?>
  111. <varlistentry id="tclsh&tcl-major-version;">
  112. <term><command>tclsh&tcl-major-version;</command></term>
  113. <listitem>
  114. <para>Tcl 命令行 shell</para>
  115. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  116. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  117. </indexterm>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry id="tclsh">
  121. <term><command>tclsh</command></term>
  122. <listitem>
  123. <para>一个指向 tclsh&tcl-major-version; 的链接</para>
  124. <indexterm zone="ch-tools-tcl tclsh">
  125. <primary sortas="b-tclsh">tclsh</primary>
  126. </indexterm>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="libtcl&tcl-major-version;.so">
  130. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  131. <listitem>
  132. <para>Tcl 运行库</para>
  133. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  134. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="libtclstub&tcl-major-version;.a">
  139. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  140. <listitem>
  141. <para>Tcl 端桩库</para>
  142. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  143. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  144. </indexterm>
  145. </listitem>
  146. </varlistentry>
  147. </variablelist>
  148. </sect2>
  149. </sect1>