Changeset 27178ae for BOOK/final-system


Ignore:
Timestamp:
Feb 21, 2006, 2:06:53 AM (19 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
bcbd90b
Parents:
f013de9
Message:

r1041@server (orig r1039): jim | 2006-01-11 17:12:52 -0800

r1346@server: jim | 2006-01-11 17:10:51 -0800
Updated zlib to build shared and static at the same time. Recommendation by Tushar Teredesai


Location:
BOOK/final-system
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BOOK/final-system/common/zlib.xml

    rf013de9 r27178ae  
    3434    <title>Installation of Zlib</title>
    3535
    36     <note os="a">
    37       <para>Zlib is known to build its shared library incorrectly if
    38       <envar>CFLAGS</envar> is specified in the environment. If using a
    39       specified <envar>CFLAGS</envar> variable, be sure to add the
    40       <option>-fPIC</option> directive to the <envar>CFLAGS</envar>
    41       variable for the duration of the configure command below, then
    42       remove it afterwards.</para>
    43     </note>
     36    <para os="p1">This patch will add -fPIC to our build and allow us to build
     37    a static and shared library at the same time:</para>
    4438
    45     <para os="b">Prepare Zlib for compilation:</para>
     39<screen os="p2"><userinput>patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen>
    4640
    47 <screen os="c"><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
     41    <para os="a">Prepare Zlib for compilation:</para>
    4842
    49     <para os="d">Compile the package:</para>
     43<screen os="b"><userinput>./configure --prefix=/usr --shared</userinput></screen>
    5044
    51 <screen os="e"><userinput>make</userinput></screen>
     45    <para os="c">Compile the package:</para>
    5246
    53     <para os="f">To test the results, issue:
     47<screen os="d"><userinput>make</userinput></screen>
     48
     49    <para os="e">To test the results, issue:
    5450    <userinput>make check</userinput>.</para>
    5551
    56     <para os="g">Install the shared library:</para>
     52    <para os="f">Installation:</para>
    5753
    58 <screen os="h"><userinput>make install</userinput></screen>
     54<screen os="g"><userinput>make install</userinput></screen>
    5955
    60     <para os="i">The previous command installed a <filename
     56    <para os="h">The previous command installed a <filename
    6157    class="extension">.so</filename> file in <filename
    62     class="directory">/lib</filename>. We will remove it and relink it into
    63     <filename class="directory">/usr/lib</filename>:</para>
     58    class="directory">/usr/lib</filename>. We will remove itinto
     59    <filename class="directory">/lib</filename> and then relink it
     60    to <filename class="directory">/usr/lib</filename>:</para>
    6461
    65 <screen os="j"><userinput>rm /lib/libz.so
    66 ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
     62<screen os="i"><userinput>mv /usr/lib/libz.so.*
     63ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
    6764
    68     <para os="k">Build the static library:</para>
     65    <para os="j">Now we fix the permissions on the static library:</para>
    6966
    70 <screen os="l"><userinput>make clean
    71 ./configure --prefix=/usr
    72 make</userinput></screen>
    73 
    74     <para os="m">To test the results again, issue:
    75     <userinput>make check</userinput>.</para>
    76 
    77     <para os="n">Install the static library:</para>
    78 
    79 <screen os="o"><userinput>make install</userinput></screen>
    80 
    81     <para os="p">Fix the permissions on the static library:</para>
    82 
    83 <screen os="q"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
     67<screen os="k"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
    8468
    8569  </sect2>
  • BOOK/final-system/multilib/zlib-64bit.xml

    rf013de9 r27178ae  
    2424    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    2525    href="zlib.xml"
    26     xpointer="xpointer(//*[@os='a'])"/>
     26    xpointer="xpointer(//*[@os='p1'])"/>
    2727
    2828    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    2929    href="zlib.xml"
    30     xpointer="xpointer(//*[@os='b'])"/>
     30    xpointer="xpointer(//*[@os='p2'])"/>
     31
     32    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     33    href="zlib.xml"
     34    xpointer="xpointer(//*[@os='a'])"/>
    3135
    3236<screen os="c"><userinput>CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
    33    --shared --libdir=/lib64</userinput></screen>
     37   --shared --libdir=/usr/lib64</userinput></screen>
    3438
    3539    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     
    4953    xpointer="xpointer(//*[@os='g'])"/>
    5054
    51     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    52     href="zlib.xml"
    53     xpointer="xpointer(//*[@os='h'])"/>
     55    <para os="h">The previous command installed a <filename
     56    class="extension">.so</filename> file in <filename
     57    class="directory">/usr/lib64</filename>. We will remove itinto
     58    <filename class="directory">/lib64</filename> and then relink it
     59    to <filename class="directory">/usr/lib64</filename>:</para>
    5460
    55     <para os="i">The previous command installed a <filename
    56     class="extension">.so</filename> file in <filename
    57     class="directory">/lib64</filename>. We will remove it and relink it into
    58     <filename class="directory">/usr/lib64</filename>:</para>
    59 
    60 <screen os="j"><userinput>rm /lib64/libz.so
    61 ln -sf ../../lib64/libz.so.&zlib-version; /usr/lib64/libz.so</userinput></screen>
     61<screen os="i"><userinput>mv /usr/lib64/libz.so.*
     62ln -sf ../../lib64/libz.so.1 /usr/lib64/libz.so</userinput></screen>
    6263
    6364    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    6465    href="zlib.xml"
    65     xpointer="xpointer(//*[@os='k'])"/>
     66    xpointer="xpointer(//*[@os='j'])"/>
    6667
    67 <screen os="l"><userinput>make clean
    68 CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure \
    69     --prefix=/usr --libdir=/usr/lib64
    70 make</userinput></screen>
    71 
    72     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    73     href="zlib.xml"
    74     xpointer="xpointer(//*[@os='m'])"/>
    75 
    76     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    77     href="zlib.xml"
    78     xpointer="xpointer(//*[@os='n'])"/>
    79 
    80     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    81     href="zlib.xml"
    82     xpointer="xpointer(//*[@os='o'])"/>
    83 
    84     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    85     href="zlib.xml"
    86     xpointer="xpointer(//*[@os='p'])"/>
    87 
    88 <screen os="q"><userinput>chmod 644 /usr/lib64/libz.a</userinput></screen>
     68<screen os="k"><userinput>chmod 644 /usr/lib64/libz.a</userinput></screen>
    8969
    9070  </sect2>
  • BOOK/final-system/multilib/zlib-n32.xml

    rf013de9 r27178ae  
    2525    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    2626    href="zlib.xml"
    27     xpointer="xpointer(//*[@os='a'])"/>
     27    xpointer="xpointer(//*[@os='p1'])"/>
    2828
    2929    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    3030    href="zlib.xml"
    31     xpointer="xpointer(//*[@os='b'])"/>
     31    xpointer="xpointer(//*[@os='p2'])"/>
    3232
    33 <screen os="c"><userinput>CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \
    34    --shared --libdir=/lib32</userinput></screen>
     33    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     34    href="zlib.xml"
     35    xpointer="xpointer(//*[@os='a'])"/>
     36
     37<screen os="b"><userinput>CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \
     38   --shared --libdir=/usr/lib32</userinput></screen>
     39
     40    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     41    href="zlib.xml"
     42    xpointer="xpointer(//*[@os='c'])"/>
    3543
    3644    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     
    5058    xpointer="xpointer(//*[@os='g'])"/>
    5159
    52     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    53     href="zlib.xml"
    54     xpointer="xpointer(//*[@os='h'])"/>
     60    <para os="h">The previous command installed a <filename
     61    class="extension">.so</filename> file in <filename
     62    class="directory">/usr/lib32</filename>. We will remove itinto
     63    <filename class="directory">/lib32</filename> and then relink it
     64    to <filename class="directory">/usr/lib32</filename>:</para>
    5565
    56     <para os="i">The previous command installed a <filename
    57     class="extension">.so</filename> file in <filename
    58     class="directory">/lib32</filename>. We will remove it and relink it into
    59     <filename class="directory">/usr/lib32</filename>:</para>
    60 
    61 <screen os="j"><userinput>rm /lib32/libz.so
    62 ln -sf ../../lib32/libz.so.&zlib-version; /usr/lib32/libz.so</userinput></screen>
     66<screen os="i"><userinput>mv /usr/lib32/libz.so.*
     67ln -sf ../../lib32/libz.so.1 /usr/lib32/libz.so</userinput></screen>
    6368
    6469    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    6570    href="zlib.xml"
    66     xpointer="xpointer(//*[@os='k'])"/>
     71    xpointer="xpointer(//*[@os='j'])"/>
    6772
    68 <screen os="l"><userinput>make clean
    69 CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure \
    70     --prefix=/usr --libdir=/usr/lib32
    71 make</userinput></screen>
    72 
    73     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    74     href="zlib.xml"
    75     xpointer="xpointer(//*[@os='m'])"/>
    76 
    77     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    78     href="zlib.xml"
    79     xpointer="xpointer(//*[@os='n'])"/>
    80 
    81     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    82     href="zlib.xml"
    83     xpointer="xpointer(//*[@os='o'])"/>
    84 
    85     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    86     href="zlib.xml"
    87     xpointer="xpointer(//*[@os='p'])"/>
    88 
    89 <screen os="q"><userinput>chmod 644 /usr/lib32/libz.a</userinput></screen>
     73<screen os="k"><userinput>chmod 644 /usr/lib32/libz.a</userinput></screen>
    9074
    9175  </sect2>
  • BOOK/final-system/multilib/zlib.xml

    rf013de9 r27178ae  
    2525    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    2626    href="../common/zlib.xml"
    27     xpointer="xpointer(//*[@os='a'])"/>
     27    xpointer="xpointer(//*[@os='p1'])"/>
    2828
    2929    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    3030    href="../common/zlib.xml"
    31     xpointer="xpointer(//*[@os='b'])"/>
     31    xpointer="xpointer(//*[@os='p2'])"/>
    3232
    33 <screen os="c"><userinput>CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
    34    --shared --libdir=/lib</userinput></screen>
     33    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     34    href="../common/zlib.xml"
     35    xpointer="xpointer(//*[@os='a'])"/>
     36
     37<screen os="b"><userinput>CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
     38   --shared</userinput></screen>
     39
     40    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     41    href="../common/zlib.xml"
     42    xpointer="xpointer(//*[@os='c'])"/>
    3543
    3644    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     
    6674    xpointer="xpointer(//*[@os='k'])"/>
    6775
    68 <screen os="l"><userinput>make clean
    69 CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr
    70 make</userinput></screen>
    71 
    72     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    73     href="../common/zlib.xml"
    74     xpointer="xpointer(//*[@os='m'])"/>
    75 
    76     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    77     href="../common/zlib.xml"
    78     xpointer="xpointer(//*[@os='n'])"/>
    79 
    80     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    81     href="../common/zlib.xml"
    82     xpointer="xpointer(//*[@os='o'])"/>
    83 
    84     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    85     href="../common/zlib.xml"
    86     xpointer="xpointer(//*[@os='p'])"/>
    87 
    88     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    89     href="../common/zlib.xml"
    90     xpointer="xpointer(//*[@os='q'])"/>
    91 
    9276  </sect2>
    9377
Note: See TracChangeset for help on using the changeset viewer.