Files
master/chapter05/tcl.html
2015-05-23 18:50:06 +08:00

243 lines
8.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
<title>
5.11.&nbsp;Tcl-8.6.3
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
media="print" />
</head>
<body class="lfs" id="lfs-7.7-systemd">
<div class="navheader">
<h4>
Linux From Scratch - Version 7.7-systemd
</h4>
<h3>
第五章 构建临时系统
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="gcc-pass2.html" title=
"GCC-4.9.2 - Pass 2">上一页</a>
<p>
GCC-4.9.2 - 第2遍
</p>
</li>
<li class="next">
<a accesskey="n" href="expect.html" title="Expect-5.45">下一页</a>
<p>
Expect-5.45
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
<div class="wrap" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="ch-tools-tcl" name="ch-tools-tcl"></a>5.11. Tcl-8.6.3
</h1>
<div class="package" lang="en" xml:lang="en">
<p>
Tcl软件包包含Tool Command Language相关程序。
</p>
<div class="segmentedlist">
<div class="seglistitem">
<div class="seg">
<strong class="segtitle">估计构建时间:</strong>
<span class="segbody">0.8 SBU</span>
</div>
<div class="seg">
<strong class="segtitle">所需磁盘空间:</strong>
<span class="segbody">67 MB</span>
</div>
</div>
</div>
</div>
<div class="installation" lang="en" xml:lang="en">
<h2 class="sect2">
5.11.1. 安装Tcl
</h2>
<p>
这个软件包和后面三个包Expect、DejaGNU和Check被装来支持运行GCC和Binutils和其他软件包的测试套件。仅仅为了测试目的安装4个软件包看上去有点奢侈虽然并不是必要的但是知道大多数重要工具都工作正常能让人很放心。就算本章里没有执行测试套件并不做要求在本书<a class="xref" href="../chapter06/chapter06.html" title="第六章 安装基本的系统软件">第六章</a>都要求执行这些软件包自带的测试套件。
</p>
<p>
配置Tcl准备编译
</p>
<pre class="userinput">
<kbd class="command">cd unix
./configure --prefix=/tools</kbd>
</pre>
<p>
编译软件包:
</p>
<pre class="userinput">
<kbd class="command">make</kbd>
</pre>
<p>
现在编译已经完成。之前说过不要求为本章中所构建的临时工具运行测试套件。不过你仍然要测试Tcl的话可以用下面的命令
</p>
<pre class="userinput">
<kbd class="command">TZ=UTC make test</kbd>
</pre>
<p>
Tcl测试套件在宿主机某些特定条件下会失败这个还没完全掌握。不过测试套件失败并不奇怪也不认为是关键问题。参数<em class="parameter"><code>TZ=UTC</code></em>设定了时区和相应的世界标准时间UTC但是只会对测试套件运行期间才有效。这个可以保证时钟测试能正常运行。关于<code class="envar">TZ</code>环境变量的细节请参阅本书<a class="xref" href="../chapter07/chapter07.html" title="第五章 构建临时系统 Configuration">第7章</a>
</p>
<p>
安装软件包:
</p>
<pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
<p>
让安装的库文件可写,这样之后可以删除调试符号。
</p>
<pre class="userinput">
<kbd class="command">chmod -v u+w /tools/lib/libtcl8.6.so</kbd>
</pre>
<p>
安装Tcl的头文件。后面的Expect软件包在编译的时候要用到。
</p>
<pre class="userinput">
<kbd class="command">make install-private-headers</kbd>
</pre>
<p>
现在创建几个必要的软链接:
</p>
<pre class="userinput">
<kbd class="command">ln -sv tclsh8.6 /tools/bin/tclsh</kbd>
</pre>
</div>
<div class="content" lang="en" xml:lang="en">
<h2 class="sect2">
<a id="contents-tcl" name="contents-tcl"></a>5.11.2. Tcl软件包内容
</h2>
<div class="segmentedlist">
<div class="seglistitem">
<div class="seg">
<strong class="segtitle">安装的程序:</strong>
<span class="segbody">tclsh (软链接到tclsh8.6)和tclsh8.6</span>
</div>
<div class="seg">
<strong class="segtitle">安装的库:</strong>
<span class="segbody">libtcl8.6.so, libtclstub8.6.a</span>
</div>
</div>
</div>
<div class="variablelist">
<h3>
简短描述
</h3>
<table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top" />
<col />
</colgroup>
<tbody>
<tr>
<td>
<p>
<a id="tclsh8.6" name="tclsh8.6"></a><span class=
"term"><span class=
"command"><strong>tclsh8.6</strong></span></span>
</p>
</td>
<td>
<p>
Tcl命令终端
</p>
</td>
</tr>
<tr>
<td>
<p>
<a id="tclsh" name="tclsh"></a><span class=
"term"><span class=
"command"><strong>tclsh</strong></span></span>
</p>
</td>
<td>
<p>
软链接到tclsh8.6
</p>
</td>
</tr>
<tr>
<td>
<p>
<a id="libtcl8.6.so" name="libtcl8.6.so"></a><span class=
"term"><code class="filename">libtcl8.6.so</code></span>
</p>
</td>
<td>
<p>
Tcl库
</p>
</td>
</tr>
<tr>
<td>
<p>
<a id="libtclstub8.6.a" name=
"libtclstub8.6.a"></a><span class="term"><code class=
"filename">libtclstub8.6.a</code></span>
</p>
</td>
<td>
<p>
Tcl Stub库
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="navfooter">
<div class="book">
<div class="titlepage">
<div class="author">
<span class="firstname">翻译团队:<a href="http://lctt.github.io/" target="_blank">LCTT</a></span>
<span class="surname">译者/校对:<a href="http://github.com/zpl1025" target="_blank">zpl1025</a>/</span>
</div>
</div>
</div>
<ul>
<li class="prev">
<a accesskey="p" href="gcc-pass2.html" title=
"GCC-4.9.2 - Pass 2">上一页</a>
<p>
GCC-4.9.2 - 第2遍
</p>
</li>
<li class="next">
<a accesskey="n" href="expect.html" title="Expect-5.45">下一页</a>
<p>
Expect-5.45
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter05.html" title=
"第五章 构建临时系统">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
</body>
</html>