Changeset bc82645e for chapter06/glibc-inst.xml
- Timestamp:
- 05/02/2003 06:20:20 PM (21 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 8727a64
- Parents:
- 55b50e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/glibc-inst.xml
r55b50e3 rbc82645e 3 3 <sect2> 4 4 <title>Glibc installation</title> 5 6 <para>Before starting to install Glibc, you must <userinput>cd</userinput>7 into the <filename>glibc-&glibc-version;</filename> directory and unpack8 Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as9 you would normally do.</para>10 11 <para>This package is known to behave badly when you have changed its12 default optimization flags (including the -march and -mcpu options).13 Therefore, if you have defined any environment variables that override14 default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting15 them when building Glibc.</para>16 17 <para>Basically, compiling Glibc in any other way than the book suggests18 is putting your system at a very high risk.</para>19 20 <para>We'll start by applying a patch that does the following:</para>21 22 <itemizedlist>23 <listitem><para>It converts all occurrences of <emphasis>$(PERL)</emphasis>24 to <emphasis>/usr/bin/perl</emphasis> in the25 <filename>malloc/Makefile</filename> file. This is done because Glibc26 can't autodetect the location of <filename>perl</filename> because the Perl27 package hasn't been installed yet. And if Glibc thinks Perl isn't installed, the28 perl program <filename>mtrace</filename> won't be installed29 either.</para></listitem>30 31 <listitem><para>It replaces all occurrences of <emphasis>root</emphasis>32 with <emphasis>0</emphasis> in the <filename>login/Makefile</filename>33 file. This is done because Glibc itself isn't installed yet and therefore34 username-to-userid resolving isn't working yet, so a35 <userinput>chown root file</userinput> would fail. Using numeric IDs (as in36 <userinput>chown 0 file</userinput>) works fine.</para></listitem>37 38 </itemizedlist>39 40 <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-rootperl-patch-version;-root-perl.patch</userinput></screen></para>41 42 <para>There is a potential problem that causes statically linked binaries43 to crash that were linked against Glibc-2.2 or older libraries. Even though44 static binaries have all the necessary parts of Glibc built-in, they still45 rely on one external library set: Glibc's NSS libraries. These libraries,46 among other things, tell programs where the system's password database is47 (in <filename>/etc/password</filename>, NIS, or whatever other scheme has48 been configured).</para>49 50 <para>Glibc has undergone some changes since version 2.2.x and the new NSS51 code is incompatible with the old one. So when Glibc is installed it will52 install its new NSS libraries, and static programs will load these new NSS53 libraries and will abort with a <emphasis>segmentation fault</emphasis>54 error. This patch undoes some of the changes to overcome the problem.</para>55 56 <para>If you started chapter 5 with a host system that uses Glibc-2.2.x57 or older, you must apply the following patch. We will install Glibc again at58 the end of this chapter to remove this patch so you'll have a pristine Glibc59 as the developers intended it.</para>60 61 <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-libnss-patch-version;-libnss.patch</userinput></screen></para>62 5 63 6 <para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file … … 74 17 <para>Next, prepare Glibc to be compiled:</para> 75 18 76 <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \ 19 <para><screen><userinput>CFLAGS="-O2 -pipe" \ 20 ../glibc-&glibc-version;/configure --prefix=/usr \ 77 21 --disable-profile --enable-add-ons \ 78 --libexecdir=/usr/bin</userinput></screen></para> 22 --libexecdir=/usr/bin \ 23 --with-headers=/usr/include \ 24 --mandir=/usr/share/man --infodir=/usr/share/info</userinput></screen></para> 79 25 80 26 <para>The meaning of the configure options are:</para> … … 131 77 time at the end of this chapter.</para> 132 78 79 <para><screen><userinput>make check</userinput></screen></para> 80 133 81 <para><screen><userinput>make install</userinput></screen></para> 134 82
Note:
See TracChangeset
for help on using the changeset viewer.