* Upgrade to expect-5.43.0
[linux_from_scratch.git] / chapter06 / glibc.xml
blob210c588a2d0ed9d6987ccec22b5e5afa7fdd8155
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3   <!ENTITY % general-entities SYSTEM "../general.ent">
4   %general-entities;
5 ]>
6 <sect1 id="ch-system-glibc" xreflabel="Glibc" role="wrap">
7 <title>Glibc-&glibc-version;</title>
8 <?dbhtml filename="glibc.html"?>
10 <indexterm zone="ch-system-glibc"><primary sortas="a-Glibc">Glibc</primary></indexterm>
12 <sect2 role="package"><title/>
14 <segmentedlist>
15 <segtitle>&buildtime;</segtitle>
16 <segtitle>&diskspace;</segtitle>
17 <seglistitem><seg>12.3 SBU</seg><seg>784 MB</seg></seglistitem>
18 </segmentedlist>
20 </sect2>
22 <sect2 role="installation">
23 <title>Installation of Glibc</title>
25 <para>Create a build directory:</para>
27 <screen><userinput>mkdir ../glibc-build
28 cd ../glibc-build</userinput></screen>
30 <para>Now prepare Glibc for compilation:</para>
32 <screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
33     --disable-profile --enable-add-ons \
34     --enable-kernel=2.6.0 --without-cvs \
35     --libexecdir=/usr/lib/glibc</userinput></screen>
37 <para>Compile the package:</para>
39 <screen><userinput>make</userinput></screen>
41 <para>Test the results:</para>
43 <screen><userinput>make check</userinput></screen>
45 <para>The Glibc test suite is highly dependent on certain functions of your host
46 system. See testing for explanations.</para>
48 <para>Fix an annoying little warning with:</para>
50 <screen><userinput>touch /etc/ld.so.conf</userinput></screen>
52 <para>And install the package:</para>
54 <screen><userinput>make install</userinput></screen>
56 <para>To install the Glibc locales, use the following
57 command:</para>
59 <screen><userinput>make localedata/install-locales</userinput></screen>
61 <para>An alternative to running the previous command is to install only those
62 locales which you need or want. The following instructions, instead of the 
63 install-locales target above, will install the minimum set of locales necessary 
64 for the tests to run successfully:</para>
66 <screen><userinput>mkdir -p /usr/lib/locale
67 localedef -i de_DE -f ISO-8859-1 de_DE
68 localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
69 localedef -i en_HK -f ISO-8859-1 en_HK
70 localedef -i en_PH -f ISO-8859-1 en_PH
71 localedef -i en_US -f ISO-8859-1 en_US
72 localedef -i es_MX -f ISO-8859-1 es_MX
73 localedef -i fa_IR -f UTF-8 fa_IR
74 localedef -i fr_FR -f ISO-8859-1 fr_FR
75 localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
76 localedef -i it_IT -f ISO-8859-1 it_IT
77 localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
79 <para>Build the linuxthreads man pages:</para>
81 <screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man</userinput></screen>
83 <para>And install these pages:</para>
85 <screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man install</userinput></screen>
87 </sect2>
90 <sect2 id="conf-glibc" role="configuration"><title>Configuring Glibc</title>
92 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
93 following:</para>
95 <screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
96 <literal># Begin /etc/nsswitch.conf
98 passwd: files
99 group: files
100 shadow: files
102 hosts: files dns
103 networks: files
105 protocols: files
106 services: files
107 ethers: files
108 rpc: files
110 # End /etc/nsswitch.conf</literal>
111 EOF</userinput></screen>
113 <para>To find out what time zone you're in, run the following script:</para>
115 <screen><userinput>tzselect</userinput></screen>
117 <para>Then create the <filename>/etc/localtime</filename> file by running:</para>
119 <screen><userinput>cp --remove-destination /usr/share/zoneinfo/<replaceable>[xxx]</replaceable> \
120     /etc/localtime</userinput></screen>
122 </sect2>
125 <sect2 id="conf-ld" role="configuration">
126 <title>Configuring Dynamic Loader</title>
128 <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
129 following:</para>
131 <screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
132 <literal># Begin /etc/ld.so.conf
134 /usr/local/lib
135 /opt/lib
137 # End /etc/ld.so.conf</literal>
138 EOF</userinput></screen>
140 </sect2>
143 <sect2 id="contents-glibc" role="content"><title>Contents of Glibc</title>
145 <para>See testing</para>
147 </sect2>
149 </sect1>