git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2403 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Gerard Beekmans 2003-01-27 22:10:07 +00:00
parent 8f8e328ca6
commit 7bfad056d6
13 changed files with 77 additions and 72 deletions

View File

@ -6,11 +6,10 @@
default optimization flags (including the -march and -mcpu options). Binutils
is best left alone. Therefore, if you have defined any environment variables
that override default optimizations, such as CFLAGS and CXXFLAGS, we
recommend unsetting or modifying them when building binutils. You have
been warned.</para>
recommend unsetting or modifying them when building binutils.</para>
<para>It is recommended by the Binutils installation documentation to build
Binutils outside of the source directory. Create the build directory:</para>
Binutils outside of the source directory:</para>
<para><screen><userinput>mkdir ../binutils-build &amp;&amp;
cd ../binutils-build</userinput></screen></para>

View File

@ -4,8 +4,7 @@
<title>Installing Findutils</title>
<para>A patch must be applied in order to prevent compilation
errors. The patch fixes a variable conflict and some bad syntax.
Issue the following command to apply this patch:</para>
errors. The patch fixes a variable conflict and some bad syntax:</para>
<para><screen><userinput>patch -Np1 -i ../findutils-&findutils-patch-version;.patch</userinput></screen></para>

View File

@ -15,7 +15,7 @@
<para><screen><userinput>make install</userinput></screen></para>
<para>There are packages which expect to find the flex library
<para>There are packages which expect to find the lex library
in the <filename>/usr/lib</filename> directory. Create a symlink
to account for this:</para>

View File

@ -4,7 +4,7 @@
<title>Installation of Gawk</title>
<para>This package requires its patch to be applied before you can
install it. Issue the following command to apply the patch:</para>
install it:</para>
<para><screen><userinput>patch -Np1 -i ../gawk-&gawk-patch-version;.patch</userinput></screen></para>

View File

@ -7,8 +7,7 @@
default optimization flags (including the -march and -mcpu options). GCC is
best left alone. Therefore, if you have defined any environment variables
that override default optimizations, such as CFLAGS and CXXFLAGS, we
recommend unsetting or modifying them when building GCC. You have
been warned.</para>
recommend unsetting or modifying them when building GCC.</para>
<para>We will be building the C and C++ compilers at this time, so you'll
need to unpack both the gcc-core and gcc-g++ tarballs. Other compilers are
@ -60,7 +59,7 @@ properly.</para>
<para><screen><userinput>make install</userinput></screen></para>
<para>Some packages require that the C++ compiler be installed in the
<para>Some packages expect the C PreProcessor to be installed in the
<filename>/lib</filename> and <filename>/usr/lib</filename> directories.
To honor those packages, create two symlinks:</para>

View File

@ -12,11 +12,10 @@ would do.</para>
default optimization flags (including the -march and -mcpu options). Glibc
is best left alone. Therefore, if you have defined any environment variables
that override default optimizations, such as CFLAGS and CXXFLAGS, we
recommend unsetting or modifying them when building Glibc. You have
been warned.</para>
recommend unsetting or modifying them when building Glibc.</para>
<para>Basically, compiling Glibc in any other way than the book suggests
is putting your system at very high risk.</para>
is putting your system at a very high risk.</para>
<para>We'll start by applying a patch to Glibc that fixes the following:</para>
@ -25,7 +24,9 @@ is putting your system at very high risk.</para>
to <emphasis>/usr/bin/perl</emphasis> in the
<filename>malloc/Makefile</filename> file. This is done because Glibc
can't autodetect the location of perl because the Perl package hasn't been
installed yet.</para></listitem>
installed yet. And if Glibc thinks Perl isn't installed, the
<userinput>mtrace</userinput> perl program won't be installed
either.</para></listitem>
<listitem><para>It replaces all occurrences of <emphasis>root</emphasis>
with <emphasis>0</emphasis> in the <filename>login/Makefile</filename>
@ -42,18 +43,18 @@ file</userinput>).</para></listitem>
<para>There is a potential problem that causes statically linked binaries
to crash that were linked against Glibc-2.2 or older libraries. Even though
static binaries have all the necessary parts of Glibc built-in, they still
rely on one external library: Glibc's NSS libraries. These libraries, among
other things, tell programs where the system's password database is
rely on one external library set: Glibc's NSS libraries. These libraries,
among other things, tell programs where the system's password database is
(/etc/password, or NIS, or whatever other scheme has been
configured).</para>
<para>Glibc has undergone some changes since version 2.2.x and the new NSS
code is incompatible with the old one. So when Glibc is installed, it will
install its new NSS libraries and static programs will load these new NSS
libraries and start to abort with <emphasis>segmentation faults</emphasis>.
This patch undoes a few of the changes to overcome the problem.</para>
libraries and start to abort with <emphasis>segmentation fault</emphasis>
error. This patch undoes a few of the changes to overcome the problem.</para>
<para>So, if you started chapter 5 with a host system that uses Glibc-2.2.x
<para>If you started chapter 5 with a host system that uses Glibc-2.2.x
or older, you must apply the following patch. We will install Glibc again at
the end of this chapter to remove this patch so you'll have a pristine Glibc
as the developers intended it.</para>
@ -61,22 +62,37 @@ as the developers intended it.</para>
<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-libnss-patch-version;-libnss.patch</userinput></screen></para>
<para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file
and abort with an error if the file is missing, so we must create it.</para>
and abort with an error if the file is missing, so we must create it:</para>
<para><screen><userinput>touch /etc/ld.so.conf</userinput></screen></para>
<para>It is recommended by the Glibc installation documentation to build
Glibc outside of the source directory in a dedicated directory.</para>
Glibc outside of the source directory in a dedicated directory:</para>
<para><screen><userinput>mkdir ../glibc-build &amp;&amp;
cd ../glibc-build</userinput></screen></para>
<para>Next, prepare Glibc to be compiled.</para>
<para>Next, prepare Glibc to be compiled:</para>
<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin</userinput></screen></para>
<para>The meaning of the configure options are:</para>
<itemizedlist>
<listitem><para><userinput>--disable-profile:</userinput> This disables the
building of libraries with profiling information. This command may be
omitted if you plan to do profiling.</para></listitem>
<listitem><para><userinput>--enable-add-ons:</userinput> This enables the
add-on that we install with Glibc, linuxthreads</para></listitem>
<listitem><para><userinput>--libexecdir=/usr/bin:</userinput> This will
cause the pt_chown program to be installed in the /usr/bin
directory.</para></listitem>
</itemizedlist>
<para>During this stage you will see the following warning:</para>
<blockquote><screen>configure: warning:
@ -93,44 +109,33 @@ you change the translation source files (the <filename>*.po</filename>
files in the <filename class="directory">po</filename> subdirectory) which
would require you to re-generate the binary files.</para>
<para>The meaning of the configure options are:</para>
<itemizedlist>
<listitem><para><userinput>--disable-profile:</userinput> This disables the
building of libraries with profiling information. This command may be
omitted if you plan to do profiling.</para></listitem>
<listitem><para><userinput>--enable-add-ons:</userinput> This enables the
add-on that we install with Glibc, linuxthreads</para></listitem>
<listitem><para><userinput>--libexecdir=/usr/bin:</userinput> This will
cause the pt_chown program to be installed in the /usr/bin
directory.</para></listitem>
</itemizedlist>
<para>Because Glibc hasn't been installed yet, one of the tests that was
run by the configure script failed. This test is supposed to test gcc to
determine whether or not a cross-compiler is installed. However, Glibc
needs to be installed already to run this test. Since the test failed, the
configure script automatically assumed we do have a cross-compiler. So,
we have to override that assumption by explicitly telling Glibc we're not
cross-compiling.</para>
configure script automatically assumed we do have a cross-compiler. We have
to override that assumption by explicitly telling Glibc we're not
cross-compiling. Not doing this has a couple of unintended side effects,
such as the timezone files not being installed.</para>
<para><screen><userinput>echo "cross-compiling = no" &gt; configparms</userinput></screen></para>
<para>We'll continue with compiling and installing Glibc. The Linuxthreads man
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>We'll continue with installing the package. The Linuxthreads man
pages are not going to be installed at this point because it requires a
working Perl installation. We'll install Perl later on in this chapter,
and the man pages will be installed when Glibc is installed for the second
time at the end of this chapter.</para>
<para><screen><userinput>make &amp;&amp;
make install</userinput></screen></para>
<para><screen><userinput>make install</userinput></screen></para>
<para>Locales aren't installed when you ran
<userinput>make install</userinput>, so we have to do that ourselves now.
Locales are used by Glibc to make your Linux system talk in a different
language.</para>
language:</para>
<para><screen><userinput>make localedata/install-locales</userinput></screen></para>
@ -142,7 +147,7 @@ file in the glibc-&glibc-version; tree.</para>
<para>To finish off the installation we'll reload Bash so it uses the
libnss files. This will also get rid of the
<emphasis>I have no name!</emphasis> message in the command prompt.</para>
<emphasis>I have no name!</emphasis> message in the command prompt:</para>
<para><screen><userinput>exec /static/bin/bash --login</userinput></screen></para>

View File

@ -31,10 +31,5 @@ information.</para>
This creates the same devices as <userinput>generic</userinput>, but it skips
the creation of pty devices so that devpts can manage them itself.</para>
<para><filename>MAKEDEV</filename> will create devices ranging from hda[1-20]
to hdh[1-20] and beyond, but keep in mind that you probably won't be able to
use all of these due to kernel limits on the maximum number of
partitions.</para>
</sect2>

View File

@ -26,8 +26,7 @@ where they're expected to reside:</para>
<para>Since the libaries have been moved to
<filename>/lib</filename>, a few symlinks are currently pointing
towards non-existing files. Create the following symlinks to
account for this:</para>
towards non-existing files. Recreate those symlinks:</para>
<para><screen><userinput>ln -sf libncurses.a /usr/lib/libcurses.a &amp;&amp;
ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so &amp;&amp;

View File

@ -15,27 +15,25 @@ still need to actually enable these protocols in the kernel. What you do
here is merely telling the programs to be able to use those protocols, but
it's up to the kernel to make them available to the system.</para>
<para>If you intend to accept the default settings, you may skip
the questions generated by <emphasis>make</emphasis> by runing
<userinput>yes "" | make</userinput>.</para>
<para>Compile the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>If you intend to accept the default settings, you may skip
the questions generated by <emphasis>make</emphasis> by runing
<userinput>yes "" | make</userinput> instead.</para>
<para>Finish installing the package:</para>
<para><screen><userinput>make update</userinput></screen></para>
<para>The <emphasis>update</emphasis> option to <userinput>make</userinput>
works similarly to the <emphasis>install</emphasis> option, with one
exception: it doesn't make backups of files it's replacing. One of the
things net-tools replaces is sh-utils's version of /bin/hostname
(net-tools's version is far better than sh-utils's version).</para>
exception: it doesn't make backups of files it's replacing.</para>
<para>Also, if you decide to reinstall this package at some point in the
future, a make update won't backup all the files from a previous net-tools
installation.</para>
<para>If you decide to reinstall this package at some point in the
future, a <userinput>make update</userinput> won't backup all the files
from a previous net-tools installation.</para>
</sect2>

View File

@ -8,6 +8,12 @@
<para><screen><userinput>./configure.gnu --prefix=/usr</userinput></screen></para>
<para>If you want more control over the way perl sets itself up to be
built, you can run the interactive <userinput>Configure</userinput> script
instead and modify the way perl is built. If you think you can live with the
(sensible) defaults perl auto-detects, then just use the command listed
above.</para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
@ -16,11 +22,5 @@
<para><screen><userinput>make install</userinput></screen></para>
<para>If you want more control over the way perl sets itself up to be
built, you can run the interactive <userinput>Configure</userinput> script
and modify the way perl is built. If you think you can live with the
(sensible) defaults perl auto-detects, then just use the commands listed
above.</para>
</sect2>

View File

@ -16,7 +16,7 @@
<para><screen><userinput>make install</userinput></screen></para>
<para>Finally, complete the installation of this package
by moving some of its programs to the appropriate directory:</para>
by moving some of its programs to a more appropriate directory:</para>
<para><screen><userinput>mv /usr/bin/{cat,head} /bin</userinput></screen></para>

View File

@ -4,8 +4,7 @@
<title>Installation of Vim</title>
<para>This package requires its patch to be applied before you can
install it. This patch fixes a compile problem with GCC-3.2. Apply
the patch by issuing the following command:</para>
install it. This patch fixes a compile problem with GCC-3.2:</para>
<para><screen><userinput>patch -Np1 -i ../vim-&vim-patch-version;.patch</userinput></screen></para>
@ -17,6 +16,18 @@ the patch by issuing the following command:</para>
<para><screen><userinput>make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\"</userinput></screen></para>
<para>The meaning of the make option is:</para>
<itemizedlist>
<listitem><para><userinput>CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\":</userinput>
This option above causes vim to look for the
<filename>/etc/vimrc</filename> file which contains vim's global settings.
Normally, this file is assumed to be located in <filename
class="directory">/usr/share/vim</filename>, but we feel that
<filename class="directory">/etc</filename> is a more logical place for this
kind of file.</para></listitem>
</itemizedlist>
<para>The <emphasis>CPPFLAGS</emphasis> option above causes vim to look
for the /etc/vimrc file which contains vim's global settings. Normally,
this file is assumed to be located in <filename>/usr/share/vim</filename>,

View File

@ -25,7 +25,7 @@ shared and static libraries:</para>
<filename>/lib</filename> directory. That way, in the event
that you must boot without the <filename>/usr</filename>
directory, vital system programs will still have access to
the library. Finish installing the shared library:</para>
the library:</para>
<para><screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen></para>