Changeset a9fb6a45


Ignore:
Timestamp:
01/01/2003 02:14:38 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, 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, v4_1, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
a20338e
Parents:
49a7582
Message:

new copyright year, glibc install change beta

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

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bookinfo/copyright.xml

    r49a7582 ra9fb6a45  
    11<copyright id="copyright">
    22
    3         <year>1999-2002</year>
     3        <year>1999-2003</year>
    44        <holder>Gerard Beekmans</holder>
    55
  • chapter06/glibc-inst.xml

    r49a7582 ra9fb6a45  
    11<sect2>
    22<title>Installation of Glibc</title>
    3 
    4 <para>This package requires its patch to be applied before you can
    5 install it.</para>
    63
    74<para>Before starting to install glibc, you must cd into the
     
    2017is putting your system at very high risk.</para>
    2118
    22 <para>Install Glibc by running the following commands:</para>
     19<para>We'll start by applying a patch to Glibc that fixes a few
     20things:</para>
    2321
    24 <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch &amp;&amp;
    25 touch /etc/ld.so.conf &amp;&amp;
    26 mkdir ../glibc-build &amp;&amp;
    27 cd ../glibc-build &amp;&amp;
    28 ../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \
    29 &nbsp;&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
    30 echo "cross-compiling = no" &gt; configparms &amp;&amp;
    31 make &amp;&amp;
    32 make install &amp;&amp;
    33 make localedata/install-locales &amp;&amp;
    34 exec /static/bin/bash --login</userinput></screen></para>
     22<itemizedlist>
     23<listitem><para>It converts all occurrences of <emphasis>$(PERL)</emphasis>
     24to <emphasis>/usr/bin/perl</emphasis> in the
     25<filename>malloc/Makefile</filename> file. This is done because Glibc
     26can't autodetect the location of perl because the Perl package hasn't been
     27installed yet.</para></listitem>
    3528
    36 <para>An alternative to running <userinput>make
    37 localedata/install-locales</userinput> is to only install those locales
    38 which you need or want. This can be achieved using the localedef
    39 command. Information on this can be found in the INSTALL
    40 file in the glibc-&glibc-version; tree. One thing to note is that the
    41 <userinput>localedef</userinput> program assumes that the <filename
    42 class="directory">/usr/lib/locale</filename> directory exists, so you need
    43 to create it first.</para>
     29<listitem><para>It replaces all occurrences of <emphasis>root</emphasis>
     30with <emphasis>0</emphasis> in the <filename>login/Makefile</filename>
     31file. This is done because Glibc itself isn't installed yet and therefore
     32username to userid resolving isn't working yet, so a
     33<userinput>chown root file</userinput> will fail, however it'll work fine
     34if you use the numeric IDs (such as <userinput>chown 0
     35file</userinput>).</para></listitem>
    4436
    45 <para>The Linux Threads man pages are not going to be installed at this
    46 point because it requires a working Perl installation. We'll install Perl
    47 later on in this chapter, and the man pages will be installed when Glibc is
    48 installed for the second time at the end of this chapter.</para>
     37<listitem><para>Lastly, the patch also fixes a problem that causes
     38statically linked binaries to crash that were linked against Glibc-2.2
     39libraries. This patch is only needed temporarily because we have static
     40programs in <filename class="directory">/static/bin</filename> that might
     41be linked against an older Glibc version (the one from the host
     42distribution). We will install Glibc again at the end of this chapter to
     43remove this patch so you'll have a pristine Glibc as the developers
     44intended it.</para></listitem>
     45</itemizedlist>
     46
     47<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch</userinput></screen></para>
     48
     49<para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file
     50and abort with an error if the file is missing, so we create it.</para>
     51
     52<para><screen><userinput>touch /etc/ld.so.conf</userinput></screen></para>
     53
     54<para>It is recommended by the Glibc installation documentation to build
     55Glibc outside of the source directory in a dedicated directory. Let's
     56create such a directory and make it our CWD (Current Working
     57Directory).</para>
     58
     59<para><screen><userinput>mkdir ../glibc-build &amp;&amp;
     60cd ../glibc-build &amp;&amp;</userinput></screen></para>
     61
     62<para>Next, configure Glibc.</para>
     63
     64<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
     65&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
     66&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin</userinput></screen></para>
    4967
    5068<para>During the configure stage you will see the following warning:</para>
     
    6482would require you to re-generate the binary files.</para>
    6583
     84<para>The meaning of the configure switches are:</para>
     85
     86<itemizedlist>
     87<listitem><para><userinput>--disable-profile:</userinput> This disables the
     88building of libraries with profiling information. This command may be
     89omitted if you plan to do profiling.</para></listitem>
     90
     91<listitem><para><userinput>--enable-add-ons:</userinput> This enables the
     92add-on that we install with Glibc, linuxthreads</para></listitem>
     93
     94<listitem><para><userinput>--libexecdir=/usr/bin:</userinput> This will
     95cause the pt_chown program to be installed in the /usr/bin
     96directory.</para></listitem>
     97</itemizedlist>
     98
     99<para>Because Glibc hasn't been installed yet, one of the tests that was
     100run by the configure script failed. This test is supposed to test gcc to
     101determine whether or not a cross-compiler is installed. However, Glibc
     102needs to be installed already to run this test. Since the test failed, the
     103configure script automatically assumed we do have a cross-compiler. So,
     104we have to override that assumption by explicitly telling Glibc we're not
     105cross-compiling.</para>
     106
     107<para><screen><userinput>echo "cross-compiling = no" &gt; configparms</userinput></screen></para>
     108
     109<para>We'll continue with compiling and installing Glibc. The Linuxthreads man
     110pages are not going to be installed at this point because it requires a
     111working Perl installation. We'll install Perl later on in this chapter,
     112and the man pages will be installed when Glibc is installed for the second
     113time at the end of this chapter.</para>
     114
     115<para><screen><userinput>make &amp;&amp;
     116make install</userinput></screen></para>
     117
     118<para>Locales aren't installed by default so we install them now. Locales
     119are used by Glibc to make your Linux system talk in a different language
     120such as your native tongue.</para>
     121
     122<para><screen><userinput>make localedata/install-locales</userinput></screen></para>
     123
     124<para>An alternative to running <userinput>make
     125localedata/install-locales</userinput> is to only install those locales
     126which you need or want. This can be achieved using the localedef
     127command. Information on this can be found in the INSTALL
     128file in the glibc-&glibc-version; tree.</para>
     129
     130<para>To finish off the installation we'll reload Bash so it uses the new
     131libnss files. This will get rid of the <emphasis>I have no name!</emphasis>
     132message in the command prompt.</para>
     133
     134<para><screen><userinput>exec /static/bin/bash --login</userinput></screen></para>
     135
    66136</sect2>
    67137
  • chapter06/glibc.xml

    r49a7582 ra9fb6a45  
    77
    88&c6-glibc-inst;
    9 &c6-glibc-exp;
    109&aa-glibc-desc;
    1110&aa-glibc-dep;
  • index.xml

    r49a7582 ra9fb6a45  
    55<!ENTITY book SYSTEM "book/book.xml">
    66
    7 <!ENTITY version "20021231">
    8 <!ENTITY releasedate "December 31st, 2002">
     7<!ENTITY version "20030101">
     8<!ENTITY releasedate "January 1st, 2003">
    99
    1010<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
     
    164164
    165165</book>
     166
Note: See TracChangeset for help on using the changeset viewer.