[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3f8be484] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-glibc" role="wrap">
|
---|
| 9 | <?dbhtml filename="glibc.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Glibc-&glibc-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-glibc">
|
---|
| 14 | <primary sortas="a-Glibc">Glibc</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
[7dfa1a8] | 17 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 18 | href="../common/glibc.xml"
|
---|
| 19 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
[3f8be484] | 20 |
|
---|
| 21 | <sect2 role="installation">
|
---|
| 22 | <title>Installation of Glibc</title>
|
---|
| 23 |
|
---|
| 24 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 25 | href="../common/glibc.xml"
|
---|
[82f7fed] | 26 | xpointer="xpointer(//*[@os='z'])"/>
|
---|
[3f8be484] | 27 |
|
---|
| 28 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 29 | href="../common/glibc.xml"
|
---|
| 30 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
| 31 |
|
---|
[ed42345] | 32 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 33 | href="../common/glibc.xml"
|
---|
| 34 | xpointer="xpointer(//*[@os='p1'])"/>
|
---|
| 35 |
|
---|
| 36 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 37 | href="../common/glibc.xml"
|
---|
| 38 | xpointer="xpointer(//*[@os='p2'])"/>
|
---|
| 39 |
|
---|
[3f8be484] | 40 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 41 | href="../common/glibc.xml"
|
---|
| 42 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
| 43 |
|
---|
| 44 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 45 | href="../common/glibc.xml"
|
---|
| 46 | xpointer="xpointer(//*[@os='d'])"/>
|
---|
| 47 |
|
---|
| 48 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 49 | href="../common/glibc.xml"
|
---|
| 50 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 51 |
|
---|
| 52 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 53 | href="../common/glibc.xml"
|
---|
| 54 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 55 |
|
---|
[60f69d0] | 56 | <para os="l1">Tell Glibc to install its libraries into
|
---|
[3f8be484] | 57 | <filename class="directory">/lib</filename>:</para>
|
---|
| 58 |
|
---|
[52e5dd9] | 59 | <screen os="l2"><userinput>echo "slibdir=/lib" >> configparms</userinput></screen>
|
---|
[3f8be484] | 60 |
|
---|
| 61 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 62 | href="../common/glibc.xml"
|
---|
| 63 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 64 |
|
---|
[35543b7] | 65 | <screen os="h"><userinput>CFLAGS="-mtune=generic -g -O2" \
|
---|
| 66 | ../glibc-&glibc-version;/configure --prefix=/usr \
|
---|
[3f8be484] | 67 | --disable-profile --enable-add-ons --enable-kernel=2.6.0 \
|
---|
| 68 | --libexecdir=/usr/lib/glibc --libdir=/usr/lib</userinput></screen>
|
---|
| 69 |
|
---|
[52e5dd9] | 70 | <variablelist os="i">
|
---|
[3f8be484] | 71 | <title>The meaning of the new configure option:</title>
|
---|
| 72 |
|
---|
| 73 | <varlistentry>
|
---|
| 74 | <term><parameter>--libexecdir=/usr/lib/glibc</parameter></term>
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>This changes the location of the <command>pt_chown</command>
|
---|
| 77 | program from its default of <filename
|
---|
| 78 | class="directory">/usr/libexec</filename> to <filename
|
---|
[54d004a8] | 79 | class="directory">/usr/lib/glibc</filename>.</para>
|
---|
[3f8be484] | 80 | </listitem>
|
---|
| 81 | </varlistentry>
|
---|
| 82 | </variablelist>
|
---|
| 83 |
|
---|
| 84 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 85 | href="../common/glibc.xml"
|
---|
| 86 | xpointer="xpointer(//*[@os='j'])"/>
|
---|
| 87 |
|
---|
| 88 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 89 | href="../common/glibc.xml"
|
---|
| 90 | xpointer="xpointer(//*[@os='k'])"/>
|
---|
| 91 |
|
---|
| 92 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 93 | href="../common/glibc.xml"
|
---|
| 94 | xpointer="xpointer(//*[@os='l'])"/>
|
---|
| 95 |
|
---|
| 96 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 97 | href="../common/glibc.xml"
|
---|
| 98 | xpointer="xpointer(//*[@os='m'])"/>
|
---|
| 99 |
|
---|
| 100 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 101 | href="../multilib/glibc-64bit.xml"
|
---|
| 102 | xpointer="xpointer(//*[@os='n'])"/>
|
---|
| 103 |
|
---|
[3514708] | 104 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 105 | href="../multilib/glibc-64bit.xml"
|
---|
| 106 | xpointer="xpointer(//*[@os='o'])"/>
|
---|
| 107 |
|
---|
| 108 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 109 | href="../multilib/glibc-64bit.xml"
|
---|
| 110 | xpointer="xpointer(//*[@os='p'])"/>
|
---|
| 111 |
|
---|
[3f8be484] | 112 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 113 | href="../common/glibc.xml"
|
---|
| 114 | xpointer="xpointer(//*[@os='q'])"/>
|
---|
| 115 |
|
---|
| 116 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 117 | href="../common/glibc.xml"
|
---|
| 118 | xpointer="xpointer(//*[@os='r'])"/>
|
---|
| 119 |
|
---|
| 120 | <para>The install will finish by checking that everything is correctly installed.
|
---|
[5650fbe] | 121 | Unfortunately, it will test for a multilib installation. On x86_64 Pure64 this means
|
---|
[3f8be484] | 122 | it will try to test the non-existent 32-bit loader which has a different name
|
---|
| 123 | from the 64-bit loader (unlike on other 64-bit architectures). We fool it by
|
---|
| 124 | creating a symlink to the real loader.</para>
|
---|
| 125 |
|
---|
[ff10da6a] | 126 | <screen><userinput>ln -sv &glibc-ld-name; /lib/ld-linux.so.2</userinput></screen>
|
---|
[3f8be484] | 127 |
|
---|
| 128 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 129 | href="../common/glibc.xml"
|
---|
| 130 | xpointer="xpointer(//*[@os='s'])"/>
|
---|
| 131 |
|
---|
| 132 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 133 | href="../common/glibc.xml"
|
---|
| 134 | xpointer="xpointer(//*[@os='t'])"/>
|
---|
| 135 |
|
---|
| 136 | <para>Now we can remove this symlink. We also need to correct the <command>
|
---|
| 137 | /usr/bin/ldd</command> script - if you look at this, you will see it references
|
---|
| 138 | not only the 32-bit linker, but also /lib64 where it thinks the 64-bit linker
|
---|
[39139e4] | 139 | is. The following <command>sed</command> will correct this:</para>
|
---|
[3f8be484] | 140 |
|
---|
[94e6142] | 141 | <screen><userinput>rm -v /lib/ld-linux.so.2
|
---|
[d5cf87a3] | 142 | cp -v /usr/bin/ldd{,.bak}
|
---|
| 143 | sed '/RTLDLIST/s%/ld-linux.so.2 /lib64%%' /usr/bin/ldd.bak >/usr/bin/ldd</userinput></screen>
|
---|
[3f8be484] | 144 |
|
---|
| 145 | <para>Check the script to make sure the sed worked correctly, then delete
|
---|
| 146 | the backup.</para>
|
---|
| 147 |
|
---|
[94e6142] | 148 | <screen><userinput>rm -v /usr/bin/ldd.bak</userinput></screen>
|
---|
[3f8be484] | 149 |
|
---|
| 150 | </sect2>
|
---|
| 151 |
|
---|
| 152 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 153 | href="../common/glibc.xml"
|
---|
| 154 | xpointer="xpointer(id('i18n-glibc'))"/>
|
---|
| 155 |
|
---|
| 156 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 157 | href="../common/glibc.xml"
|
---|
| 158 | xpointer="xpointer(id('conf-glibc'))"/>
|
---|
| 159 |
|
---|
[3998188] | 160 | <sect2 id="conf-ld" role="configuration">
|
---|
| 161 | <title>Configuring The Dynamic Loader</title>
|
---|
| 162 |
|
---|
| 163 | <indexterm zone="conf-ld">
|
---|
| 164 | <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 |
|
---|
| 167 | <para>By default, the dynamic loader (<filename
|
---|
| 168 | class="libraryfile">/lib/ld-linux-x86-64.so.2</filename>) searches through
|
---|
| 169 | <filename class="directory">/lib</filename> and <filename
|
---|
| 170 | class="directory">/usr/lib</filename> for dynamic libraries that are
|
---|
| 171 | needed by programs as they are run. However, if there are libraries in
|
---|
| 172 | directories other than <filename class="directory">/lib</filename> and
|
---|
| 173 | <filename class="directory">/usr/lib</filename>, these need to be
|
---|
| 174 | added to the <filename>/etc/ld.so.conf</filename> file in order
|
---|
| 175 | for the dynamic loader to find them. Two directories that are commonly
|
---|
| 176 | known to contain additional libraries are <filename
|
---|
| 177 | class="directory">/usr/local/lib</filename> and <filename
|
---|
| 178 | class="directory">/opt/lib</filename>, so add those directories to the
|
---|
| 179 | dynamic loader's search path.</para>
|
---|
| 180 |
|
---|
| 181 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 182 | href="../common/glibc.xml"
|
---|
| 183 | xpointer="xpointer(//*[@os='ld-b'])"/>
|
---|
| 184 |
|
---|
| 185 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 186 | href="../common/glibc.xml"
|
---|
| 187 | xpointer="xpointer(//*[@os='ld-c'])"/>
|
---|
| 188 |
|
---|
| 189 | </sect2>
|
---|
[3f8be484] | 190 |
|
---|
| 191 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 192 | href="../common/glibc.xml"
|
---|
| 193 | xpointer="xpointer(id('contents-glibc'))"/>
|
---|
| 194 |
|
---|
| 195 | </sect1>
|
---|