瀏覽代碼

Added Check-1.2.0 library to Chapter 5.
Updated errordiscussion in glibc.
Added a fix for locale issues in gcc.
Incorporated Check library into libpipeline test.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9626 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Bruce Dubbs 14 年之前
父節點
當前提交
ee321a4688

+ 10 - 0
chapter01/changelog.xml

@@ -39,6 +39,16 @@
     <listitem>
       <para>2011-10-10</para>
       <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Add a patch for gcc to fix some locale
+          tests. Fixes
+          <ulink url="&lfs-ticket-root;2938">#2938</ulink>.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Add check to Chapter 5 and incorate it into
+          libpipeline. Fixes
+          <ulink url="&lfs-ticket-root;2941">#2941</ulink>.</para>
+        </listitem>
         <listitem>
           <para>[bdubbs] - Add a paragraph in Chapter 3.1 about obtaining and
           using md5sums for the packages in the book.</para>

+ 3 - 0
chapter01/whatsnew.xml

@@ -239,6 +239,9 @@
     <listitem>
       <para>&gcc-startfiles-patch;</para>
     </listitem>
+    <listitem>
+      <para>&gcc-locale-patch;</para>
+    </listitem>
     <listitem>
       <para>&glibc-fixes-patch;</para>
     </listitem>

+ 9 - 0
chapter03/packages.xml

@@ -68,6 +68,15 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>Check (&check-version;) - <token>&check-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&check-home;"/></para>
+        <para>Download: <ulink url="&check-url;"/></para>
+        <para>MD5 sum: <literal>&check-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term>Coreutils (&coreutils-version;) - <token>&coreutils-size;</token>:</term>
       <listitem>

+ 8 - 0
chapter03/patches.xml

@@ -98,6 +98,14 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>GCC Locale Patch - <token>&gcc-locale-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&gcc-locale-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-locale-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
 <!--
     <varlistentry>
       <term>GRUB Disk Geometry Patch - <token>&grub-geometry-patch-size;</token>:</term>

+ 1 - 0
chapter05/chapter05.xml

@@ -24,6 +24,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>

+ 97 - 0
chapter05/check.xml

@@ -0,0 +1,97 @@
+<?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-check" role="wrap">
+  <?dbhtml filename="check.html"?>
+
+  <sect1info condition="script">
+    <productname>check</productname>
+    <productnumber>&check-version;</productnumber>
+    <address>&check-url;</address>
+  </sect1info>
+
+  <title>Check-&check-version;</title>
+
+  <indexterm zone="ch-tools-check">
+    <primary sortas="a-Check">Check</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>Check is a unit testing framework for C.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&check-ch5-sbu;</seg>
+        <seg>&check-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Check</title>
+
+    <para>Prepare Check for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen>
+
+    <para>Build the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Compilation is now complete. As discussed earlier, running the test
+    suite is not mandatory for the temporary tools here in this chapter. To run
+    the Check test suite anyway, issue the following command:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Note that the Check test suite may take a relatively long 
+    (up to 4 SBU) time.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-check" role="content">
+    <title>Contents of Check</title>
+
+    <segmentedlist>
+      <segtitle>Installed library</segtitle>
+
+      <seglistitem>
+        <seg>libcheck.{a,so}</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="libcheck">
+        <term><filename class="libraryfile">libcheck.{a,so}</filename></term>
+        <listitem>
+          <para>Contains functions that allow Check to be called from a test
+          program</para>
+          <indexterm zone="ch-tools-check libcheck">
+            <primary sortas="c-libcheck">libcheck</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 7 - 7
chapter05/tcl.xml

@@ -40,13 +40,13 @@
   <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. 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. Even if the test suites are not run in this chapter
-    (they are not mandatory), these packages are required to run the test
-    suites in <xref linkend="chapter-building-system"/>.</para>
+    <para>This package and the next three (Expect, DejaGNU, and Check) are
+    installed to support running the test suites for GCC and Binutils and other
+    packages.  Installing four 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. Even if the test suites are not
+    run in this chapter (they are not mandatory), these packages are required
+    to run the test suites in <xref linkend="chapter-building-system"/>.</para>
 
     <para>Prepare Tcl for compilation:</para>
 

+ 5 - 0
chapter06/gcc.xml

@@ -66,6 +66,11 @@ esac</userinput></screen>
 
 <screen><userinput remap="pre">sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in</userinput></screen>
 
+    <para>Finally, apply a patch that corrects the test code for locale changes
+    that were made in glibc-2.14 and later.</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../gcc-4.6.1-locale-1.patch</userinput></screen>
+
     <para>The GCC documentation recommends building GCC outside of the source
     directory in a dedicated build directory:</para>
 

+ 4 - 0
chapter06/glibc.xml

@@ -205,6 +205,10 @@ grep Error glibc-check-log</userinput></screen>
         help eliminate these errors (e.g. <command>TIMEOUTFACTOR=16
         make -k check</command>).</para>
       </listitem>
+      <listitem>
+        <para>Other tests known to fail on some architectures are posix/bug-regex32, 
+        misc/tst-writev, elf/check-textrel, nptl/tst-getpid2, and stdio-common/bug22.</para>
+      </listitem>
     </itemizedlist>
 
     <para>Though it is a harmless message, the install stage of Glibc will

+ 18 - 2
chapter06/libpipeline.xml

@@ -43,13 +43,29 @@
 
     <para>Prepare Libpipeline for compilation:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
+<screen><userinput remap="configure">./configure CHECK_CFLAGS=-I/tools/include \
+    CHECK_LIBS="-L/tools/lib -lcheck" --prefix=/usr</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>CHECK_CFLAGS=, CHECK_LIBS=</parameter></term>
+        <listitem>
+          <para>These environment variables specify the location of the test
+          library built in <xref linkend="ch-tools-check"/>.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
 
     <para>Compile the package:</para>
 
 <screen><userinput remap="make">make</userinput></screen>
 
-    <para>This package does not come with a test suite.</para>
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
 
     <para>Install the package:</para>
 

+ 8 - 0
packages.ent

@@ -69,6 +69,14 @@
 <!ENTITY bzip2-ch6-du "6.4 MB">
 <!ENTITY bzip2-ch6-sbu "less than 0.1 SBU">
 
+<!ENTITY check-version "0.9.8">
+<!ENTITY check-size "546 KB">
+<!ENTITY check-url "http://sourceforge.net/projects/check/files/check/&check-version;/check-&check-version;.tar.gz">
+<!ENTITY check-md5 "5d75e9a6027cde79d2c339ef261e7470">
+<!ENTITY check-home "http://check.sourceforge.net/">
+<!ENTITY check-ch5-du "4.8 MB">
+<!ENTITY check-ch5-sbu "0.1 SBU">
+
 <!ENTITY coreutils-version "8.13">
 <!ENTITY coreutils-size "11,388 KB">
 <!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.gz">

+ 3 - 0
patches.ent

@@ -39,6 +39,9 @@
 <!ENTITY gcc-startfiles-patch-md5 "799ef1971350d2e3c794f2123f247cc6">
 <!ENTITY gcc-startfiles-patch-size "1.5 KB">
 
+<!ENTITY gcc-locale-patch "gcc-&gcc-version;-locale-1.patch">
+<!ENTITY gcc-locale-patch-md5 "406572f979f480be1450eb88eea08caa">
+<!ENTITY gcc-locale-patch-size "4 KB">
 
 <!ENTITY glibc-fixes-patch "glibc-&glibc-version;-fixes-2.patch">
 <!ENTITY glibc-fixes-patch-md5 "b0d442bb7057d036cd7545a3bf051fc1">