mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Remove unneeded files in chapter 5
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11900 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
784dc13f86
commit
069c0ecc1a
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-bash" role="wrap">
|
||||
<?dbhtml filename="bash.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>bash</productname>
|
||||
<productnumber>&bash-version;</productnumber>
|
||||
<address>&bash-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Bash-&bash-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-bash">
|
||||
<primary sortas="a-Bash">Bash</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/bash.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&bash-ch5-sbu;</seg>
|
||||
<seg>&bash-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Bash</title>
|
||||
|
||||
<para>Prepare Bash for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--build=$(support/config.guess) \
|
||||
--host=$LFS_TGT \
|
||||
--without-bash-malloc</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-bash-malloc</parameter></term>
|
||||
<listitem>
|
||||
<para>This option turns off the use of Bash's memory allocation
|
||||
(<function>malloc</function>) function which is known to cause
|
||||
segmentation faults. By turning this option off, Bash will use
|
||||
the <function>malloc</function> functions from Glibc which are
|
||||
more stable.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
<para>Move the excutable to where it is expected to be:</para>
|
||||
|
||||
<screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen>
|
||||
|
||||
<para>Make a link for the programs that use <command>sh</command> for
|
||||
a shell:</para>
|
||||
|
||||
<screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-bash" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-binutils-pass2" role="wrap">
|
||||
<?dbhtml filename="binutils-pass2.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>binutils-pass2</productname>
|
||||
<productnumber>&binutils-version;</productnumber>
|
||||
<address>&binutils-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Binutils-&binutils-version; - Pass 2</title>
|
||||
|
||||
<indexterm zone="ch-tools-binutils-pass2">
|
||||
<primary sortas="a-Binutils">Binutils</primary>
|
||||
<secondary>tools, pass 2</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/binutils.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&binutils-ch5p2-sbu;</seg>
|
||||
<seg>&binutils-ch5p2-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Binutils</title>
|
||||
|
||||
<para>Create a separate build directory again:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir -v build
|
||||
cd build</userinput></screen>
|
||||
|
||||
<para>Prepare Binutils for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">../configure \
|
||||
--prefix=/usr \
|
||||
--build=$(../config.guess) \
|
||||
--host=$LFS_TGT \
|
||||
--disable-nls \
|
||||
--enable-shared \
|
||||
--disable-werror</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--host=$LFS_TGT</parameter></term>
|
||||
<listitem>
|
||||
<para>This tells the configure script that we want to build
|
||||
this pass of binutils for the $LFS_TGT machine, using our just
|
||||
built cross-compiler. This prevents the linker from searching
|
||||
through library directories on the host.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-binutils" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-bison" role="wrap">
|
||||
<?dbhtml filename="bison.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>bison</productname>
|
||||
<productnumber>&bison-version;</productnumber>
|
||||
<address>&bison-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Bison-&bison-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-bison">
|
||||
<primary sortas="a-Bison">Bison</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/bison.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&bison-ch5-sbu;</seg>
|
||||
<seg>&bison-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Bison</title>
|
||||
|
||||
<para>Prepare Bison for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure option:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term>
|
||||
<listitem>
|
||||
<para>This tells the build system to install bison documentation
|
||||
into a versioned directory.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-bison" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-bzip2" role="wrap">
|
||||
<?dbhtml filename="bzip2.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>bzip2</productname>
|
||||
<productnumber>&bzip2-version;</productnumber>
|
||||
<address>&bzip2-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Bzip2-&bzip2-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-bzip2">
|
||||
<primary sortas="a-Bzip2">Bzip2</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/bzip2.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&bzip2-ch5-sbu;</seg>
|
||||
<seg>&bzip2-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Bzip2</title>
|
||||
|
||||
<para>Apply a patch that will install the documentation for this
|
||||
package:</para>
|
||||
|
||||
<screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
|
||||
|
||||
<para>The following command ensures installation of symbolic links are
|
||||
relative:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
|
||||
|
||||
<para>Ensure the man pages are installed into the correct location:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
|
||||
|
||||
<para>The Bzip2 package does not contain a <command>configure</command>
|
||||
script. There are two <filename>Makefile</filename>, one for the shared
|
||||
library, and the other for the static library. Since we need both, We
|
||||
do the compilation in two stages. First the shared library:</para>
|
||||
|
||||
<screen><userinput remap="make">make CC=$LFS_TGT-gcc -f Makefile-libbz2_so
|
||||
make clean</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the make parameter:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>-f Makefile-libbz2_so</parameter></term>
|
||||
<listitem>
|
||||
<para>This will cause Bzip2 to be built using a different
|
||||
<filename>Makefile</filename> file, in this case the
|
||||
<filename>Makefile-libbz2_so</filename> file, which creates a dynamic
|
||||
<filename class="libraryfile">libbz2.so</filename> library and links
|
||||
the Bzip2 utilities against it.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile and test the package with:</para>
|
||||
|
||||
<screen><userinput remap="make">make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make PREFIX=$LFS/usr install</userinput></screen>
|
||||
|
||||
<para>Install the shared <command>bzip2</command> binary into the
|
||||
<filename class="directory">/bin</filename> directory, make some necessary
|
||||
symbolic links, and clean up:</para>
|
||||
|
||||
<screen><userinput remap="install">cp -v bzip2-shared $LFS/bin/bzip2
|
||||
cp -av libbz2.so* $LFS/lib
|
||||
ln -sv ../../lib/libbz2.so.1.0 $LFS/usr/lib/libbz2.so
|
||||
rm -v $LFS/usr/bin/{bunzip2,bzcat,bzip2}
|
||||
ln -sv bzip2 $LFS/bin/bunzip2
|
||||
ln -sv bzip2 $LFS/bin/bzcat</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-bzip2" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-changingowner">
|
||||
<?dbhtml filename="changingowner.html"?>
|
||||
|
||||
<title>Changing Ownership</title>
|
||||
|
||||
<note>
|
||||
<para>The commands in the remainder of this book must be performed while
|
||||
logged in as user <systemitem class="username">root</systemitem> and no
|
||||
longer as user <systemitem class="username">lfs</systemitem>. Also, double
|
||||
check that <envar>$LFS</envar> is set in <systemitem
|
||||
class="username">root</systemitem>'s environment.</para>
|
||||
</note>
|
||||
|
||||
<para>Currently, the whole directory hierarchy in <filename
|
||||
class="directory">$LFS</filename>
|
||||
is owned by the user <systemitem class="username">lfs</systemitem>, a user
|
||||
that exists only on the host system. If the directories under <filename
|
||||
class="directory">$LFS</filename> are kept as they are, the files are
|
||||
owned by a user ID without a corresponding account. This is dangerous because
|
||||
a user account created later could get this same user ID and would own all
|
||||
the files under <filename class="directory">$LFS</filename>, thus exposing
|
||||
these files to possible malicious manipulation.</para>
|
||||
|
||||
<para>To avoid this issue, you could add the <systemitem
|
||||
class="username">lfs</systemitem> user to the new LFS system later when
|
||||
creating the <filename>/etc/passwd</filename> file, taking care to assign it
|
||||
the same user and group IDs as on the host system. Better yet, change the
|
||||
ownership of the <filename class="directory">$LFS/*</filename> directories to
|
||||
user <systemitem class="username">root</systemitem> by running the following
|
||||
command:</para>
|
||||
|
||||
<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,lib64,tools}</userinput></screen>
|
||||
|
||||
</sect1>
|
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-chroot">
|
||||
<?dbhtml filename="chroot.html"?>
|
||||
|
||||
<title>Entering the Chroot Environment</title>
|
||||
|
||||
<para>Now that all the packages which depend on themselves for being built
|
||||
are on the system, it is time to enter the chroot environment to finish
|
||||
installing the remaining temporary tools. This environment will be in use
|
||||
also for installing the final system. As user <systemitem
|
||||
class="username">root</systemitem>, run the following command to enter the
|
||||
realm that is, at the moment, populated with only the temporary tools:</para>
|
||||
|
||||
<screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \
|
||||
HOME=/root \
|
||||
TERM="$TERM" \
|
||||
PS1='(lfs chroot) \u:\w\$ ' \
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
||||
/bin/bash --login +h</userinput></screen>
|
||||
|
||||
<para>The <parameter>-i</parameter> option given to the <command>env</command>
|
||||
command will clear all variables of the chroot environment. After that, only
|
||||
the <envar>HOME</envar>, <envar>TERM</envar>, <envar>PS1</envar>, and
|
||||
<envar>PATH</envar> variables are set again. The
|
||||
<parameter>TERM=$TERM</parameter> construct will set the <envar>TERM</envar>
|
||||
variable inside chroot to the same value as outside chroot. This variable is
|
||||
needed for programs like <command>vim</command> and <command>less</command>
|
||||
to operate properly. If other variables are needed, such as
|
||||
<envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set
|
||||
them again.</para>
|
||||
|
||||
<para>From this point on, there is no need to use the
|
||||
<envar>LFS</envar> variable anymore, because all work will be restricted
|
||||
to the LFS file system. This is because the Bash shell is told that
|
||||
<filename class="directory">$LFS</filename> is now the root
|
||||
(<filename class="directory">/</filename>) directory.</para>
|
||||
|
||||
<para>Notice that <filename class="directory">/tools/bin</filename> is not
|
||||
anymore in the <envar>PATH</envar>. This means that a temporary tool will no longer be
|
||||
used once its final version is installed. This occurs when the shell does not
|
||||
<quote>remember</quote> the locations of executed binaries—for this
|
||||
reason, hashing is switched off by passing the <parameter>+h</parameter> option
|
||||
to <command>bash</command>.</para>
|
||||
|
||||
<para>Note that the <command>bash</command> prompt will say
|
||||
<computeroutput>I have no name!</computeroutput> This is normal because the
|
||||
<filename>/etc/passwd</filename> file has not been created yet.</para>
|
||||
|
||||
<note>
|
||||
<para>It is important that all the commands throughout the remainder of this
|
||||
chapter and the following chapters are run from within the chroot
|
||||
environment. If you leave this environment for any reason (rebooting for
|
||||
example), ensure that the virtual kernel filesystems are mounted as
|
||||
explained in <xref linkend="ch-system-bindmount"/> and <xref
|
||||
linkend="ch-system-kernfsmount"/> and enter chroot again before continuing
|
||||
with the installation.</para>
|
||||
</note>
|
||||
|
||||
</sect1>
|
@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-coreutils" role="wrap">
|
||||
<?dbhtml filename="coreutils.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>coreutils</productname>
|
||||
<productnumber>&coreutils-version;</productnumber>
|
||||
<address>&coreutils-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Coreutils-&coreutils-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-coreutils">
|
||||
<primary sortas="a-Coreutils">Coreutils</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/coreutils.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&coreutils-ch5-sbu;</seg>
|
||||
<seg>&coreutils-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Coreutils</title>
|
||||
|
||||
<para>Prepare Coreutils for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess) \
|
||||
--enable-install-program=hostname \
|
||||
--enable-no-install-program=kill,uptime</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><envar>--enable-install-program=hostname</envar></term>
|
||||
<listitem>
|
||||
<para>This enables the <command>hostname</command> binary to be built
|
||||
and installed – it is disabled by default but is required by the
|
||||
Perl test suite.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
<!--
|
||||
<para>The above command refuses to install <filename>su</filename>
|
||||
because the program cannot be installed setuid root as a non-privileged
|
||||
user. By manually installing it, we can use it for running tests in the
|
||||
final system as a non-privileged user. Install it with:</para>
|
||||
|
||||
<screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen>
|
||||
-->
|
||||
<para>Move programs to their final expected locations. Although this is
|
||||
not necessary in this temporary environment, we must do so because some
|
||||
programs harcode executable locations:</para>
|
||||
|
||||
<screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin
|
||||
mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin
|
||||
mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin
|
||||
mv -v $LFS/usr/bin/chroot $LFS/usr/sbin
|
||||
mkdir -pv $LFS/usr/share/man/man8
|
||||
mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8
|
||||
sed -i s/\"1\"/\"8\"/1 $LFS/usr/share/man/man8/chroot.8
|
||||
mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-coreutils" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,204 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-createfiles">
|
||||
<?dbhtml filename="createfiles.html"?>
|
||||
|
||||
<title>Creating Essential Files and Symlinks</title>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/etc/passwd">/etc/passwd</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/etc/group">/etc/group</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>Historically, Linux maintains a list of the mounted file systems in the
|
||||
file <filename>/etc/mtab</filename>. Modern kernels maintain this list
|
||||
internally and exposes it to the user via the <filename
|
||||
class="directory">/proc</filename> filesystem. To satisfy utilities that
|
||||
expect the presence of <filename>/etc/mtab</filename>, create the following
|
||||
symbolic link:</para>
|
||||
|
||||
<screen><userinput>ln -sv /proc/self/mounts /etc/mtab</userinput></screen>
|
||||
|
||||
<para>In order for user <systemitem class="username">root</systemitem> to be
|
||||
able to login and for the name <quote>root</quote> to be recognized, there
|
||||
must be relevant entries in the <filename>/etc/passwd</filename> and
|
||||
<filename>/etc/group</filename> files.</para>
|
||||
|
||||
<para>Create the <filename>/etc/passwd</filename> file by running the following
|
||||
command:</para>
|
||||
|
||||
<screen revision="sysv"><userinput>cat > /etc/passwd << "EOF"
|
||||
<literal>root:x:0:0:root:/root:/bin/bash
|
||||
bin:x:1:1:bin:/dev/null:/bin/false
|
||||
daemon:x:6:6:Daemon User:/dev/null:/bin/false
|
||||
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
|
||||
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<screen revision="systemd"><userinput>cat > /etc/passwd << "EOF"
|
||||
<literal>root:x:0:0:root:/root:/bin/bash
|
||||
bin:x:1:1:bin:/dev/null:/bin/false
|
||||
daemon:x:6:6:Daemon User:/dev/null:/bin/false
|
||||
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
|
||||
systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false
|
||||
systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false
|
||||
systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false
|
||||
systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false
|
||||
systemd-network:x:76:76:systemd Network Management:/:/bin/false
|
||||
systemd-resolve:x:77:77:systemd Resolver:/:/bin/false
|
||||
systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false
|
||||
systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false
|
||||
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>The actual password for <systemitem class="username">root</systemitem>
|
||||
(the <quote>x</quote> used here is just a placeholder) will be set later.</para>
|
||||
|
||||
<para>Create the <filename>/etc/group</filename> file by running the following
|
||||
command:</para>
|
||||
|
||||
<screen revision="sysv"><userinput>cat > /etc/group << "EOF"
|
||||
<literal>root:x:0:
|
||||
bin:x:1:daemon
|
||||
sys:x:2:
|
||||
kmem:x:3:
|
||||
tape:x:4:
|
||||
tty:x:5:
|
||||
daemon:x:6:
|
||||
floppy:x:7:
|
||||
disk:x:8:
|
||||
lp:x:9:
|
||||
dialout:x:10:
|
||||
audio:x:11:
|
||||
video:x:12:
|
||||
utmp:x:13:
|
||||
usb:x:14:
|
||||
cdrom:x:15:
|
||||
adm:x:16:
|
||||
messagebus:x:18:
|
||||
input:x:24:
|
||||
mail:x:34:
|
||||
kvm:x:61:
|
||||
wheel:x:97:
|
||||
nogroup:x:99:
|
||||
users:x:999:</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<screen revision="systemd"><userinput>cat > /etc/group << "EOF"
|
||||
<literal>root:x:0:
|
||||
bin:x:1:daemon
|
||||
sys:x:2:
|
||||
kmem:x:3:
|
||||
tape:x:4:
|
||||
tty:x:5:
|
||||
daemon:x:6:
|
||||
floppy:x:7:
|
||||
disk:x:8:
|
||||
lp:x:9:
|
||||
dialout:x:10:
|
||||
audio:x:11:
|
||||
video:x:12:
|
||||
utmp:x:13:
|
||||
usb:x:14:
|
||||
cdrom:x:15:
|
||||
adm:x:16:
|
||||
messagebus:x:18:
|
||||
systemd-journal:x:23:
|
||||
input:x:24:
|
||||
mail:x:34:
|
||||
kvm:x:61:
|
||||
systemd-bus-proxy:x:72:
|
||||
systemd-journal-gateway:x:73:
|
||||
systemd-journal-remote:x:74:
|
||||
systemd-journal-upload:x:75:
|
||||
systemd-network:x:76:
|
||||
systemd-resolve:x:77:
|
||||
systemd-timesync:x:78:
|
||||
systemd-coredump:x:79:
|
||||
wheel:x:97:
|
||||
nogroup:x:99:
|
||||
users:x:999:</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>The created groups are not part of any standard—they are groups
|
||||
decided on in part by the requirements of the Udev configuration in the next
|
||||
chapter, and in part by common convention employed by a number of existing
|
||||
Linux distributions. In addition, some test suites rely on specific users
|
||||
or groups. The Linux Standard Base (LSB, available at <ulink
|
||||
url="http://www.linuxbase.org"/>) recommends only that, besides the group
|
||||
<systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0,
|
||||
a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be
|
||||
present. All other group names and GIDs can be chosen freely by the system
|
||||
administrator since well-written programs do not depend on GID numbers, but
|
||||
rather use the group's name.</para>
|
||||
|
||||
<para>Some tests in <xref linkend="chapter-building-system"/> need a regular
|
||||
user. We add this user here and delete this account at the end of that
|
||||
chapter.</para>
|
||||
|
||||
<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
|
||||
echo "tester:x:101:" >> /etc/group
|
||||
install -o tester -d /home/tester</userinput></screen>
|
||||
|
||||
<para>To remove the <quote>I have no name!</quote> prompt, start a new
|
||||
shell. Since the
|
||||
<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
|
||||
files have been created, user name and group name resolution will now
|
||||
work:</para>
|
||||
|
||||
<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen>
|
||||
|
||||
<para>Note the use of the <parameter>+h</parameter> directive. This tells
|
||||
<command>bash</command> not to use its internal path hashing. Without this
|
||||
directive, <command>bash</command> would remember the paths to binaries it has
|
||||
executed. To ensure the use of the newly compiled binaries as soon as they are
|
||||
installed, the <parameter>+h</parameter> directive will be used for the duration
|
||||
of this chapter.</para>
|
||||
|
||||
<para>The <command>login</command>, <command>agetty</command>, and
|
||||
<command>init</command> programs (and others) use a number of log
|
||||
files to record information such as who was logged into the system and
|
||||
when. However, these programs will not write to the log files if they
|
||||
do not already exist. Initialize the log files and give them
|
||||
proper permissions:</para>
|
||||
|
||||
<screen><userinput>touch /var/log/{btmp,lastlog,faillog,wtmp}
|
||||
chgrp -v utmp /var/log/lastlog
|
||||
chmod -v 664 /var/log/lastlog
|
||||
chmod -v 600 /var/log/btmp</userinput></screen>
|
||||
|
||||
<para>The <filename>/var/log/wtmp</filename> file records all logins and
|
||||
logouts. The <filename>/var/log/lastlog</filename> file records when each
|
||||
user last logged in. The <filename>/var/log/faillog</filename> file records
|
||||
failed login attempts. The <filename>/var/log/btmp</filename> file records
|
||||
the bad login attempts.</para>
|
||||
|
||||
<note><para>The <filename>/run/utmp</filename> file records the users that
|
||||
are currently logged in. This file is created dynamically in the boot
|
||||
scripts.</para></note>
|
||||
|
||||
</sect1>
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-creatingdirs">
|
||||
<?dbhtml filename="creatingdirs.html"?>
|
||||
|
||||
<title>Creating Directories</title>
|
||||
|
||||
<para>It is time to create the full structure in the LFS file system. Create
|
||||
a standard directory tree by issuing the following commands:</para>
|
||||
|
||||
<screen><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt}
|
||||
mkdir -pv /{media/{floppy,cdrom},srv,var}
|
||||
install -dv -m 0750 /root
|
||||
install -dv -m 1777 /tmp /var/tmp
|
||||
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
|
||||
mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man}
|
||||
mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
|
||||
mkdir -pv /usr/{,local/}share/man/man{1..8}
|
||||
|
||||
mkdir -v /var/{log,mail,spool}
|
||||
ln -sv /run /var/run
|
||||
ln -sv /run/lock /var/lock
|
||||
mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen>
|
||||
|
||||
<para>Directories are, by default, created with permission mode 755, but
|
||||
this is not desirable for all directories. In the commands above, two
|
||||
changes are made—one to the home directory of user <systemitem
|
||||
class="username">root</systemitem>, and another to the directories for
|
||||
temporary files.</para>
|
||||
|
||||
<para>The first mode change ensures that not just anybody can enter
|
||||
the <filename class="directory">/root</filename> directory—the
|
||||
same as a normal user would do with his or her home directory. The
|
||||
second mode change makes sure that any user can write to the
|
||||
<filename class="directory">/tmp</filename> and <filename
|
||||
class="directory">/var/tmp</filename> directories, but cannot remove
|
||||
another user's files from them. The latter is prohibited by the so-called
|
||||
<quote>sticky bit,</quote> the highest bit (1) in the 1777 bit mask.</para>
|
||||
|
||||
<sect2>
|
||||
<title>FHS Compliance Note</title>
|
||||
|
||||
<para>The directory tree is based on the Filesystem Hierarchy Standard
|
||||
(FHS) (available at <ulink
|
||||
url="https://refspecs.linuxfoundation.org/fhs.shtml"/>). The FHS also specifies
|
||||
the optional existence of some directories such as <filename
|
||||
class="directory">/usr/local/games</filename> and <filename
|
||||
class="directory">/usr/share/games</filename>. We create only the
|
||||
directories that are needed. However, feel free to create these
|
||||
directories. </para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-dejagnu" role="wrap">
|
||||
<?dbhtml filename="dejagnu.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>dejagnu</productname>
|
||||
<productnumber>&dejagnu-version;</productnumber>
|
||||
<address>&dejagnu-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>DejaGNU-&dejagnu-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-dejagnu">
|
||||
<primary sortas="a-DejaGNU">DejaGNU</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>The <application>DejaGnu</application> package contains a framework for running test
|
||||
suites on GNU tools. It is written in <command>expect</command>, which itself
|
||||
uses <application>Tcl</application> (Tool Command Language).</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&dejagnu-ch5-sbu;</seg>
|
||||
<seg>&dejagnu-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of DejaGNU</title>
|
||||
|
||||
<para>Prepare DejaGNU for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr
|
||||
makeinfo --html --no-split -o doc/dejagnu.html doc/dejagnu.texi
|
||||
makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi</userinput></screen>
|
||||
|
||||
<para>Build and install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install
|
||||
install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version;
|
||||
install -v -m644 doc/dejagnu.{html,txt} \
|
||||
/usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
|
||||
|
||||
<para>To test the results, issue:</para>
|
||||
|
||||
<screen><userinput remap="test">make check</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="contents-dejagnu" role="content">
|
||||
<title>Contents of DejaGNU</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed program</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>runtest</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="runtest">
|
||||
<term><command>runtest</command></term>
|
||||
<listitem>
|
||||
<para>A wrapper script that locates the proper
|
||||
<command>expect</command> shell and then runs DejaGNU</para>
|
||||
<indexterm zone="ch-tools-dejagnu runtest">
|
||||
<primary sortas="b-runtest">runtest</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-diffutils" role="wrap">
|
||||
<?dbhtml filename="diffutils.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>diffutils</productname>
|
||||
<productnumber>&diffutils-version;</productnumber>
|
||||
<address>&diffutils-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Diffutils-&diffutils-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-diffutils">
|
||||
<primary sortas="a-Diffutils">Diffutils</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/diffutils.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&diffutils-ch5-sbu;</seg>
|
||||
<seg>&diffutils-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Diffutils</title>
|
||||
|
||||
<para>Prepare Diffutils for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-diffutils" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,139 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-expect" role="wrap">
|
||||
<?dbhtml filename="expect.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>expect</productname>
|
||||
<productnumber>&expect-version;</productnumber>
|
||||
<address>&expect-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Expect-&expect-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-expect">
|
||||
<primary sortas="a-Expect">Expect</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>The <application>Expect</application> package contains tools for
|
||||
automating, via scripted dialogues, interactive applications such as
|
||||
<command>telnet</command>, <command>ftp</command>,
|
||||
<command>passwd</command>, <command>fsck</command>,
|
||||
<command>rlogin</command>, and <command>tip</command>.
|
||||
<application>Expect</application> is also useful for testing these same
|
||||
applications as well as easing all sorts of tasks that are prohibitively
|
||||
difficult with anything else. The <application>DejaGnu</application>
|
||||
framework is written in <application>Expect</application>.</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&expect-ch5-sbu;</seg>
|
||||
<seg>&expect-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Expect</title>
|
||||
|
||||
<para>Prepare Expect for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">
|
||||
./configure --prefix=/usr \
|
||||
--with-tcl=/usr/lib \
|
||||
--enable-shared \
|
||||
--mandir=/usr/share/man \
|
||||
--with-tclinclude=/usr/include</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--with-tcl=/usr/lib</parameter></term>
|
||||
<listitem>
|
||||
<para>This parameter is needed to tell the
|
||||
<command>configure</command> where the
|
||||
<command>tclConfig.sh</command> is located.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--with-tclinclude=/usr/include</parameter></term>
|
||||
<listitem>
|
||||
<para>This explicitly tells Expect where to find Tcl's internal
|
||||
headers. Using this option avoids conditions where
|
||||
<command>configure</command> fails because it cannot automatically
|
||||
discover the location of Tcl's headers.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Build the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install
|
||||
ln -svf expect&expect-version;/libexpect&expect-version;.so /usr/lib</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="contents-expect" role="content">
|
||||
<title>Contents of Expect</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed program</segtitle>
|
||||
<segtitle>Installed library</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>expect</seg>
|
||||
<seg>libexpect-&expect-lib-version;.so</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="expect">
|
||||
<term><command>expect</command></term>
|
||||
<listitem>
|
||||
<para>Communicates with other interactive programs according
|
||||
to a script</para>
|
||||
<indexterm zone="ch-tools-expect expect">
|
||||
<primary sortas="b-expect">expect</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="libexpect">
|
||||
<term><filename class="libraryfile">libexpect-&expect-lib-version;.so</filename></term>
|
||||
<listitem>
|
||||
<para>Contains functions that allow Expect to be used as a Tcl
|
||||
extension or to be used directly from C or C++ (without Tcl)</para>
|
||||
<indexterm zone="ch-tools-expect libexpect">
|
||||
<primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-file" role="wrap">
|
||||
<?dbhtml filename="file.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>file</productname>
|
||||
<productnumber>&file-version;</productnumber>
|
||||
<address>&file-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>File-&file-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-file">
|
||||
<primary sortas="a-File">File</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/file.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&file-ch5-sbu;</seg>
|
||||
<seg>&file-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of File</title>
|
||||
|
||||
<para>Prepare File for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT</userinput></screen>
|
||||
|
||||
<!-- devs: if using - -build here, the build system wants to compile
|
||||
the signature file with "file" on the build system, but stops if it is not
|
||||
the same version. One possibility would be to build "file" on the build
|
||||
system first, but it is simpler to have the system think it is not
|
||||
cross-compiling, and use the just built "file". -->
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
<para>Details on this package are located in<!-- TODO
|
||||
<xref linkend="contents-file" role="."/> --></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-findutils" role="wrap">
|
||||
<?dbhtml filename="findutils.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>findutils</productname>
|
||||
<productnumber>&findutils-version;</productnumber>
|
||||
<address>&findutils-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Findutils-&findutils-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-findutils">
|
||||
<primary sortas="a-Findutils">Findutils</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/findutils.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&findutils-ch5-sbu;</seg>
|
||||
<seg>&findutils-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Findutils</title>
|
||||
|
||||
<para>Prepare Findutils for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess)</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
<para>Move the excutable to its final expected location:</para>
|
||||
|
||||
<screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin
|
||||
sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-findutils" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-flex" role="wrap">
|
||||
<?dbhtml filename="flex.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>flex</productname>
|
||||
<productnumber>&flex-version;</productnumber>
|
||||
<address>&flex-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Flex-&flex-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-flex">
|
||||
<primary sortas="a-Flex">Flex</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/flex.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&flex-ch5-sbu;</seg>
|
||||
<seg>&flex-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Flex</title>
|
||||
|
||||
<para>Prepare Flex for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
||||
|
||||
<!--
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure option:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>- -disable-bootstrap</parameter></term>
|
||||
<listitem>
|
||||
<para>Normally, building flex is done in two stages. A first
|
||||
programs, which is used to generate the source of a second one,
|
||||
which is then compiled. When using cross-compilation, the first
|
||||
program is generated on the build system. However, due to a bug
|
||||
in configure, the presence of some function is tested only on the
|
||||
host system. If this function is not found on the build system, the
|
||||
build fails. This can be prevented by disabling the two stage
|
||||
build.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
-->
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-flex" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-gawk" role="wrap">
|
||||
<?dbhtml filename="gawk.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>gawk</productname>
|
||||
<productnumber>&gawk-version;</productnumber>
|
||||
<address>&gawk-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Gawk-&gawk-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-gawk">
|
||||
<primary sortas="a-Gawk">Gawk</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/gawk.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&gawk-ch5-sbu;</seg>
|
||||
<seg>&gawk-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Gawk</title>
|
||||
|
||||
<para>First, ensure some unneeded files are not installed:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i 's/extras//' Makefile.in</userinput></screen>
|
||||
|
||||
<para>Prepare Gawk for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(./config.guess)</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gawk" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,160 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-gcc-pass2" role="wrap">
|
||||
<?dbhtml filename="gcc-pass2.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>gcc-pass2</productname>
|
||||
<productnumber>&gcc-version;</productnumber>
|
||||
<address>&gcc-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>GCC-&gcc-version; - Pass 2</title>
|
||||
|
||||
<indexterm zone="ch-tools-gcc-pass2">
|
||||
<primary sortas="a-GCC">GCC</primary>
|
||||
<secondary>tools, pass 2</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/gcc.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&gcc-ch5p2-sbu;</seg>
|
||||
<seg>&gcc-ch5p2-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of GCC</title>
|
||||
|
||||
<para>As in the first build of GCC, the GMP, MPFR, and MPC packages are
|
||||
required. Unpack the tarballs and move them into the required directory
|
||||
names:</para>
|
||||
|
||||
<screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
|
||||
mv -v mpfr-&mpfr-version; mpfr
|
||||
tar -xf ../gmp-&gmp-version;.tar.xz
|
||||
mv -v gmp-&gmp-version; gmp
|
||||
tar -xf ../mpc-&mpc-version;.tar.gz
|
||||
mv -v mpc-&mpc-version; mpc</userinput></screen>
|
||||
|
||||
<para>If building on x86_64, change the default directory name for 64-bit
|
||||
libraries to <quote>lib</quote>:</para>
|
||||
|
||||
<screen><userinput remap="pre">case $(uname -m) in
|
||||
x86_64)
|
||||
sed -e '/m64=/s/lib64/lib/' \
|
||||
-i.orig gcc/config/i386/t-linux64
|
||||
;;
|
||||
esac</userinput></screen>
|
||||
|
||||
<para>Fix an issue with GCC-10.1 when building with a cross
|
||||
compiler:</para>
|
||||
|
||||
<screen><userinput remap="pre">patch -Np1 -i ../&gcc-cross-patch;</userinput></screen>
|
||||
|
||||
<para>Create a separate build directory again:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir -v build
|
||||
cd build</userinput></screen>
|
||||
|
||||
<para>Create a symlink that allos libgcc to be built with posix threads
|
||||
support:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir -pv $LFS_TGT/libgcc
|
||||
ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput></screen>
|
||||
|
||||
<para>Before starting to build GCC, remember to unset any environment
|
||||
variables that override the default optimization flags.</para>
|
||||
|
||||
<para>Now prepare GCC for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">../configure \
|
||||
--build=$(../config.guess) \
|
||||
--host=$LFS_TGT \
|
||||
--prefix=/usr \
|
||||
CC_FOR_TARGET=$LFS_TGT-gcc \
|
||||
--with-build-sysroot=$LFS \
|
||||
--enable-initfini-array \
|
||||
--disable-nls \
|
||||
--disable-multilib \
|
||||
--disable-decimal-float \
|
||||
--disable-libatomic \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libssp \
|
||||
--disable-libvtv \
|
||||
--disable-libstdcxx \
|
||||
--enable-languages=c,c++</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure options:</title><!-- WIP -->
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>-with-build-sysroot=$LFS</parameter></term>
|
||||
<listitem>
|
||||
<para>Normally, using <parameter>--host=</parameter> ensures that
|
||||
a cross-compiler is used for building gcc, and that compiler knows
|
||||
that it has to look for headers and libraries in <filename
|
||||
class="directory">$LFS</filename>. But the build system of GCC uses
|
||||
other tools, which are not aware of this location. This switch is
|
||||
needed to have them find the needed files in <filename
|
||||
class="directory">$LFS</filename>, and not on the host.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--enable-initfini-array</parameter></term>
|
||||
<listitem>
|
||||
<para>This option is automatically enabled when building a native
|
||||
compiler with a native compiler on x86. But here, we build with
|
||||
a cross compiler, so we need to explicitely set this option.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
<para>As a finishing touch, create a symlink. Many programs and scripts
|
||||
run <command>cc</command> instead of <command>gcc</command>, which is
|
||||
used to keep programs generic and therefore usable on all kinds of UNIX
|
||||
systems where the GNU C compiler is not always installed. Running
|
||||
<command>cc</command> leaves the system administrator free to decide
|
||||
which C compiler to install:</para>
|
||||
|
||||
<screen><userinput remap="install">ln -sv gcc $LFS/usr/bin/cc</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gcc" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-gettext" role="wrap">
|
||||
<?dbhtml filename="gettext.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>gettext</productname>
|
||||
<productnumber>&gettext-version;</productnumber>
|
||||
<address>&gettext-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Gettext-&gettext-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-gettext">
|
||||
<primary sortas="a-Gettext">Gettext</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/gettext.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&gettext-ch5-sbu;</seg>
|
||||
<seg>&gettext-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Gettext</title>
|
||||
|
||||
<para>For our temporary set of tools, we only need to install
|
||||
three programs from Gettext.</para>
|
||||
|
||||
<para>Prepare Gettext for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --disable-shared</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure option:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--disable-shared</parameter></term>
|
||||
<listitem>
|
||||
<para>We do not need to install any of the shared Gettext libraries at
|
||||
this time, therefore there is no need to build them.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the <command>msgfmt</command>, <command>msgmerge</command> and
|
||||
<command>xgettext</command> programs:</para>
|
||||
|
||||
<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gettext" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-grep" role="wrap">
|
||||
<?dbhtml filename="grep.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>grep</productname>
|
||||
<productnumber>&grep-version;</productnumber>
|
||||
<address>&grep-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Grep-&grep-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-grep">
|
||||
<primary sortas="a-Grep">Grep</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/grep.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&grep-ch5-sbu;</seg>
|
||||
<seg>&grep-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Grep</title>
|
||||
|
||||
<para>Prepare Grep for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--bindir=/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-grep" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,72 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-gzip" role="wrap">
|
||||
<?dbhtml filename="gzip.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>gzip</productname>
|
||||
<productnumber>&gzip-version;</productnumber>
|
||||
<address>&gzip-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Gzip-&gzip-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-gzip">
|
||||
<primary sortas="a-Gzip">Gzip</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/gzip.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&gzip-ch5-sbu;</seg>
|
||||
<seg>&gzip-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Gzip</title>
|
||||
|
||||
<para>Prepare Gzip for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
<para>Move the excutable to its final expected location:</para>
|
||||
|
||||
<screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gzip" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,115 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-kernfs">
|
||||
<?dbhtml filename="kernfs.html"?>
|
||||
|
||||
<title>Preparing Virtual Kernel File Systems</title>
|
||||
|
||||
<indexterm zone="ch-tools-kernfs">
|
||||
<primary sortas="e-/dev/">/dev/*</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>Various file systems exported by the kernel are used to communicate to
|
||||
and from the kernel itself. These file systems are virtual in that no disk
|
||||
space is used for them. The content of the file systems resides in
|
||||
memory.</para>
|
||||
|
||||
<para>Begin by creating directories onto which the file systems will be
|
||||
mounted:</para>
|
||||
|
||||
<screen><userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput></screen>
|
||||
|
||||
<sect2>
|
||||
<title>Creating Initial Device Nodes</title>
|
||||
|
||||
<para>When the kernel boots the system, it requires the presence of a few
|
||||
device nodes, in particular the <filename
|
||||
class="devicefile">console</filename> and <filename
|
||||
class="devicefile">null</filename> devices. The device nodes must be created
|
||||
on the hard disk so that they are available before <command>udevd</command>
|
||||
has been started, and additionally when Linux is started with
|
||||
<parameter>init=/bin/bash</parameter>. Create the devices by running the
|
||||
following commands:</para>
|
||||
|
||||
<screen><userinput>mknod -m 600 $LFS/dev/console c 5 1
|
||||
mknod -m 666 $LFS/dev/null c 1 3</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ch-system-bindmount">
|
||||
<title>Mounting and Populating /dev</title>
|
||||
|
||||
<para>The recommended method of populating the <filename
|
||||
class="directory">/dev</filename> directory with devices is to mount a
|
||||
virtual filesystem (such as <systemitem
|
||||
class="filesystem">tmpfs</systemitem>) on the <filename
|
||||
class="directory">/dev</filename> directory, and allow the devices to be
|
||||
created dynamically on that virtual filesystem as they are detected or
|
||||
accessed. Device creation is generally done during the boot process
|
||||
by Udev. Since this new system does not yet have Udev and has not yet
|
||||
been booted, it is necessary to mount and populate <filename
|
||||
class="directory">/dev</filename> manually. This is accomplished by bind
|
||||
mounting the host system's <filename class="directory">/dev</filename>
|
||||
directory. A bind mount is a special type of mount that allows you to
|
||||
create a mirror of a directory or mount point to some other location. Use
|
||||
the following command to achieve this:</para>
|
||||
|
||||
<screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ch-system-kernfsmount">
|
||||
<title>Mounting Virtual Kernel File Systems</title>
|
||||
|
||||
<para>Now mount the remaining virtual kernel filesystems:</para>
|
||||
|
||||
<screen><userinput>mount -v --bind /dev/pts $LFS/dev/pts
|
||||
mount -vt proc proc $LFS/proc
|
||||
mount -vt sysfs sysfs $LFS/sys
|
||||
mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the mount options for devpts:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>gid=5</parameter></term>
|
||||
<listitem>
|
||||
<para>This ensures that all devpts-created device nodes are owned by
|
||||
group ID 5. This is the ID we will use later on for the <systemitem
|
||||
class="groupname">tty</systemitem> group. We use the group ID instead
|
||||
of a name, since the host system might use a different ID for its
|
||||
<systemitem class="groupname">tty</systemitem> group.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>mode=0620</parameter></term>
|
||||
<listitem>
|
||||
<para>This ensures that all devpts-created device nodes have mode 0620
|
||||
(user readable and writable, group writable). Together with the
|
||||
option above, this ensures that devpts will create device nodes that
|
||||
meet the requirements of grantpt(), meaning the Glibc
|
||||
<command>pt_chown</command> helper binary (which is not installed by
|
||||
default) is not necessary.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>In some host systems, <filename>/dev/shm</filename> is a
|
||||
symbolic link to <filename class="directory">/run/shm</filename>.
|
||||
The /run tmpfs was mounted above so in this case only a
|
||||
directory needs to be created.</para>
|
||||
|
||||
<screen><userinput>if [ -h $LFS/dev/shm ]; then
|
||||
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
|
||||
fi</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-libstdcpp-pass2" role="wrap">
|
||||
<?dbhtml filename="gcc-libstdc++-pass2.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>gcc-libstdc++</productname>
|
||||
<productnumber>&gcc-version;</productnumber>
|
||||
<address>&gcc-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Libstdc++ from GCC-&gcc-version;, Pass 2</title>
|
||||
|
||||
<indexterm zone="ch-tools-libstdcpp-pass2">
|
||||
<primary sortas="a-GCC">GCC</primary>
|
||||
<secondary>tools, libstdc++ pass 2</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to
|
||||
defer the installation of the C++ standard library, because no suitable
|
||||
compiler was available to compile it: we could not use the compiler
|
||||
installed, because this compiler is a native
|
||||
compiler, and should not be used outside of chroot without being at
|
||||
risk of polluting the build with some host components.</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<!-- TODO -->
|
||||
<seglistitem>
|
||||
<seg>&libstdcpp-ch5-sbu;</seg>
|
||||
<seg>&libstdcpp-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Target Libstdc++</title>
|
||||
|
||||
<note>
|
||||
<para><application>Libstdc++</application> is part of the GCC sources.
|
||||
You should first unpack the GCC tarball and change to the
|
||||
<filename>gcc-&gcc-version;</filename> directory.</para>
|
||||
</note>
|
||||
|
||||
<para>Create a link which exists when building Libstdc++ in the gcc
|
||||
tree:</para>
|
||||
|
||||
<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen>
|
||||
|
||||
<para>Create a separate build directory for Libstdc++ and enter it:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir -v build
|
||||
cd build</userinput></screen>
|
||||
|
||||
<para>Prepare Libstdc++ for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">../libstdc++-v3/configure \
|
||||
CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
|
||||
--prefix=/usr \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-libstdcxx-pch</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
|
||||
<listitem>
|
||||
<para>Those flags are passed by the top level Makefile when doing
|
||||
a full build of GCC.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--disable-libstdcxx-pch</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch prevents the installation of precompiled
|
||||
include files, which are not needed at this stage.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile libstdc++ by running:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the library:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gcc" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-m4" role="wrap">
|
||||
<?dbhtml filename="m4.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>m4</productname>
|
||||
<productnumber>&m4-version;</productnumber>
|
||||
<address>&m4-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>M4-&m4-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-m4">
|
||||
<primary sortas="a-M4">M4</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/m4.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&m4-ch5-sbu;</seg>
|
||||
<seg>&m4-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of M4</title>
|
||||
|
||||
<para>First, make some fixes introduced by glibc-2.28:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
|
||||
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen>
|
||||
|
||||
<para>Prepare M4 for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess)</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-m4" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
<sect1 id="ch-tools-make" role="wrap">
|
||||
<?dbhtml filename="make.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>make</productname>
|
||||
<productnumber>&make-version;</productnumber>
|
||||
<address>&make-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Make-&make-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-make">
|
||||
<primary sortas="a-Make">Make</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/make.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&make-ch5-sbu;</seg>
|
||||
<seg>&make-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Make</title>
|
||||
|
||||
<para>Prepare Make for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--without-guile \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess)</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure option:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-guile</parameter></term>
|
||||
<listitem>
|
||||
<para>Although we are cross-compiling, configure tries to use
|
||||
guile from the build host if it finds it. This makes compilation
|
||||
fail, so this switch prevents using it.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-make" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,157 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-ncurses" role="wrap">
|
||||
<?dbhtml filename="ncurses.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>ncurses</productname>
|
||||
<productnumber>&ncurses-version;</productnumber>
|
||||
<address>&ncurses-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Ncurses-&ncurses-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-ncurses">
|
||||
<primary sortas="a-Ncurses">Ncurses</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/ncurses.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&ncurses-ch5-sbu;</seg>
|
||||
<seg>&ncurses-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Ncurses</title>
|
||||
|
||||
<para>First, ensure that <command>gawk</command> is found first during configuration:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
|
||||
|
||||
<para>Then, run the following commands to build the <quote>tic</quote>
|
||||
program on the build host:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir build
|
||||
cd build
|
||||
../configure
|
||||
make -C include
|
||||
make -C progs tic
|
||||
cd ..</userinput></screen>
|
||||
|
||||
<para>Prepare Ncurses for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(./config.guess) \
|
||||
--mandir=/usr/share/man \
|
||||
--with-shared \
|
||||
--without-debug \
|
||||
--without-ada \
|
||||
--without-normal \
|
||||
--enable-widec \
|
||||
--enable-pc-files</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-ada</parameter></term>
|
||||
<listitem>
|
||||
<para>This ensures that Ncurses does not build support for the Ada
|
||||
compiler which may be present on the host but will not be available
|
||||
once we enter the <command>chroot</command> environment.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--enable-widec</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch causes wide-character libraries (e.g., <filename
|
||||
class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
||||
to be built instead of normal ones (e.g., <filename
|
||||
class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
||||
These wide-character libraries are usable in both multibyte and
|
||||
traditional 8-bit locales, while normal libraries work properly
|
||||
only in 8-bit locales. Wide-character and normal libraries are
|
||||
source-compatible, but not binary-compatible.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--enable-pc-files</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch generates and installs .pc files for pkg-config.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-normal</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch disables building and installing most static libraries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<!--
|
||||
<varlistentry>
|
||||
<term><parameter>- -disable-db-install</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch disables building the terminfo database: it is not
|
||||
needed at this stage, and if <command>tic</command> is too old,
|
||||
it cannot compile recent databases.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
-->
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
<!-- TODO: check and document -->
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
|
||||
ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen>
|
||||
|
||||
<para>Move the shared libraries to the
|
||||
<filename class="directory">/lib</filename> directory, where they are
|
||||
expected to reside:</para>
|
||||
|
||||
<screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
|
||||
|
||||
<para>Because the libraries have been moved, one symlink points to
|
||||
a non-existent file. Recreate it:</para>
|
||||
|
||||
<screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
|
||||
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-ncurses" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-patch" role="wrap">
|
||||
<?dbhtml filename="patch.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>patch</productname>
|
||||
<productnumber>&patch-version;</productnumber>
|
||||
<address>&patch-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Patch-&patch-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-patch">
|
||||
<primary sortas="a-Patch">Patch</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/patch.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&patch-ch5-sbu;</seg>
|
||||
<seg>&patch-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Patch</title>
|
||||
|
||||
<para>Prepare Patch for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess)</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-patch" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-perl" role="wrap">
|
||||
<?dbhtml filename="perl.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>perl</productname>
|
||||
<productnumber>&perl-version;</productnumber>
|
||||
<address>&perl-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Perl-&perl-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-perl">
|
||||
<primary sortas="a-Perl">Perl</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/perl.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&perl-ch5-sbu;</seg>
|
||||
<seg>&perl-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Perl</title>
|
||||
|
||||
<para>Prepare Perl for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the new Configure options:</title>
|
||||
<varlistentry>
|
||||
<term><parameter>-des</parameter></term>
|
||||
<listitem>
|
||||
<para>This is a combination of three options: -d uses defaults for
|
||||
all items; -e ensures completion of all tasks; -s silences
|
||||
non-essential output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Build the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-perl" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-system-Python-temp" role="wrap">
|
||||
<?dbhtml filename="Python-temp.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>Python</productname>
|
||||
<productnumber>&python-version;</productnumber>
|
||||
<address>&python-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Python-&python-version;</title>
|
||||
|
||||
<indexterm zone="ch-system-Python-temp">
|
||||
<primary sortas="a-Python">Python</primary>
|
||||
<secondary>temporary</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/python.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&python-ch5-sbu;</seg>
|
||||
<seg>&python-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Python</title>
|
||||
|
||||
<note>
|
||||
<para>There are two package files whose name starts with
|
||||
<quote>python</quote>. The one to extract from is
|
||||
<filename>Python-&python-version;.tar.xz</filename> (notice the
|
||||
uppercase first letter).</para>
|
||||
</note>
|
||||
|
||||
<para>Prepare Python for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure option:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-ensurepip</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch disables the Python package installer, which is not
|
||||
needed at this stage.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-python" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-sed" role="wrap">
|
||||
<?dbhtml filename="sed.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>sed</productname>
|
||||
<productnumber>&sed-version;</productnumber>
|
||||
<address>&sed-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Sed-&sed-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-sed">
|
||||
<primary sortas="a-Sed">Sed</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/sed.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&sed-ch5-sbu;</seg>
|
||||
<seg>&sed-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Sed</title>
|
||||
|
||||
<para>Prepare Sed for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--bindir=/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-sed" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-stripping">
|
||||
<?dbhtml filename="stripping.html"?>
|
||||
|
||||
<title>Stripping</title>
|
||||
|
||||
<para>The steps in this section are optional, but if the LFS partition is
|
||||
rather small, it is beneficial to learn that unnecessary items can be removed.
|
||||
The executables and libraries built so far contain about 70 MB of unneeded
|
||||
debugging symbols. Remove those symbols with:</para>
|
||||
|
||||
<screen><userinput>$LFS_TGT-strip --strip-debug $LFS/usr/lib/*
|
||||
$LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*</userinput></screen>
|
||||
|
||||
<para>These commands will skip a number of files, reporting that it does not
|
||||
recognize their file format. Most of these are scripts instead of binaries.
|
||||
Note that we use the <command>strip</command> program built in
|
||||
<quote>Binutils pass 1</quote>, since it is the one that knows how to strip
|
||||
our cross-compiled programs.</para>
|
||||
<!-- Normally, the host "strip" could be used too, since it is actually the
|
||||
same computer. But Some old versions of binutils may generate buggy crt1.o
|
||||
and the like, because they do not know about recently introduced symbol
|
||||
types. For more details,
|
||||
see https://sourceware.org/bugzilla/show_bug.cgi?id=22875-->
|
||||
|
||||
<para>Take care <emphasis>not</emphasis> to use
|
||||
<parameter>--strip-unneeded</parameter> on the libraries. The static
|
||||
ones would be destroyed and the toolchain packages would need to be
|
||||
built all over again.</para>
|
||||
|
||||
<para>To save more, remove the documentation:</para>
|
||||
|
||||
<screen><userinput>rm -rf $LFS/usr/{,share}/{info,man,doc}</userinput></screen>
|
||||
|
||||
<para>The libtool .la files are only useful when linking with static
|
||||
libraries. They are unneeded, and potentially harmful, when using dynamic
|
||||
shared libraries, specially when using also non-autotools build systems.
|
||||
Remove those files now:</para>
|
||||
|
||||
<screen><userinput>find $LFS/usr/{lib,libexec} -name \*.la -delete</userinput></screen>
|
||||
|
||||
<para>At this point, you should have at least 3 GB of free space in
|
||||
<envar>$LFS</envar> that can be used to build and install Glibc and Gcc in
|
||||
the next phase. If you can build and install Glibc, you can build and install
|
||||
the rest too.</para>
|
||||
|
||||
</sect1>
|
@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-tar" role="wrap">
|
||||
<?dbhtml filename="tar.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>tar</productname>
|
||||
<productnumber>&tar-version;</productnumber>
|
||||
<address>&tar-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Tar-&tar-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-tar">
|
||||
<primary sortas="a-Tar">Tar</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/tar.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&tar-ch5-sbu;</seg>
|
||||
<seg>&tar-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Tar</title>
|
||||
|
||||
<para>Prepare Tar for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess) \
|
||||
--bindir=/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-tar" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,191 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
<!ENTITY tdbc-ver "1.1.1">
|
||||
<!ENTITY itcl-ver "4.2.0">
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-tcl" role="wrap">
|
||||
<?dbhtml filename="tcl.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>tcl</productname>
|
||||
<productnumber>&tcl-version;</productnumber>
|
||||
<address>&tcl-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Tcl-&tcl-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-tcl">
|
||||
<primary sortas="a-Tcl">Tcl</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>The <application>Tcl</application> package contains the Tool Command Language,
|
||||
a robust general-purpose scripting language. The <application>Expect</application> package
|
||||
is written in the <application>Tcl</application> language.</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&tcl-ch5-sbu;</seg>
|
||||
<seg>&tcl-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Tcl</title>
|
||||
|
||||
<para>This package and the next two (Expect and DejaGNU) are
|
||||
installed to support running the test suites for GCC and Binutils and other
|
||||
packages. Installing three packages for testing purposes may seem
|
||||
excessive, but it is very reassuring, if not essential, to know that the
|
||||
most important tools are working properly. These packages are required
|
||||
to run the test suites in <xref linkend="chapter-building-system"/>.</para>
|
||||
|
||||
<para>Note that the Tcl package used here is a minimal version needed
|
||||
to run the LFS tests. For the full package, see the
|
||||
<ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>
|
||||
|
||||
<para>Prepare Tcl for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">SRCDIR=$(pwd)
|
||||
cd unix
|
||||
./configure --prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term>
|
||||
<listitem>
|
||||
<para>The construct <parameter>$(<shell command>)</parameter>
|
||||
is replaced by the output of the chell command. Here this output is
|
||||
empty if running on a 32 bit machine, and is
|
||||
<parameter>--enable-64bit</parameter> if running on a 64 bit machine.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Build the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make
|
||||
|
||||
sed -e "s|$SRCDIR/unix|/usr/lib|" \
|
||||
-e "s|$SRCDIR|/usr/include|" \
|
||||
-i tclConfig.sh
|
||||
|
||||
sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
|
||||
-e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
|
||||
-e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
|
||||
-e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
|
||||
-i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
|
||||
|
||||
sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
|
||||
-e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
|
||||
-e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
|
||||
-i pkgs/itcl&itcl-ver;/itclConfig.sh
|
||||
|
||||
unset SRCDIR</userinput></screen>
|
||||
|
||||
<para>The various <quote>sed</quote> after the <quote>make</quote> command
|
||||
remove references to the build directory from various configuration files,
|
||||
and replaces them with the install directory. This is not mandatory
|
||||
for the remaining of LFS, but may be needed in case a package built later
|
||||
uses Tcl.</para>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
<para>Make the installed library writable so debugging symbols can
|
||||
be removed later:</para>
|
||||
|
||||
<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
|
||||
|
||||
<para>Install Tcl's headers. The next package, Expect, requires them
|
||||
to build.</para>
|
||||
|
||||
<screen><userinput remap="install">make install-private-headers</userinput></screen>
|
||||
|
||||
<para>Now make a necessary symbolic link:</para>
|
||||
|
||||
<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="contents-tcl" role="content">
|
||||
<title>Contents of Tcl</title>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>Installed programs</segtitle>
|
||||
<segtitle>Installed library</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg>
|
||||
<seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
<variablelist>
|
||||
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||
<?dbfo list-presentation="list"?>
|
||||
<?dbhtml list-presentation="table"?>
|
||||
|
||||
<varlistentry id="tclsh&tcl-major-version;">
|
||||
<term><command>tclsh&tcl-major-version;</command></term>
|
||||
<listitem>
|
||||
<para>The Tcl command shell</para>
|
||||
<indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
|
||||
<primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="tclsh">
|
||||
<term><command>tclsh</command></term>
|
||||
<listitem>
|
||||
<para>A link to tclsh&tcl-major-version;</para>
|
||||
<indexterm zone="ch-tools-tcl tclsh">
|
||||
<primary sortas="b-tclsh">tclsh</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="libtcl&tcl-major-version;.so">
|
||||
<term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
|
||||
<listitem>
|
||||
<para>The Tcl library</para>
|
||||
<indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
|
||||
<primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="libtclstub&tcl-major-version;.a">
|
||||
<term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
|
||||
<listitem>
|
||||
<para>The Tcl Stub library</para>
|
||||
<indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
|
||||
<primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
|
||||
</indexterm>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-system-texinfo-temp" role="wrap">
|
||||
<?dbhtml filename="texinfo-temp.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>texinfo</productname>
|
||||
<productnumber>&texinfo-version;</productnumber>
|
||||
<address>&texinfo-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Texinfo-&texinfo-version;</title>
|
||||
|
||||
<indexterm zone="ch-system-texinfo-temp">
|
||||
<primary sortas="a-Texinfo">Texinfo</primary>
|
||||
<secondary>temporary</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/texinfo.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&texinfo-ch5-sbu;</seg>
|
||||
<seg>&texinfo-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Texinfo</title>
|
||||
|
||||
<para>Prepare Texinfo for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<note>
|
||||
<para>As part of the configure process, a test is made that indicates an
|
||||
error for TestXS_la-TestXS.lo. This is not relevant for LFS and should be
|
||||
ignored.</para>
|
||||
</note>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-texinfo" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-util-linux" role="wrap">
|
||||
<?dbhtml filename="util-linux.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>util-linux</productname>
|
||||
<productnumber>&util-linux-version;</productnumber>
|
||||
<address>&util-linux-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Util-linux-&util-linux-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-util-linux">
|
||||
<primary sortas="a-Util-linux">Util-linux</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>The Util-linux package contains miscellaneous utility programs.</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&util-linux-ch5-sbu;</seg>
|
||||
<seg>&util-linux-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Util-linux</title>
|
||||
|
||||
<para>First create a directory
|
||||
to enable storage for the <command>hwclock</command> program:</para>
|
||||
|
||||
<screen><userinput remap="pre">mkdir -pv /var/lib/hwclock</userinput></screen>
|
||||
|
||||
<para>Prepare Util-linux for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
|
||||
--docdir=/usr/share/doc/util-linux-&util-linux-version; \
|
||||
--disable-chfn-chsh \
|
||||
--disable-login \
|
||||
--disable-nologin \
|
||||
--disable-su \
|
||||
--disable-setpriv \
|
||||
--disable-runuser \
|
||||
--disable-pylibmount \
|
||||
--disable-static \
|
||||
--without-python</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
<!-- TODO -->
|
||||
<varlistentry>
|
||||
<term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term>
|
||||
<listitem>
|
||||
<para>This sets the location of the file recording information about
|
||||
the hardware clock, in accordance to the FHS. This is not stricly
|
||||
needed fot his temporary tool, but it prevent creating a file
|
||||
at another location, which would not be overwritten or removed
|
||||
when building the final util-linux.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--disable-*</parameter></term>
|
||||
<listitem>
|
||||
<para>Those switches prevent warnings about building components
|
||||
that require packages not in LFS or not installed yet.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-python</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch disables using <application>Python</application>.
|
||||
It avoids trying to build unneeded bindings.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-utillinux" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="ch-tools-xz" role="wrap">
|
||||
<?dbhtml filename="xz.html"?>
|
||||
|
||||
<sect1info condition="script">
|
||||
<productname>xz</productname>
|
||||
<productnumber>&xz-version;</productnumber>
|
||||
<address>&xz-url;</address>
|
||||
</sect1info>
|
||||
|
||||
<title>Xz-&xz-version;</title>
|
||||
|
||||
<indexterm zone="ch-tools-xz">
|
||||
<primary sortas="a-xz">Xz</primary>
|
||||
<secondary>tools</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
href="../chapter06/xz.xml"
|
||||
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>&xz-ch5-sbu;</seg>
|
||||
<seg>&xz-ch5-du;</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Xz</title>
|
||||
|
||||
<para>Prepare Xz for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(build-aux/config.guess) \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
|
||||
|
||||
<para>Make sure that all essential files are in the correct directory:</para>
|
||||
|
||||
<screen><userinput remap="install">mv -v $LFS/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} $LFS/bin
|
||||
mv -v $LFS/usr/lib/liblzma.so.* $LFS/lib
|
||||
ln -svf ../../lib/$(readlink $LFS/usr/lib/liblzma.so) $LFS/usr/lib/liblzma.so</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
<para>Details on this package are located in<!-- TODO
|
||||
<xref linkend="contents-xz" role="."/> --></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
Loading…
Reference in New Issue
Block a user