Changeset f4facc4 for chapter08


Ignore:
Timestamp:
09/23/2022 04:06:19 PM (2 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/arm64, xry111/arm64-12.0
Children:
44784c1
Parents:
c6df98a1 (diff), 10d7c7a8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/trunk' into xry111/arm64

Location:
chapter08
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • chapter08/binutils.xml

    rc6df98a1 rf4facc4  
    168168    </para>
    169169
     170    <para>Twelve tests fail in the <command>gold</command> testsuite when the
     171    <option>--enable-default-pie</option> and
     172    <option>--enable-default-ssp</option> options are passed to GCC.
     173    <!-- Caused by egrep deprecation.  Note that we don't "patch" temp grep.
     174         And it seems unworthy to add a sed into temp grep just for one test
     175         failure.  (I don't really agree to "patch" grep in the first place,
     176         anyway.) -->
     177    The test named <filename>ar with versioned solib</filename> is also
     178    known to fail.</para>
     179
    170180    <para>Install the package:</para>
    171181
    172182<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
    173183
    174     <para>Remove useless static libraries:</para>
    175 
    176 <screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a</userinput></screen>
     184    <para>Remove useless static libraries and an empty man page:</para>
     185
     186<screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a
     187rm -fv /usr/share/man/man1/gprofng.1</userinput></screen>
    177188
    178189  </sect2>
  • chapter08/cleanup.xml

    rc6df98a1 rf4facc4  
    1717  <para>There are also several files installed in the /usr/lib and /usr/libexec
    1818  directories with a file name extension of .la. These are "libtool archive"
    19   files. As already said, they are only useful when linking with static
    20   libraries. They are unneeded, and potentially harmful, when using dynamic
    21   shared libraries, specially when using also non-autotools build systems.
    22   To remove them, run:</para>
     19  files. As already said, on a modern Linux system the libtool .la files are
     20  only useful for libltdl.  No libraries in LFS are expected to be loaded
     21  by libltdl, and it's known that some .la files can cause BLFS packages
     22  fail to build.  Remove those files now:</para>
    2323
    2424<screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen>
  • chapter08/eudev.xml

    rc6df98a1 rf4facc4  
    4040  <sect2 role="installation">
    4141    <title>Installation of Eudev</title>
    42 <!--
    43     <para>First, fix a test script:</para>
    4442
    45 <screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
    46 -->
    47 <!--
    48     <para>Next, remove an unneeded line that causes a build failure:</para>
     43   
    4944
    50 <screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
    51 -->
     45    <para>First fix the location of udev rules in the .pc file:</para>
     46
     47<screen><userinput remap="pre">sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in</userinput></screen>
    5248
    5349    <para>Prepare Eudev for compilation:</para>
  • chapter08/gawk.xml

    rc6df98a1 rf4facc4  
    4444
    4545<screen><userinput remap="pre">sed -i 's/extras//' Makefile.in</userinput></screen>
     46
     47    <para>Now fix a programming error identified upstream:</para>
     48
     49<screen><userinput remap="pre">sed -i '241i UPREF(m);' interpret.h</userinput></screen>
    4650
    4751    <para>Prepare Gawk for compilation:</para>
  • chapter08/gcc.xml

    rc6df98a1 rf4facc4  
    7171             LD=ld                    \
    7272             --enable-languages=c,c++ \
     73             --enable-default-pie     \
     74             --enable-default-ssp     \
    7375             --disable-multilib       \
    7476             --disable-bootstrap      \
     
    101103    </variablelist>
    102104
     105    <note>
     106      <anchor id="pie-ssp-info" xreflabel="note on PIE and SSP"/>
     107      <para>
     108        PIE (position-independent executable) is a technique to produce
     109        binary programs that can be loaded anywhere in memory.  Without PIE,
     110        the security feature named ASLR (Address Space Layout Randomization)
     111        can be applied for the shared libraries, but not the executable
     112        itself.  Enabling PIE allows ASLR for the executables in addition to
     113        the shared libraries, and mitigates some attacks based on fixed
     114        addresses of sensitive code or data in the executables.
     115      </para>
     116      <para>
     117        SSP (Stack Smashing Protection) is a technique to ensure
     118        that the parameter stack is not corrupted. Stack corruption can
     119        for example alter the return address of a subroutine,
     120        which would allow transferring control to some dangerous code
     121        (existing in the program or shared libraries, or injected by the
     122        attacker somehow) instead of the original one.
     123      </para>
     124    </note>
     125
    103126    <para>Compile the package:</para>
    104127
     
    107130    <important>
    108131      <para>In this section, the test suite for GCC is considered
    109       important, but it takes a long time. First time builders are 
     132      important, but it takes a long time. First time builders are
    110133      encouraged to not skip it.  The time to run the tests can be
    111134      reduced significantly by adding -jx to the make command below
     
    133156    url="&test-results;"/> and
    134157    <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
     158
     159    <para>In gcc, eleven tests, in the i386 test suite are known to FAIL.
     160    It's because the test files do not account for the
     161    <parameter>--enable-default-pie</parameter> option.</para>
    135162
    136163    <para>In g++, four tests related to PR100400 are known to be reported
     
    211238  <para>Now make sure that we're setup to use the correct start files:</para>
    212239
    213 <screen><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen>
     240<screen><userinput>grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log</userinput></screen>
    214241
    215242  <para>The output of the last command should be:</para>
    216243
    217 <screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
     244<screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
    218245/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    219246/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     
    573600        <listitem>
    574601          <para>Contains routines supporting GCC's stack-smashing protection
    575           functionality</para>
     602          functionality.  Normally it's unused because glibc also provides
     603          those routines</para>
    576604          <indexterm zone="ch-system-gcc libssp">
    577605            <primary sortas="c-libssp">libssp</primary>
  • chapter08/gettext.xml

    rc6df98a1 rf4facc4  
    6363          <para>Since bison is not yet installed in /usr, configure hardcodes
    6464          the directory containing translations for the bison program (the
    65           "locale" directory) as /tools/share/locale. Passing this variable
     65          "locale" directory) as /tools/share/locale. Passing this variable
    6666           to make allows overriding the choice made by configure.</para>
    6767        </listitem>
  • chapter08/grep.xml

    rc6df98a1 rf4facc4  
    4040  <sect2 role="installation">
    4141    <title>Installation of Grep</title>
     42
     43    <para>
     44       First, remove a warning about using egrep and fgrep that makes
     45       tests on some packages fail:
     46    </para>
     47
     48<screen><userinput remap="pre">sed -i "s/echo/#echo/" src/egrep.sh</userinput></screen>
    4249
    4350    <para>Prepare Grep for compilation:</para>
  • chapter08/groff.xml

    rc6df98a1 rf4facc4  
    5353
    5454<screen><userinput remap="configure">PAGE=<replaceable>&lt;paper_size&gt;</replaceable> ./configure --prefix=/usr</userinput></screen>
     55
     56    <para>Build the package:</para>
    5557
    5658<screen><userinput remap="make">make</userinput></screen>
  • chapter08/libtool.xml

    rc6df98a1 rf4facc4  
    5353<para>To test the results<!--(about 11.0 SBU)-->, issue:</para>
    5454
    55 <screen><userinput remap="test">make check</userinput></screen>
     55<screen><userinput remap="test">make -k check</userinput></screen>
    5656
    5757    <note><para>The test time for libtool can be reduced significantly on a
     
    6262
    6363    <para>Five tests are known to fail in the LFS build environment due
    64     to a circular dependency, but all tests pass if rechecked after
    65     automake is installed.</para>
     64    to a circular dependency, but these tests pass if rechecked after
     65    automake is installed.  Additionally, with grep-3.8, two tests will
     66    trigger a warning for non-POSIX regular expressions and fail.</para>
    6667
    6768    <para>Install the package:</para>
  • chapter08/meson.xml

    rc6df98a1 rf4facc4  
    9797        <seg>meson</seg>
    9898        <seg>
    99            /usr/lib/python&python-minor;/site-packages/meson-&meson-version;.dist-info and 
     99           /usr/lib/python&python-minor;/site-packages/meson-&meson-version;.dist-info and
    100100           /usr/lib/python&python-minor;/site-packages/mesonbuild
    101101        </seg>
     
    109109
    110110      <varlistentry id="meson">
    111                 <term><command>meson</command></term>
     111        <term><command>meson</command></term>
    112112        <listitem>
    113113          <para>A high productivity build system</para>
  • chapter08/ncurses.xml

    rc6df98a1 rf4facc4  
    123123
    124124    <!-- To editors: crash of shell process was very rare but really
    125          observed.  We can't simply remove /usr/lib/libncursesw.so.6.x like 
     125         observed.  We can't simply remove /usr/lib/libncursesw.so.6.x like
    126126         how we handle libmozjs-xx.so in BLFS because bash needs it, and
    127127         make will spawn new shell processes during "make install".  -->
     
    132132    from the library file.  Install the package with
    133133    <literal>DESTDIR</literal>, and replace the library file correctly using
    134     <command>install</command> command.  A useless static archive which is
    135     not handled by <command>configure</command> is also removed:</para>
     134    <command>install</command> command:</para>
    136135
    137136<screen><userinput remap="install">make DESTDIR=$PWD/dest install
     
    213212           libmenuw.so,
    214213           libncursesw.so,
     214           libncurses++w.so,
    215215           libpanelw.so, and their non-wide-character counterparts without "w"
    216216              in the library names.</seg>
     
    367367      </varlistentry>
    368368
     369      <varlistentry id="libncurses__w">
     370        <term><filename class="libraryfile">libncurses++w</filename></term>
     371        <listitem>
     372          <para>Contains C++ binding for other libraries in this package</para>
     373          <indexterm zone="ch-system-ncurses libncurses__w">
     374            <primary sortas="c-libncurses++w">libncurses++w</primary>
     375          </indexterm>
     376        </listitem>
     377      </varlistentry>
     378
    369379      <varlistentry id="libformw">
    370380        <term><filename class="libraryfile">libformw</filename></term>
  • chapter08/openssl.xml

    rc6df98a1 rf4facc4  
    4444    <title>Installation of OpenSSL</title>
    4545<!--
    46     <para>First fix a problem with some advanced arcitectures with avx512
     46    <para>First fix a problem with some advanced architectures with avx512
    4747    capability:</para>
    4848
  • chapter08/pkgmgt.xml

    rc6df98a1 rf4facc4  
    284284      commercial distributions. Examples of package managers that follow this
    285285      approach are RPM (which, incidentally, is required by the <ulink
    286       url="http://refspecs.linuxfoundation.org/lsb.shtml">Linux
     286      url="https://refspecs.linuxfoundation.org/lsb.shtml">Linux
    287287      Standard Base Specification</ulink>), pkg-utils, Debian's apt, and
    288288      Gentoo's Portage system.  A hint describing how to adopt this style of
     
    297297      as more complex package managers do.  For details of Slackware package
    298298      management, see <ulink
    299       url="http://www.slackbook.org/html/package-management.html"/>.</para>
     299      url="https://www.slackbook.org/html/package-management.html"/>.</para>
    300300    </sect3>
    301301
  • chapter08/python.xml

    rc6df98a1 rf4facc4  
    117117    commands:</para>
    118118
    119  <screen><userinput remap="install">cat &gt; /etc/pip.conf &lt;&lt; EOF
    120 [global]
     119<screen><userinput remap="install">cat &gt; /etc/pip.conf &lt;&lt; EOF
     120<literal>[global]
    121121root-user-action = ignore
    122 disable-pip-version-check = true
     122disable-pip-version-check = true</literal>
    123123EOF
    124124</userinput></screen>
  • chapter08/readline.xml

    rc6df98a1 rf4facc4  
    6464        <listitem>
    6565          <para>This option tells Readline that it can find the termcap
    66                library functions in the curses library, rather than a separate
    67                termcap library. It allows generating a correct
    68                <filename>readline.pc</filename> file.</para>
     66          library functions in the curses library, rather than a separate
     67          termcap library. It allows generating a correct
     68          <filename>readline.pc</filename> file.</para>
    6969        </listitem>
    7070      </varlistentry>
  • chapter08/util-linux.xml

    rc6df98a1 rf4facc4  
    101101su tester -c "make -k check"</userinput></screen>
    102102
    103     <para>The <emphasis>hardlink</emphasis> tests will fail if the host's kernel 
     103    <para>The <emphasis>hardlink</emphasis> tests will fail if the host's kernel
    104104    does not have the option CONFIG_CRYPTO_USER_API_HASH set.</para>
    105105
  • chapter08/vim.xml

    rc6df98a1 rf4facc4  
    168168    <note>
    169169      <para>By default, vim only installs spell files for the English language.
    170       To install spell files for your preferred language, download the
    171       <filename>*.spl</filename> and optionally, the <filename>*.sug</filename>
    172       files for your language and character encoding from <ulink
    173       url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save them to
    174       <filename class='directory'>/usr/share/&vim-docdir;/spell/</filename>.</para>
     170      To install spell files for your preferred language, copy the
     171      <filename class='extension'>.spl</filename> and optionally, the
     172      <filename class='extension'>.sug</filename> files for your language
     173      and character encoding from
     174      <filename class='directory'>runtime/spell</filename> into
     175      <filename class='directory'>
     176        /usr/share/&vim-docdir;/spell/</filename>.</para>
    175177
    176178      <para>To use these spell files, some configuration in
     
    180182set spell</literal></screen>
    181183
    182       <para>For more information, see the appropriate README file located
    183       at the URL above.</para>
     184      <para>For more information, see
     185      <filename>runtime/spell/README.txt</filename>.</para>
    184186    </note>
    185187
Note: See TracChangeset for help on using the changeset viewer.