Changeset d3d229f
- Timestamp:
- 02/20/2003 01:59:14 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:
- 3ae77e1
- Parents:
- 212a71b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/config-glibc.xml
r212a71b rd3d229f 3 3 <sect2><title>Configuring Glibc</title> 4 4 5 <para>We need to create the /etc/nsswitch.conf file. Although glibc should6 provide defaults when this file is missing or corrupt, its defaults don't work 7 well with networking. That is dealt with in a later chapter. Also, our 8 t imezone needs to be set up.</para>5 <para>We need to create the <filename>/etc/nsswitch.conf</filename> file, 6 because, although Glibc provides defaults when this file is missing or corrupt, 7 the Glibc defaults don't work well with networking. Also, our timezone needs 8 to be set up.</para> 9 9 10 10 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the … … 33 33 <userinput>EOF</userinput></screen></para> 34 34 35 <para>The <userinput>tzselect</userinput> script has to be run and the 36 questions regarding your timezone have to be answered. 37 When you're done, the script will give the 38 location of the needed timezone file.</para> 35 <para>To find out what timezone you're in, run the following script:</para> 39 36 40 <para> Create the <filename class="directory">/etc/localtime</filename> symlink 41 by running:</para> 37 <para><screen><userinput>tzselect</userinput></screen></para> 42 38 43 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/<tzselect's output> /etc/localtime</userinput></screen></para> 44 45 <para>tzselect's output can be something like <emphasis>EST5EDT</emphasis> or 46 <emphasis>Canada/Eastern</emphasis>.</para> 47 48 <para>The symlink you'd create with that information would be:</para> 49 50 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime</userinput></screen></para> 51 52 <para>Or:</para> 39 <para>When you've answered a few questions about your location, the script will 40 output the name of your timezone, something like <emphasis>EST5EDT</emphasis> 41 or <emphasis>Canada/Eastern</emphasis>. Then create the 42 <filename>/etc/localtime</filename> symlink by running:</para> 53 43 54 44 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen></para> 45 46 <para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in 47 the name of the timezone that the <userinput>tzselect</userinput> script 48 gave you.</para> 55 49 56 50 </sect2> -
chapter06/glibc-inst.xml
r212a71b rd3d229f 4 4 <title>Glibc installation</title> 5 5 6 <para>Before starting to install glibc, you must cd into the7 glibc-&glibc-version; directory and unpack glibc-linuxthreads inside 8 the glibc-&glibc-version; directory, not in /usr/src as you normally 9 woulddo.</para>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 10 11 11 <para>This package is known to behave badly when you have changed its … … 13 13 Therefore, if you have defined any environment variables that override 14 14 default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting 15 or modifyingthem when building Glibc.</para>15 them when building Glibc.</para> 16 16 17 17 <para>Basically, compiling Glibc in any other way than the book suggests 18 18 is putting your system at a very high risk.</para> 19 19 20 <para>We'll start by applying a patch t o Glibc that fixes the following:</para>20 <para>We'll start by applying a patch that does the following:</para> 21 21 22 22 <itemizedlist> … … 24 24 to <emphasis>/usr/bin/perl</emphasis> in the 25 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 been27 installed yet. And if Glibc thinks Perl isn't installed, the28 <userinput>mtrace</userinput> perl programwon't be installed26 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 29 either.</para></listitem> 30 30 … … 32 32 with <emphasis>0</emphasis> in the <filename>login/Makefile</filename> 33 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> will fail, however it'll work fine 36 if you use the numeric IDs (such as <userinput>chown 0 37 file</userinput>).</para></listitem> 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> 38 37 39 38 </itemizedlist> … … 46 45 rely on one external library set: Glibc's NSS libraries. These libraries, 47 46 among other things, tell programs where the system's password database is 48 ( /etc/password, or NIS, or whatever other scheme has been49 configured).</para>47 (in <filename>/etc/password</filename>, NIS, or whatever other scheme has 48 been configured).</para> 50 49 51 50 <para>Glibc has undergone some changes since version 2.2.x and the new NSS 52 code is incompatible with the old one. So when Glibc is installed ,it will53 install its new NSS libraries and static programs will load these new NSS54 libraries and start to abort with<emphasis>segmentation fault</emphasis>55 error. This patch undoes a fewof the changes to overcome the problem.</para>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> 56 55 57 56 <para>If you started chapter 5 with a host system that uses Glibc-2.2.x … … 67 66 <para><screen><userinput>touch /etc/ld.so.conf</userinput></screen></para> 68 67 69 <para> It is recommended by the Glibc installation documentation to build70 Glibc outside of the source directory in adedicated directory:</para>68 <para>The documentation that comes with Glibc recommends to build the package 69 not in the source directory but in a separate, dedicated directory:</para> 71 70 72 71 <para><screen><userinput>mkdir ../glibc-build && … … 83 82 <itemizedlist> 84 83 <listitem><para><userinput>--disable-profile</userinput>: This disables the 85 building of libraries with profiling information. This command may be86 omitted if youplan to do profiling.</para></listitem>84 building of the libraries with profiling information. Omit this option if you 85 plan to do profiling.</para></listitem> 87 86 88 <listitem><para><userinput>--enable-add-ons</userinput>: This enables the89 add-on that we install with Glibc, linuxthreads</para></listitem>87 <listitem><para><userinput>--enable-add-ons</userinput>: This enables any 88 add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem> 90 89 91 90 <listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will 92 cause the pt_chown program to be installed in the /usr/bin93 directory.</para></listitem>91 cause the <filename>pt_chown</filename> program to be installed in the 92 <filename>/usr/bin</filename> directory.</para></listitem> 94 93 </itemizedlist> 95 94 … … 101 100 *** Check the INSTALL file for required versions.</screen></blockquote> 102 101 103 <para>The missing msgfmt (from the gettext package which we will install 104 later in this chapter) won't cause any problems. msgfmt is used to generate 105 the binary translation files that are used to make your system talk in a 106 different language. Because these translation files have already been 107 generated for you, there is no need for msgfmt. You'd only need msgfmt if 108 you change the translation source files (the <filename>*.po</filename> 109 files in the <filename class="directory">po</filename> subdirectory) which 110 would require you to re-generate the binary files.</para> 102 <para>The missing <filename>msgfmt</filename> program (from the Gettext 103 package, which we'll install later) won't cause any problems. The 104 <filename>msgfmt</filename> is used to generate the binary translation 105 files that can make your system talk in a different language. Because these 106 translation files have already been generated for you, there is no need for 107 <filename>msgfmt</filename>. You'd only need the program if you change the 108 translation source files (the <filename>*.po</filename> files in the 109 <filename class="directory">po</filename> subdirectory), which 110 would require you to regenerate the binary files.</para> 111 111 112 112 <para>Because Glibc hasn't been installed yet, one of the tests that was 113 run by the configure script failed. This test is supposed to test gcc to114 determine whether or not a cross-compiler is installed. However, Glibc 115 needs to be installed already to run this test. Since the test failed, the 116 configure script automatically assumed we do have a cross-compiler. We have117 t o override that assumption by explicitly telling Glibc we're not118 cross-compiling. Not doing this hasa couple of unintended side effects,113 run by the configure script has failed. This test is supposed to test 114 <filename>gcc</filename> to determine whether a cross-compiler is installed. 115 However, Glibc needs to be already installed to run this test. Since the test 116 failed, the configure script assumes we have a cross-compiler. We override 117 that assumption by explicitly telling Glibc we're not cross-compiling. 118 Not doing this would have a couple of unintended side effects, 119 119 such as the timezone files not being installed.</para> 120 120 … … 133 133 <para><screen><userinput>make install</userinput></screen></para> 134 134 135 <para>Locales aren't installed when you ran 136 <userinput>make install</userinput>, so we have to do that ourselves now. 137 Locales are used by Glibc to make your Linux system talk in a different 138 language:</para> 135 <para>The locales (used by Glibc to make your Linux system talk in a different 136 language) weren't installed when you ran the previous command, so we have to 137 do that ourselves now:</para> 139 138 140 139 <para><screen><userinput>make localedata/install-locales</userinput></screen></para> 141 140 142 <para>An alternative to running <userinput>make 143 localedata/install-locales</userinput> is to only install those locales 144 which you need or want. This can be achieved using the localedef 145 command. Information on this can be found in the INSTALL 146 file in the glibc-&glibc-version; tree.</para> 141 <para>An alternative to running the previous command is to install only those 142 locales which you need or want. This can be achieved using the localedef 143 command. Information on this can be found in the <filename>INSTALL</filename> 144 file in the <filename>glibc-&glibc-version;</filename> tree.</para> 147 145 148 <para>To finish off the installation we'll reload Bash so it uses the149 libnssfiles. This will also get rid of the146 <para>To finish off the installation we'll reload Bash so it will use the new 147 <filename>libnss_*</filename> files. This will also get rid of the 150 148 <emphasis>I have no name!</emphasis> message in the command prompt:</para> 151 149 -
index.xml
r212a71b rd3d229f 5 5 <!ENTITY book SYSTEM "book/book.xml"> 6 6 7 <!ENTITY version "2003021 7">8 <!ENTITY releasedate "February 1 7th, 2003">7 <!ENTITY version "20030219"> 8 <!ENTITY releasedate "February 19th, 2003"> 9 9 10 10 <!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
Note:
See TracChangeset
for help on using the changeset viewer.