Ignore:
Timestamp:
05/02/2003 06:20:20 PM (21 years ago)
Author:
Gerard Beekmans <gerard@…>
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
Message:

Integrated Pure LFS - Phase 1

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2490 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/glibc-inst.xml

    r55b50e3 rbc82645e  
    33<sect2>
    44<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 unpack
    8 Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as
    9 you would normally do.</para>
    10 
    11 <para>This package is known to behave badly when you have changed its
    12 default optimization flags (including the -march and -mcpu options).
    13 Therefore, if you have defined any environment variables that override
    14 default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
    15 them when building Glibc.</para>
    16 
    17 <para>Basically, compiling Glibc in any other way than the book suggests
    18 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 the
    25 <filename>malloc/Makefile</filename> file. This is done because Glibc
    26 can't autodetect the location of <filename>perl</filename> because the Perl
    27 package hasn't been installed yet. And if Glibc thinks Perl isn't installed, the
    28 perl program <filename>mtrace</filename> won't be installed
    29 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 therefore
    34 username-to-userid resolving isn't working yet, so a
    35 <userinput>chown root file</userinput> would fail. Using numeric IDs (as in
    36 <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 binaries
    43 to crash that were linked against Glibc-2.2 or older libraries. Even though
    44 static binaries have all the necessary parts of Glibc built-in, they still
    45 rely on one external library set: Glibc's NSS libraries. These libraries,
    46 among other things, tell programs where the system's password database is
    47 (in <filename>/etc/password</filename>, NIS, or whatever other scheme has
    48 been configured).</para>
    49 
    50 <para>Glibc has undergone some changes since version 2.2.x and the new NSS
    51 code is incompatible with the old one. So when Glibc is installed it will
    52 install its new NSS libraries, and static programs will load these new NSS
    53 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.x
    57 or older, you must apply the following patch. We will install Glibc again at
    58 the end of this chapter to remove this patch so you'll have a pristine Glibc
    59 as the developers intended it.</para>
    60 
    61 <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-libnss-patch-version;-libnss.patch</userinput></screen></para>
    625
    636<para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file
     
    7417<para>Next, prepare Glibc to be compiled:</para>
    7518
    76 <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
     19<para><screen><userinput>CFLAGS="-O2 -pipe" \
     20&nbsp;&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/configure --prefix=/usr \
    7721&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
    78 &nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin</userinput></screen></para>
     22&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin \
     23&nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/usr/include \
     24&nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man --infodir=/usr/share/info</userinput></screen></para>
    7925
    8026<para>The meaning of the configure options are:</para>
     
    13177time at the end of this chapter.</para>
    13278
     79<para><screen><userinput>make check</userinput></screen></para>
     80
    13381<para><screen><userinput>make install</userinput></screen></para>
    13482
Note: See TracChangeset for help on using the changeset viewer.