Author: bdubbs
Date: 2009-05-27 00:33:49 -0600 (Wed, 27 May 2009)
New Revision: 8932
Modified:
trunk/BOOK/chapter01/changelog.xml
trunk/BOOK/chapter01/whatsnew.xml
trunk/BOOK/chapter06/zlib.xml
trunk/BOOK/general.ent
Log:
Revert zlib to doing separate builds for
static and dynamic libraries to ensure the -fPIC parameter
is set properly in both cases.
Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml 2009-05-27 05:44:37 UTC (rev 8931)
+++ trunk/BOOK/chapter01/changelog.xml 2009-05-27 06:33:49 UTC (rev 8932)
@@ -41,6 +41,12 @@
<para>2009-05-27</para>
<itemizedlist>
<listitem>
+ <para>[bdubbs] - Revert zlib to doing separate builds for
+ static and dynamic libraries to ensure the -fPIC parameter
+ is set properly in both cases.
+ Fixes <ulink url="&lfs-ticket-root;2329">#2329</ulink>
(again).</para>
+ </listitem>
+ <listitem>
<para>[bdubbs] - Update gettext patch to -2 for an additional
bug fix. Thanks to Robert Connolly for the patch.
Fixes <ulink url="&lfs-ticket-root;2417">#2417</ulink>.</para>
Modified: trunk/BOOK/chapter01/whatsnew.xml
===================================================================
--- trunk/BOOK/chapter01/whatsnew.xml 2009-05-27 05:44:37 UTC (rev 8931)
+++ trunk/BOOK/chapter01/whatsnew.xml 2009-05-27 06:33:49 UTC (rev 8932)
@@ -307,10 +307,11 @@
<listitem>
<para>vim-7.2-fixes-3.patch</para>
</listitem>
+ <!--
<listitem>
<para>zlib-1.2.3-fPIC-1.patch</para>
</listitem>
-
+ -->
</itemizedlist>
</sect1>
Modified: trunk/BOOK/chapter06/zlib.xml
===================================================================
--- trunk/BOOK/chapter06/zlib.xml 2009-05-27 05:44:37 UTC (rev 8931)
+++ trunk/BOOK/chapter06/zlib.xml 2009-05-27 06:33:49 UTC (rev 8932)
@@ -47,18 +47,13 @@
a specified <envar>CFLAGS</envar> variable, be sure to add the
<parameter>-fPIC</parameter> directive to the <envar>CFLAGS</envar>
variable for the duration of the configure command below, then
- remove it afterwards.</para>
+ remove it when building the static library.</para>
</note>
- <para>Modify the build scripts to ensure compilation with position
independent
- code and allow building both static and dynamic libraries in one
step:</para>
+ <para>Prepare Zlib for building the dynamic library:</para>
-<screen><userinput remap="configure">patch -Np1 -i
../&zlib-fpic-patch;</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr --shared
--libdir=/lib</userinput></screen>
- <para>Prepare Zlib for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr
--shared</userinput></screen>
-
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
@@ -67,14 +62,36 @@
<screen><userinput remap="test">make check</userinput></screen>
- <para>Install the libraries:</para>
+ <para>Install the shared library:</para>
<screen><userinput remap="install">make install</userinput></screen>
- <para>Finally, fix permissions on the static library:</para>
+ <para>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>
-<screen><userinput remap="install">chmod 0644
/usr/lib/libz.a</userinput></screen>
+<screen><userinput remap="install">rm -v /lib/libz.so
+ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
+ <para>Build the static library:</para>
+
+<screen><userinput remap="make">make clean
+./configure --prefix=/usr
+make</userinput></screen>
+
+ <para>To test the results again, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+ <para>Install the static library:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+ <para>Fix the permissions on the static library:</para>
+
+<screen><userinput remap="install">chmod -v 644
/usr/lib/libz.a</userinput></screen>
+
</sect2>
<sect2 id="contents-zlib" role="content">
Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent 2009-05-27 05:44:37 UTC (rev 8931)
+++ trunk/BOOK/general.ent 2009-05-27 06:33:49 UTC (rev 8932)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20090526">
-<!ENTITY releasedate "May 26, 2009">
+<!ENTITY version "SVN-20090527">
+<!ENTITY releasedate "May 27, 2009">
<!ENTITY copyrightdate "1999-2009"><!-- jhalfs needs a literal dash, not
– -->
<!ENTITY milestone "6.5">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or
"x.y[-pre{x}]" -->
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page