OSDN Git Service

[lfsja-git] r11.1-50 対応。
[lfsbookja/lfsja-git.git] / src / chapter05 / glibc.ch
1 %
2 % This is part of LFSbookja package.
3 %
4 % This is a CTIE change file for the original XML source of the LFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13   <indexterm zone="ch-tools-glibc">
14     <primary sortas="a-Glibc">Glibc</primary>
15     <secondary>tools</secondary>
16   </indexterm>
17 @y
18   <indexterm zone="ch-tools-glibc">
19     <primary sortas="a-Glibc">Glibc</primary>
20     <secondary>&Tools;</secondary>
21   </indexterm>
22 @z
23
24 @x
25     <title>Installation of Glibc</title>
26 @y
27     <title>&InstallationOf1;Glibc&InstallationOf2;</title>
28 @z
29
30 @x
31     <para>First, create a symbolic link for LSB compliance. Additionally,
32     for x86_64, create a compatibility symbolic link required for proper
33     operation of the dynamic library loader:</para>
34 @y
35     <para>
36     はじめに LSB コンプライアンスに合うように、シンボリックリンクを生成します。
37     さらに x86_64 向けとして、互換のシンボリックリンクを生成して、ダイナミックライブラリローダーが適切に動作するようにします。
38     </para>
39 @z
40
41 @x
42         The above command is correct.  The <command>ln</command> command has
43         a few syntactic versions, so be sure to check
44         <command>info coreutils ln</command> and <filename>ln(1)</filename>
45         before reporting what you may think is an error.
46 @y
47         上記のコマンドに間違いはありません。
48         <command>ln</command> コマンドにはいくつか文法の異なるバージョンがあります。
49         間違いがあると思った場合には <command>info coreutils ln</command> や <filename>ln(1)</filename> をよく確認してください。
50 @z
51
52 @x
53     <para>Some of the Glibc programs use the non-FHS compliant
54     <filename class="directory">/var/db</filename> directory to store their
55     runtime data. Apply the following patch to make such programs store their
56     runtime data in the FHS-compliant locations:</para>
57 @y
58     <para>
59     Glibc のプログラムの中で、FHS コンプライアンスに適合しない <filename
60     class="directory">/var/db</filename> ディレクトリを用いているものがあり、そこに実行時データを保存しています。
61     以下のパッチを適用することで、実行時データの保存ディレクトリを FHS に合致するものとします。
62     </para>
63 @z
64
65 @x
66     <para>The Glibc documentation recommends building Glibc
67     in a dedicated build directory:</para>
68 @y
69     <para>
70     Glibc のドキュメントでは、専用のビルドディレクトリを作成することが推奨されています。
71     </para>
72 @z
73
74 @x
75     <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
76     utilities are installed into
77     <filename class="directory">/usr/sbin</filename>:</para>
78 @y
79     <para>
80     <command>ldconfig</command> と <command>sln</command> ユーティリティーを <filename
81     class="directory">/usr/sbin</filename> にインストールするようにします。
82     </para>
83 @z
84
85 @x
86     <para>Next, prepare Glibc for compilation:</para>
87 @y
88     <para>
89     次に Glibc をコンパイルするための準備をします。
90     </para>
91 @z
92
93 @x
94       <title>The meaning of the configure options:</title>
95 @y
96       <title>&MeaningOfOption1;configure&MeaningOfOption2;</title>
97 @z
98
99 @x --host=$LFS_TGT, --build=$(../glibc-&glibc-version;/scripts/config.guess)
100           <para>The combined effect of these switches is that Glibc's build system
101           configures itself to be cross-compiled, using the cross-linker and
102           cross-compiler in <filename class="directory">$LFS/tools</filename>.</para>
103 @y
104           <para>
105           このようなオプションを組み合わせることで <filename
106           class="directory">/tools</filename> ディレクトリにあるクロスコンパイラー、クロスリンカーを使って Glibc がクロスコンパイルされるようになります。
107           </para>
108 @z
109
110 @x --enable-kernel
111           <para>This tells Glibc to compile the library with support
112           for &min-kernel; and later Linux kernels.  Workarounds for older
113           kernels are not enabled.</para>
114 @y
115           <para>
116           Linux カーネル &min-kernel; 以上のサポートを行うよう指示します。
117           これ以前のカーネルは利用することができません。
118           </para>
119 @z
120
121 @x --with-headers=$LFS/usr/include
122           <para>This tells Glibc to compile itself against the headers
123           recently installed to the $LFS/usr/include directory, so that
124           it knows exactly what features the kernel has and can optimize
125           itself accordingly.</para>
126 @y
127           <para>
128           これまでに $LFS/usr/include ディレクトリにインストールしたヘッダーファイルを用いて Glibc をビルドすることを指示します。
129           こうすればカーネルにどのような機能があるか、どのようにして処理効率化を図れるかなどの情報を Glibc が得られることになります。
130           </para>
131 @z
132
133 @x libc_cv_slibdir=/usr/lib
134           <para>This ensures that the library is installed in /usr/lib instead
135           of the default /lib64 on 64 bit machines.</para>
136 @y
137           <para>
138           この指定は 64 ビットマシンにおいて、ライブラリのインストール先をデフォルトの /lib64 ではなく /usr/lib とします。
139           </para>
140 @z
141
142 %@x libc_cv_include_x86_isa_level=no
143 %          <para>This disables <quote>x86 ISA needed</quote> property in
144 %          Glibc libraries.  Use it <emphasis role="bold">if</emphasis>
145 %          you are building Glibc with <option>-march</option> option in
146 %          <envar>CFLAGS</envar>, to workaround an issue in Glibc-2.33
147 %          breaking it.</para>
148 %@y
149 %          <para>
150 %          これは Glibc ライブラリ内の<quote>x86 ISA needed</quote>プロパティを無効にします。
151 %          Glibc のビルド時に <envar>CFLAGS</envar> として <option>-march</option> を設定している <emphasis
152 %          role="bold">場合に限っては</emphasis> これを有効にします。
153 %          そうすることで Glibc-2.33 における問題が回避できます。
154 %          </para>
155 %@z
156
157 @x
158     <para>During this stage the following warning might appear:</para>
159 @y
160     <para>
161     ビルド中には以下のようなメッセージが出力されるかもしれません。
162     </para>
163 @z
164
165 @x
166     <para>The missing or incompatible <command>msgfmt</command> program is
167     generally harmless. This <command>msgfmt</command> program is part of the
168     Gettext package which the host distribution should provide.</para>
169 @y
170     <para>
171     <command>msgfmt</command> プログラムがない場合 (missing) や互換性がない場合 (incompatible) でも特に問題はありません。
172     <command>msgfmt</command> プログラムは Gettext パッケージが提供するもので、ホストシステムに含まれているかもしれません。
173     </para>
174 @z
175
176 @x
177     <note><para>There have been reports that this package may fail when
178     building as a "parallel make".  If this occurs, rerun the make command
179     with a "-j1" option.</para></note>
180 @y
181     <note><para>本パッケージは "並行ビルド (parallel make)" を行うとビルドに失敗するとの報告例があります。
182     もしビルドに失敗した場合は make コマンドに "-j1" オプションをつけて再ビルドしてください。
183     </para></note>
184 @z
185
186 @x
187     <para>Compile the package:</para>
188 @y
189     <para>&CompileThePackage;</para>
190 @z
191
192 @x
193     <para>Install the package:</para>
194 @y
195     <para>&InstallThePackage;</para>
196 @z
197
198 @x
199     <warning><para>If <envar>LFS</envar> is not properly set, and despite the
200     recommendations, you are building as
201     <systemitem class="username">root</systemitem>, the next command will
202     install the newly built glibc to your host system, which most likely
203     will render it unusable. So double check that the environment is
204     correctly set, before running the following command.</para></warning>
205 @y
206     <warning><para>
207     <envar>LFS</envar> が適切に設定されていない状態で、推奨する方法とは異なり <systemitem class="username">root</systemitem> によってビルドを行うと、次のコマンドはビルドした glibc をホストシステムにインストールしてしまいます。
208     これを行ってしまうと、ほぼ間違いなくホストが利用不能になります。
209     したがってその環境変数が適切に設定されていることを確認してから、以下のコマンドを実行してください。
210     </para></warning>
211 @z
212
213 @x
214       <title>The meaning of the <command>make install</command> option:</title>
215 @y
216       <title>&MeaningOfOption1;<command>make install</command>&MeaningOfOption2;</title>
217 @z
218
219 @x DESTDIR=$LFS
220           <para>The <envar>DESTDIR</envar> make variable is used by almost all
221           packages to define the location where the package should be
222           installed. If it is not set, it defaults to the root (<filename
223           class="directory">/</filename>) directory. Here we specify that
224           the package be installed in <filename class="directory">$LFS
225           </filename>, which will become the root after <xref linkend=
226           "ch-tools-chroot"/>.</para>
227 @y
228           <para>
229           make 変数 <envar>DESTDIR</envar> はほとんどすべてのパッケージにおいて、そのパッケージをインストールするディレクトリを定義するために利用されています。
230           これが設定されていない場合のデフォルトは、ルートディレクトリ(<filename
231           class="directory">/</filename>)となります。
232           ここではパッケージのインストール先を <filename
233           class="directory">$LFS</filename> とします。
234           これは <xref linkend="ch-tools-chroot"/> に入ってからはルートディレクトリとなります。
235           </para>
236 @z
237
238 @x
239     <para>Fix hardcoded path to the executable loader in
240     <command>ldd</command> script:</para>
241 @y
242     <para>
243     <command>ldd</command> スクリプト内にある実行可能なローダーへのパスがハードコーディングされているので、これを修正します。
244     </para>
245 @z
246
247 @x
248       <para>At this point, it is imperative to stop and ensure that the basic
249       functions (compiling and linking) of the new toolchain are working as
250       expected. To perform a sanity check, run the following commands:</para>
251 @y
252       <para>
253       この時点で以下を必ず実施します。
254       新しいツールチェーンの基本的な機能 (コンパイルやリンク) が正常に処理されるかどうかを確認することです。
255       健全性のチェック (sanity check) を行うものであり、以下のコマンドを実行します。
256       </para>
257 @z
258
259 @x
260       <para>If everything is working correctly, there should be no errors,
261       and the output of the last command will be of the form:</para>
262 @y
263       <para>
264       すべてが正常に処理され、エラーが発生しなければ、最終のコマンドの実行結果として以下が出力されるはずです。
265       </para>
266 @z
267
268 @x
269       <para>Note that for 32-bit machines, the interpreter name will be
270       <filename>/lib/ld-linux.so.2</filename>.</para>
271 @y
272       <para>
273       インタープリター名は 32 ビットマシンの場合 <filename>/lib/ld-linux.so.2</filename> となります。
274       </para>
275 @z
276
277 @x
278       <para>If the output is not shown as above or there was no output at all,
279       then something is wrong. Investigate and retrace the steps to find out
280       where the problem is and correct it. This issue must be resolved before
281       continuing on.</para>
282 @y
283       <para>
284       出力結果が上とは異なったり、あるいは何も出力されなかったりした場合は、どこかに不備があります。
285       どこに問題があるのか調査、再試行を行って解消してください。
286       解決せずにこの先に進まないでください。
287       </para>
288 @z
289
290 @x
291       <para>Once all is well, clean up the test files:</para>
292 @y
293       <para>
294       すべてが完了したら、テストファイルを削除します。
295       </para>
296 @z
297
298 @x
299     <note><para>Building packages in the next chapter will serve as an
300     additional check that the toolchain has been built properly. If some
301     package, especially binutils-pass2 or gcc-pass2, fails to build, it is
302     an indication that something has gone wrong with the
303     previous Binutils, GCC, or Glibc installations.</para></note>
304 @y
305     <note><para>
306     次節にてビルドするパッケージでは、ツールチェーンが正しく構築できたかどうかを再度チェックすることになります。
307     特に binutils 2 回めや gcc 2 回めのビルドに失敗したら、それ以前にインストールしてきた binutils, GCC, glibc のいずれかにてビルドがうまくできていないことを意味します。
308     </para></note>
309 @z
310
311 @x
312     <para>Now that our cross-toolchain is complete, finalize the installation
313     of the limits.h header. For doing so, run a utility provided by the GCC
314     developers:</para>
315 @y
316     <para>
317     ここでクロスツールチェーンが完成しました。
318     そこで limits.h のインストールを確定させます。
319     これには GCC 開発者が提供するユーティリティーを実行します。
320     </para>
321 @z
322
323 @x
324     <para>Details on this package are located in
325     <xref linkend="contents-glibc" role="."/></para>
326 @y
327     <para>
328     &Details1;<xref linkend="contents-glibc" role=""/>&Details2;
329     </para>
330 @z