- Timestamp:
- 06/11/2020 05:55:06 AM (4 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 302d97a
- Parents:
- 387a32af
- Location:
- chapter07
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/bison.xml
r387a32af raefc822 46 46 <para>Prepare Bison for compilation:</para> 47 47 48 <screen><userinput remap="configure">./configure --prefix=/usr 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 49 --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> 50 50 … … 56 56 <listitem> 57 57 <para>This tells the build system to install bison documentation 58 58 into a versioned directory.</para> 59 59 </listitem> 60 60 </varlistentry> -
chapter07/dejagnu.xml
r387a32af raefc822 53 53 <screen><userinput remap="install">make install 54 54 install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version; 55 install -v -m644 doc/dejagnu.{html,txt} \ 56 /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen> 55 install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen> 57 56 58 57 <para>To test the results, issue:</para> -
chapter07/expect.xml
r387a32af raefc822 63 63 <term><parameter>--with-tcl=/usr/lib</parameter></term> 64 64 <listitem> 65 <para>This parameter is needed to tell the65 <para>This parameter is needed to tell 66 66 <command>configure</command> where the 67 <command>tclConfig.sh</command> is located.</para>67 <command>tclConfig.sh</command> script is located.</para> 68 68 </listitem> 69 69 </varlistentry> … … 73 73 <listitem> 74 74 <para>This explicitly tells Expect where to find Tcl's internal 75 headers. Using this option avoids conditions where 76 <command>configure</command> fails because it cannot automatically 77 discover the location of Tcl's headers.</para> 75 headers.</para> 78 76 </listitem> 79 77 </varlistentry> -
chapter07/gettext.xml
r387a32af raefc822 68 68 <screen><userinput remap="make">make</userinput></screen> 69 69 70 <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and70 <para>Install the <command>msgfmt</command>, <command>msgmerge</command>, and 71 71 <command>xgettext</command> programs:</para> 72 72 … … 78 78 <title/> 79 79 80 <para>Details on this package are located in 81 <xref linkend="contents-gettext" role="."/></para> 80 <para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para> 82 81 83 82 </sect2> -
chapter07/libstdc++-pass2.xml
r387a32af raefc822 25 25 <title/> 26 26 27 <para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to 28 defer the installation of the C++ standard library, because no suitable 29 compiler was available to compile it: we could not use the compiler 30 installed, because this compiler is a native 31 compiler, and should not be used outside of chroot without being at 32 risk of polluting the build with some host components.</para> 27 <para>When building <xref linkend="ch-tools-gcc-pass2"/> we had to defer 28 the installation of the C++ standard library because no suitable compiler 29 was available to compile it. We could not use the compiler built in that 30 section because it is a native compiler and should not be used outside of 31 chroot and risk polluting the libraries with some host components.</para> 33 32 34 33 <segmentedlist> … … 36 35 <segtitle>&diskspace;</segtitle> 37 36 38 <!-- TODO -->39 37 <seglistitem> 40 38 <seg>&libstdcpp-ch5-sbu;</seg> … … 54 52 </note> 55 53 56 <para>Create a link which exists when building Libstdc++ in the gcc 57 tree:</para> 54 <para>Create a link which exists when building libstdc++ in the gcc tree:</para> 58 55 59 56 <screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen> 60 57 61 <para>Create a separate build directory for Libstdc++ and enter it:</para>58 <para>Create a separate build directory for libstdc++ and enter it:</para> 62 59 63 60 <screen><userinput remap="pre">mkdir -v build 64 61 cd build</userinput></screen> 65 62 66 <para>Prepare Libstdc++ for compilation:</para>63 <para>Prepare libstdc++ for compilation:</para> 67 64 68 65 <screen><userinput remap="configure">../libstdc++-v3/configure \ … … 79 76 <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term> 80 77 <listitem> 81 <para>Th ose flags are passed by the top level Makefile when doing82 78 <para>These flags are passed by the top level Makefile when doing 79 a full build of GCC.</para> 83 80 </listitem> 84 81 </varlistentry> … … 107 104 <title/> 108 105 109 <para>Details on this package are located in 110 <xref linkend="contents-gcc" role="."/></para> 106 <para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para> 111 107 112 108 </sect2> -
chapter07/perl.xml
r387a32af raefc822 61 61 </variablelist> 62 62 63 <para>Build the package:</para>63 <para>Build and install the package:</para> 64 64 65 65 <screen><userinput remap="make">make</userinput></screen> … … 72 72 <title/> 73 73 74 <para>Details on this package are located in 75 <xref linkend="contents-perl" role="."/></para> 74 <para>Details on this package are located in <xref linkend="contents-perl" role="."/></para> 76 75 77 76 </sect2> -
chapter07/python.xml
r387a32af raefc822 81 81 <title/> 82 82 83 <para>Details on this package are located in 84 <xref linkend="contents-python" role="."/></para> 83 <para>Details on this package are located in <xref linkend="contents-python" role="."/></para> 85 84 86 85 </sect2> -
chapter07/stripping.xml
r387a32af raefc822 29 29 strip --strip-unneeded /tools/bin/*</userinput></screen> 30 30 31 <para>These commands will skip a number of files ,reporting that it does not31 <para>These commands will skip a number of files reporting that it does not 32 32 recognize their file format. Most of these are scripts instead of binaries. 33 Note that we use the <command>strip</command> program built in33 <!--Note that we use the <command>strip</command> program built in 34 34 <quote>Binutils pass 1</quote>, since it is the one that knows how to strip 35 our cross-compiled programs.</para> 36 <!-- Normally, the host "strip" could be used too, since it is actually the 37 same computer. But Some old versions of binutils may generate buggy crt1.o 38 and the like, because they do not know about recently introduced symbol 39 types. For more details, 40 see https://sourceware.org/bugzilla/show_bug.cgi?id=22875--> 35 our cross-compiled programs.--></para> 41 36 42 <para>Take care <emphasis> not</emphasis> to use37 <para>Take care <emphasis>NOT</emphasis> to use 43 38 <parameter>--strip-unneeded</parameter> on the libraries. The static 44 39 ones would be destroyed and the toolchain packages would need to be 45 40 built all over again.</para> 46 41 47 <para>To save more , remove the documentation:</para>42 <para>To save more space, remove the documentation:</para> 48 43 49 44 <screen><userinput>rm -rf /usr/{,share}/{info,man,doc}</userinput></screen> … … 51 46 <para>The libtool .la files are only useful when linking with static 52 47 libraries. They are unneeded, and potentially harmful, when using dynamic 53 shared libraries, specially when using alsonon-autotools build systems.48 shared libraries, specially when using non-autotools build systems. 54 49 Remove those files now:</para> 55 50 56 51 <screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput></screen> 57 52 58 <para>At this point, you should have at least 3 GB of free space in59 <envar>$LFS</envar>that can be used to build and install Glibc and Gcc in53 <para>At this point, you should have at least 5 GB of free space on the 54 chroot partition that can be used to build and install Glibc and Gcc in 60 55 the next phase. If you can build and install Glibc, you can build and install 61 the rest too.</para> 56 the rest too. You can check the free disk space with the command 57 <command>df -h /</command>.</para> 62 58 63 59 </sect2> … … 71 67 built packages, your temporary tools are in a good state and might be 72 68 backed up for later reuse. In case of fatal failures in the subsequent 73 sections, it often turns out that removing everything and starting over69 chapters, it often turns out that removing everything and starting over 74 70 (more carefully) is the best option to recover. Unfortunatly, all the 75 temporary tools will be removed, too. To avoid extra timeto redo71 temporary tools will be removed, too. To avoid the extra time needed to redo 76 72 something which has been built successfully, prepare a backup. 77 73 </para> … … 84 80 chroot environment is required as the backup should be stored 85 81 outside of the <filename class="directory">$LFS</filename> directory 86 but those cannot be accessed when in chroot. Leave chroot environment82 but those cannot be accessed when in chroot. Leave the chroot environment 87 83 and unmount the virtual kernel filesystems: 88 84 </para> … … 90 86 <screen role="nodump"><userinput>exit 91 87 umount $LFS/dev{/pts,} 92 umount $LFS/{sys,proc,run} 93 </userinput></screen> 88 umount $LFS/{sys,proc,run}</userinput></screen> 94 89 95 90 <para>Create the backup archive:</para> … … 99 94 100 95 <para> 101 In case you have to start over as some mistakes has been made, you can102 use this backup to restore the temporary tools and save some time on103 the way to recover.Since the sources are located under96 In case some mistakes have been made and you need to start over, you can 97 use this backup to restore the temporary tools and save some irecovery time. 98 Since the sources are located under 104 99 <filename class="directory">$LFS</filename>, they are included in the 105 100 backup archive as well, so you need not to download them again. After 106 checking that <filename class="directory">$LFS</filename> is set proper ,101 checking that <filename class="directory">$LFS</filename> is set properly, 107 102 restore the backup by executing the following commands: 108 103 </para> … … 114 109 115 110 <para> 116 Again, double check that the environment has been setup proper and117 continue building the rest of the system.111 Again, double check that the environment has been setup properly 112 and continue building the rest of the system. 118 113 </para> 119 114 … … 123 118 or restart building using a restore, remember to mount the 124 119 kernel virtual filesystems as described in <xref 125 linkend='ch-tools-kernfs'/> and enter the120 linkend='ch-tools-kernfs'/> and re-enter the 126 121 chroot environment (see <xref 127 122 linkend='ch-tools-chroot'/>) again before continuing.</para> -
chapter07/tcl.xml
r387a32af raefc822 46 46 47 47 <para>This package and the next two (Expect and DejaGNU) are 48 installed to support running the test suites for GCC and Binutils and other48 installed to support running the test suites for GCC and binutils and other 49 49 packages. Installing three packages for testing purposes may seem 50 50 excessive, but it is very reassuring, if not essential, to know that the … … 71 71 <listitem> 72 72 <para>The construct <parameter>$(<shell command>)</parameter> 73 is replaced by the output of the chell command. Here this output is73 is replaced by the output of the shell command. Here this output is 74 74 empty if running on a 32 bit machine, and is 75 75 <parameter>--enable-64bit</parameter> if running on a 64 bit machine. … … 101 101 unset SRCDIR</userinput></screen> 102 102 103 <para>The various <quote>sed</quote> after the <quote>make</quote> command104 remove references to the build directory from various configuration files,105 and replaces them with the install directory. This is not mandatory106 for the remaining of LFS, but may be needed in case a package built later107 uses Tcl.</para>103 <para>The various <quote>sed</quote> instructions after the 104 <quote>make</quote> command removes references to the build directory from 105 the configuration files and replaces them with the install directory. 106 This is not mandatory for the remainder of LFS, but may be needed in case a 107 package built later uses Tcl.</para> 108 108 109 109 <para>Install the package:</para> … … 116 116 <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen> 117 117 118 <para>Install Tcl's headers. The next package, Expect, requires them 119 to build.</para> 118 <para>Install Tcl's headers. The next package, Expect, requires them.</para> 120 119 121 120 <screen><userinput remap="install">make install-private-headers</userinput></screen> … … 135 134 136 135 <seglistitem> 137 <seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg> 138 <seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg> 136 <seg> 137 tclsh (link to tclsh&tcl-major-version;) and 138 tclsh&tcl-major-version; 139 </seg> 140 <seg> 141 libtcl&tcl-major-version;.so and 142 libtclstub&tcl-major-version;.a 143 </seg> 139 144 </seglistitem> 140 145 </segmentedlist> -
chapter07/texinfo.xml
r387a32af raefc822 67 67 <title/> 68 68 69 <para>Details on this package are located in 70 <xref linkend="contents-texinfo" role="."/></para> 69 <para>Details on this package are located in <xref linkend="contents-texinfo" role="."/></para> 71 70 72 71 </sect2> -
chapter07/util-linux.xml
r387a32af raefc822 49 49 <para>Prepare Util-linux for compilation:</para> 50 50 51 <screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 51 <screen><userinput remap="configure"> 52 ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 52 53 --docdir=/usr/share/doc/util-linux-&util-linux-version; \ 53 54 --disable-chfn-chsh \ … … 63 64 <variablelist> 64 65 <title>The meaning of the configure options:</title> 65 <!-- TODO --> 66 66 67 <varlistentry> 67 68 <term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term> 68 69 <listitem> 69 70 <para>This sets the location of the file recording information about 70 the hardware clock ,in accordance to the FHS. This is not stricly71 needed fo t his temporary tool, but it preventcreating a file71 the hardware clock in accordance to the FHS. This is not stricly 72 needed for his temporary tool, but it prevents creating a file 72 73 at another location, which would not be overwritten or removed 73 when building the final util-linux .</para>74 when building the final util-linux package.</para> 74 75 </listitem> 75 76 </varlistentry> … … 78 79 <term><parameter>--disable-*</parameter></term> 79 80 <listitem> 80 <para>Th ose switches prevent warnings about building components81 <para>These switches prevent warnings about building components 81 82 that require packages not in LFS or not installed yet.</para> 82 83 </listitem> … … 106 107 <title/> 107 108 108 <para>Details on this package are located in 109 <xref linkend="contents-utillinux" role="."/></para> 109 <para>Details on this package are located in <xref linkend="contents-utillinux" role="."/></para> 110 110 111 111 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.