r1039 - in trunk/BOOK: . final-system/common final-system/multilib introduction/common materials/common

jim at linuxfromscratch.org jim at linuxfromscratch.org
Wed Jan 11 17:12:56 PST 2006


Author: jim
Date: 2006-01-11 18:12:52 -0700 (Wed, 11 Jan 2006)
New Revision: 1039

Modified:
   trunk/BOOK/
   trunk/BOOK/final-system/common/zlib.xml
   trunk/BOOK/final-system/multilib/zlib-64bit.xml
   trunk/BOOK/final-system/multilib/zlib-n32.xml
   trunk/BOOK/final-system/multilib/zlib.xml
   trunk/BOOK/general.ent
   trunk/BOOK/introduction/common/changelog.xml
   trunk/BOOK/materials/common/patches.xml
   trunk/BOOK/patches.ent
Log:
 r1346 at server:  jim | 2006-01-11 17:10:51 -0800
 Updated zlib to build shared and static at the same time. Recommendation by Tushar Teredesai



Property changes on: trunk/BOOK
___________________________________________________________________
Name: svk:merge
   - 3949c430-d905-0410-97b6-f115d20341b5:/cross-lfs:1289
f6929928-7304-0410-9559-ff6106abff4d:/cross-lfs:790
   + 3949c430-d905-0410-97b6-f115d20341b5:/cross-lfs:1346
f6929928-7304-0410-9559-ff6106abff4d:/cross-lfs:790

Modified: trunk/BOOK/final-system/common/zlib.xml
===================================================================
--- trunk/BOOK/final-system/common/zlib.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/final-system/common/zlib.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -33,55 +33,39 @@
   <sect2 role="installation">
     <title>Installation of Zlib</title>
 
-    <note os="a">
-      <para>Zlib is known to build its shared library incorrectly if
-      <envar>CFLAGS</envar> is specified in the environment. If using a
-      specified <envar>CFLAGS</envar> variable, be sure to add the
-      <option>-fPIC</option> directive to the <envar>CFLAGS</envar>
-      variable for the duration of the configure command below, then
-      remove it afterwards.</para>
-    </note>
+    <para os="p1">This patch will add -fPIC to our build and allow us to build
+    a static and shared library at the same time:</para>
 
-    <para os="b">Prepare Zlib for compilation:</para>
+<screen os="p2"><userinput>patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen>
 
-<screen os="c"><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
+    <para os="a">Prepare Zlib for compilation:</para>
 
-    <para os="d">Compile the package:</para>
+<screen os="b"><userinput>./configure --prefix=/usr --shared</userinput></screen>
 
-<screen os="e"><userinput>make</userinput></screen>
+    <para os="c">Compile the package:</para>
 
-    <para os="f">To test the results, issue:
+<screen os="d"><userinput>make</userinput></screen>
+
+    <para os="e">To test the results, issue:
     <userinput>make check</userinput>.</para>
 
-    <para os="g">Install the shared library:</para>
+    <para os="f">Installation:</para>
 
-<screen os="h"><userinput>make install</userinput></screen>
+<screen os="g"><userinput>make install</userinput></screen>
 
-    <para os="i">The previous command installed a <filename
+    <para os="h">The previous command installed a <filename
     class="extension">.so</filename> file in <filename
-    class="directory">/lib</filename>. We will remove it and relink it into
-    <filename class="directory">/usr/lib</filename>:</para>
+    class="directory">/usr/lib</filename>. We will remove itinto
+    <filename class="directory">/lib</filename> and then relink it
+    to <filename class="directory">/usr/lib</filename>:</para>
 
-<screen os="j"><userinput>rm /lib/libz.so
-ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
+<screen os="i"><userinput>mv /usr/lib/libz.so.*
+ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
 
-    <para os="k">Build the static library:</para>
+    <para os="j">Now we fix the permissions on the static library:</para>
 
-<screen os="l"><userinput>make clean
-./configure --prefix=/usr
-make</userinput></screen>
+<screen os="k"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
 
-    <para os="m">To test the results again, issue:
-    <userinput>make check</userinput>.</para>
-
-    <para os="n">Install the static library:</para>
-
-<screen os="o"><userinput>make install</userinput></screen>
-
-    <para os="p">Fix the permissions on the static library:</para>
-
-<screen os="q"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
-
   </sect2>
 
   <sect2 id="contents-zlib" role="content">

Modified: trunk/BOOK/final-system/multilib/zlib-64bit.xml
===================================================================
--- trunk/BOOK/final-system/multilib/zlib-64bit.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/final-system/multilib/zlib-64bit.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -23,14 +23,18 @@
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
+    xpointer="xpointer(//*[@os='p1'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
+    xpointer="xpointer(//*[@os='p2'])"/>
 
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="zlib.xml"
+    xpointer="xpointer(//*[@os='a'])"/>
+
 <screen os="c"><userinput>CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
-   --shared --libdir=/lib64</userinput></screen>
+   --shared --libdir=/usr/lib64</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
@@ -48,45 +52,21 @@
     href="zlib.xml"
     xpointer="xpointer(//*[@os='g'])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
-
-    <para os="i">The previous command installed a <filename
+    <para os="h">The previous command installed a <filename
     class="extension">.so</filename> file in <filename
-    class="directory">/lib64</filename>. We will remove it and relink it into
-    <filename class="directory">/usr/lib64</filename>:</para>
+    class="directory">/usr/lib64</filename>. We will remove itinto
+    <filename class="directory">/lib64</filename> and then relink it
+    to <filename class="directory">/usr/lib64</filename>:</para>
 
-<screen os="j"><userinput>rm /lib64/libz.so
-ln -sf ../../lib64/libz.so.&zlib-version; /usr/lib64/libz.so</userinput></screen>
+<screen os="i"><userinput>mv /usr/lib64/libz.so.*
+ln -sf ../../lib64/libz.so.1 /usr/lib64/libz.so</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
+    xpointer="xpointer(//*[@os='j'])"/>
 
-<screen os="l"><userinput>make clean
-CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure \
-    --prefix=/usr --libdir=/usr/lib64
-make</userinput></screen>
+<screen os="k"><userinput>chmod 644 /usr/lib64/libz.a</userinput></screen>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-<screen os="q"><userinput>chmod 644 /usr/lib64/libz.a</userinput></screen>
-
   </sect2>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"

Modified: trunk/BOOK/final-system/multilib/zlib-n32.xml
===================================================================
--- trunk/BOOK/final-system/multilib/zlib-n32.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/final-system/multilib/zlib-n32.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -24,69 +24,53 @@
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
+    xpointer="xpointer(//*[@os='p1'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
+    xpointer="xpointer(//*[@os='p2'])"/>
 
-<screen os="c"><userinput>CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \
-   --shared --libdir=/lib32</userinput></screen>
-
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='d'])"/>
+    xpointer="xpointer(//*[@os='a'])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='e'])"/>
+<screen os="b"><userinput>CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \
+   --shared --libdir=/usr/lib32</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='f'])"/>
+    xpointer="xpointer(//*[@os='c'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='g'])"/>
+    xpointer="xpointer(//*[@os='d'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='h'])"/>
+    xpointer="xpointer(//*[@os='e'])"/>
 
-    <para os="i">The previous command installed a <filename
-    class="extension">.so</filename> file in <filename
-    class="directory">/lib32</filename>. We will remove it and relink it into
-    <filename class="directory">/usr/lib32</filename>:</para>
-
-<screen os="j"><userinput>rm /lib32/libz.so
-ln -sf ../../lib32/libz.so.&zlib-version; /usr/lib32/libz.so</userinput></screen>
-
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='k'])"/>
+    xpointer="xpointer(//*[@os='f'])"/>
 
-<screen os="l"><userinput>make clean
-CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure \
-    --prefix=/usr --libdir=/usr/lib32
-make</userinput></screen>
-
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
+    xpointer="xpointer(//*[@os='g'])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
+    <para os="h">The previous command installed a <filename
+    class="extension">.so</filename> file in <filename
+    class="directory">/usr/lib32</filename>. We will remove itinto
+    <filename class="directory">/lib32</filename> and then relink it
+    to <filename class="directory">/usr/lib32</filename>:</para>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="zlib.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
+<screen os="i"><userinput>mv /usr/lib32/libz.so.*
+ln -sf ../../lib32/libz.so.1 /usr/lib32/libz.so</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="zlib.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
+    xpointer="xpointer(//*[@os='j'])"/>
 
-<screen os="q"><userinput>chmod 644 /usr/lib32/libz.a</userinput></screen>
+<screen os="k"><userinput>chmod 644 /usr/lib32/libz.a</userinput></screen>
 
   </sect2>
 

Modified: trunk/BOOK/final-system/multilib/zlib.xml
===================================================================
--- trunk/BOOK/final-system/multilib/zlib.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/final-system/multilib/zlib.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -24,17 +24,25 @@
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='a'])"/>
+    xpointer="xpointer(//*[@os='p1'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='b'])"/>
+    xpointer="xpointer(//*[@os='p2'])"/>
 
-<screen os="c"><userinput>CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
-   --shared --libdir=/lib</userinput></screen>
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/zlib.xml"
+    xpointer="xpointer(//*[@os='a'])"/>
 
+<screen os="b"><userinput>CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
+   --shared</userinput></screen>
+
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../common/zlib.xml"
+    xpointer="xpointer(//*[@os='c'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/zlib.xml"
     xpointer="xpointer(//*[@os='d'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
@@ -65,30 +73,6 @@
     href="../common/zlib.xml"
     xpointer="xpointer(//*[@os='k'])"/>
 
-<screen os="l"><userinput>make clean
-CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr
-make</userinput></screen>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='m'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='n'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='o'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='p'])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../common/zlib.xml"
-    xpointer="xpointer(//*[@os='q'])"/>
-
   </sect2>
 
   <sect2 role="content">

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/general.ent	2006-01-12 01:12:52 UTC (rev 1039)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY version "CLFS-SVN-20060110">
+<!ENTITY version "CLFS-SVN-20060111">
 <!ENTITY version-x86 "&version;-x86">
 <!ENTITY version-x86_64 "&version;-x86_64-Multilib">
 <!ENTITY version-x86_64-64 "&version;-x86_64-Pure64">
@@ -14,7 +14,7 @@
 <!ENTITY version-mips64-64 "&version;-MIPS64-Pure64">
 <!ENTITY version-alpha "&version;-ALPHA">
 
-<!ENTITY releasedate "January 10, 2006">
+<!ENTITY releasedate "January 11, 2006">
 <!ENTITY milestone "0.1">
 <!ENTITY generic-version "svn"> <!-- Use "svn", "testing", or "x.y[-pre{x}]" -->
 

Modified: trunk/BOOK/introduction/common/changelog.xml
===================================================================
--- trunk/BOOK/introduction/common/changelog.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/introduction/common/changelog.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -37,16 +37,26 @@
 -->
 
     <listitem>
+      <para>January 11, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim] - Rewrote wrote zlib final instructions to include
+           a patch the will allow build of static and shared libraries at
+	   the same time. Thanx for the recommendation Tushar Teredesai.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>January 8, 2006</para>
       <itemizedlist>
         <listitem>
           <para>[Chris] - Rewrote much of the description of the build
-process and test suite information.</para>
+	  process and test suite information.</para>
         </listitem>
       </itemizedlist>
     </listitem>
 
-
     <listitem>
       <para>January 3, 2006</para>
       <itemizedlist>

Modified: trunk/BOOK/materials/common/patches.xml
===================================================================
--- trunk/BOOK/materials/common/patches.xml	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/materials/common/patches.xml	2006-01-12 01:12:52 UTC (rev 1039)
@@ -223,6 +223,13 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry os="p28">
+      <term>Zlib fPIC Patch - 3.2 KB:</term> <listitem>
+        <para><ulink
+        url="&patches-root;zlib/&zlib-fpic-patch;"/></para>
+      </listitem>
+    </varlistentry>
+
   </variablelist>
 
   <para os="b">In addition to the above required patches, there exist a number of

Modified: trunk/BOOK/patches.ent
===================================================================
--- trunk/BOOK/patches.ent	2006-01-10 21:28:14 UTC (rev 1038)
+++ trunk/BOOK/patches.ent	2006-01-12 01:12:52 UTC (rev 1039)
@@ -60,6 +60,8 @@
 
 <!ENTITY vim-security_fix-patch "vim-&vim-version;-security_fix-2.patch">
 
+<!ENTITY zlib-fpic-patch "zlib-&zlib-version;-fPIC-1.patch">
+
 <!-- Start of multilib patches -->
 
 <!ENTITY binutils-multilib-patch "binutils-&binutils-version;-genscripts_multilib-1.patch">




More information about the cross-lfs mailing list