Changeset a9fb6a45
- Timestamp:
- 01/01/2003 02:14:38 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, 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
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
bookinfo/copyright.xml
r49a7582 ra9fb6a45 1 1 <copyright id="copyright"> 2 2 3 <year>1999-200 2</year>3 <year>1999-2003</year> 4 4 <holder>Gerard Beekmans</holder> 5 5 -
chapter06/glibc-inst.xml
r49a7582 ra9fb6a45 1 1 <sect2> 2 2 <title>Installation of Glibc</title> 3 4 <para>This package requires its patch to be applied before you can5 install it.</para>6 3 7 4 <para>Before starting to install glibc, you must cd into the … … 20 17 is putting your system at very high risk.</para> 21 18 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 20 things:</para> 23 21 24 <para><screen><userinput>patch -Np1 -i ../glibc-&glibc-patch-version;.patch && 25 touch /etc/ld.so.conf && 26 mkdir ../glibc-build && 27 cd ../glibc-build && 28 ../glibc-&glibc-version;/configure --prefix=/usr --disable-profile \ 29 --enable-add-ons --libexecdir=/usr/bin && 30 echo "cross-compiling = no" > configparms && 31 make && 32 make install && 33 make localedata/install-locales && 34 exec /static/bin/bash --login</userinput></screen></para> 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 perl because the Perl package hasn't been 27 installed yet.</para></listitem> 35 28 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> 30 with <emphasis>0</emphasis> in the <filename>login/Makefile</filename> 31 file. This is done because Glibc itself isn't installed yet and therefore 32 username to userid resolving isn't working yet, so a 33 <userinput>chown root file</userinput> will fail, however it'll work fine 34 if you use the numeric IDs (such as <userinput>chown 0 35 file</userinput>).</para></listitem> 44 36 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 38 statically linked binaries to crash that were linked against Glibc-2.2 39 libraries. This patch is only needed temporarily because we have static 40 programs in <filename class="directory">/static/bin</filename> that might 41 be linked against an older Glibc version (the one from the host 42 distribution). We will install Glibc again at the end of this chapter to 43 remove this patch so you'll have a pristine Glibc as the developers 44 intended 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 50 and 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 55 Glibc outside of the source directory in a dedicated directory. Let's 56 create such a directory and make it our CWD (Current Working 57 Directory).</para> 58 59 <para><screen><userinput>mkdir ../glibc-build && 60 cd ../glibc-build &&</userinput></screen></para> 61 62 <para>Next, configure Glibc.</para> 63 64 <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \ 65 --disable-profile --enable-add-ons \ 66 --libexecdir=/usr/bin</userinput></screen></para> 49 67 50 68 <para>During the configure stage you will see the following warning:</para> … … 64 82 would require you to re-generate the binary files.</para> 65 83 84 <para>The meaning of the configure switches are:</para> 85 86 <itemizedlist> 87 <listitem><para><userinput>--disable-profile:</userinput> This disables the 88 building of libraries with profiling information. This command may be 89 omitted if you plan to do profiling.</para></listitem> 90 91 <listitem><para><userinput>--enable-add-ons:</userinput> This enables the 92 add-on that we install with Glibc, linuxthreads</para></listitem> 93 94 <listitem><para><userinput>--libexecdir=/usr/bin:</userinput> This will 95 cause the pt_chown program to be installed in the /usr/bin 96 directory.</para></listitem> 97 </itemizedlist> 98 99 <para>Because Glibc hasn't been installed yet, one of the tests that was 100 run by the configure script failed. This test is supposed to test gcc to 101 determine whether or not a cross-compiler is installed. However, Glibc 102 needs to be installed already to run this test. Since the test failed, the 103 configure script automatically assumed we do have a cross-compiler. So, 104 we have to override that assumption by explicitly telling Glibc we're not 105 cross-compiling.</para> 106 107 <para><screen><userinput>echo "cross-compiling = no" > configparms</userinput></screen></para> 108 109 <para>We'll continue with compiling and installing Glibc. The Linuxthreads man 110 pages are not going to be installed at this point because it requires a 111 working Perl installation. We'll install Perl later on in this chapter, 112 and the man pages will be installed when Glibc is installed for the second 113 time at the end of this chapter.</para> 114 115 <para><screen><userinput>make && 116 make install</userinput></screen></para> 117 118 <para>Locales aren't installed by default so we install them now. Locales 119 are used by Glibc to make your Linux system talk in a different language 120 such 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 125 localedata/install-locales</userinput> is to only install those locales 126 which you need or want. This can be achieved using the localedef 127 command. Information on this can be found in the INSTALL 128 file in the glibc-&glibc-version; tree.</para> 129 130 <para>To finish off the installation we'll reload Bash so it uses the new 131 libnss files. This will get rid of the <emphasis>I have no name!</emphasis> 132 message in the command prompt.</para> 133 134 <para><screen><userinput>exec /static/bin/bash --login</userinput></screen></para> 135 66 136 </sect2> 67 137 -
chapter06/glibc.xml
r49a7582 ra9fb6a45 7 7 8 8 &c6-glibc-inst; 9 &c6-glibc-exp;10 9 &aa-glibc-desc; 11 10 &aa-glibc-dep; -
index.xml
r49a7582 ra9fb6a45 5 5 <!ENTITY book SYSTEM "book/book.xml"> 6 6 7 <!ENTITY version "200 21231">8 <!ENTITY releasedate " December 31st, 2002">7 <!ENTITY version "20030101"> 8 <!ENTITY releasedate "January 1st, 2003"> 9 9 10 10 <!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org"> … … 164 164 165 165 </book> 166
Note:
See TracChangeset
for help on using the changeset viewer.