diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index a0da0b413..524e40a63 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,13 @@ 2009-05-16 + + [bdubbs] - Add zlib-1.2.3-fPIC-1.patch which allows + building static and dynamic libraries in one step. Also + moved the libraries to /usr/lib. + Fixes + #2329. + [bdubbs] - Make symbolic links installed by bzip2 relative. Fixes diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 0d0132064..28ed7725a 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -304,6 +304,9 @@ vim-7.2-fixes-3.patch + + zlib-1.2.3-fPIC-1.patch + diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 327fee593..06a493131 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -234,6 +234,14 @@ --> + + Zlib fPIC Patch - &zlib-fpic-patch-size;: + + Download: + MD5 sum: &zlib-fpic-patch-md5; + + + Total size of these patches: about diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml index 6a4eadbc0..ddddad00b 100644 --- a/chapter06/zlib.xml +++ b/chapter06/zlib.xml @@ -50,9 +50,14 @@ remove it afterwards. + Modify the build scripts to ensure compilation with position independent + code and allow building both static and dynamic libraries in one step: + +patch -Np1 -i ../&zlib-fpic-patch; + Prepare Zlib for compilation: -./configure --prefix=/usr --shared --libdir=/lib +./configure --prefix=/usr --shared Compile the package: @@ -62,36 +67,10 @@ make check - Install the shared library: + Install the libraries: make install - The previous command installed a .so file in /lib. We will remove it and relink it into - /usr/lib: - -rm -v /lib/libz.so -ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so - - Build the static library: - -make clean -./configure --prefix=/usr -make - - To test the results again, issue: - -make check - - Install the static library: - -make install - - Fix the permissions on the static library: - -chmod -v 644 /usr/lib/libz.a - diff --git a/patches.ent b/patches.ent index ed4f10cf6..8906735c0 100644 --- a/patches.ent +++ b/patches.ent @@ -116,3 +116,7 @@ --> + + + +