Changeset 6732e02 for final-system/common
- Timestamp:
- Feb 21, 2006, 2:06:53 AM (19 years ago)
- Children:
- cdadf8f
- Parents:
- dca6da7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
final-system/common/zlib.xml
rdca6da7 r6732e02 34 34 <title>Installation of Zlib</title> 35 35 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> 44 38 45 <para os="b">Prepare Zlib for compilation:</para>39 <screen os="p2"><userinput>patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen> 46 40 47 <screen os="c"><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>41 <para os="a">Prepare Zlib for compilation:</para> 48 42 49 <para os="d">Compile the package:</para>43 <screen os="b"><userinput>./configure --prefix=/usr --shared</userinput></screen> 50 44 51 <screen os="e"><userinput>make</userinput></screen>45 <para os="c">Compile the package:</para> 52 46 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: 54 50 <userinput>make check</userinput>.</para> 55 51 56 <para os=" g">Install the shared library:</para>52 <para os="f">Installation:</para> 57 53 58 <screen os=" h"><userinput>make install</userinput></screen>54 <screen os="g"><userinput>make install</userinput></screen> 59 55 60 <para os=" i">The previous command installed a <filename56 <para os="h">The previous command installed a <filename 61 57 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> 64 61 65 <screen os=" j"><userinput>rm /lib/libz.so66 ln -sf ../../lib/libz.so. &zlib-version;/usr/lib/libz.so</userinput></screen>62 <screen os="i"><userinput>mv /usr/lib/libz.so.* 63 ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen> 67 64 68 <para os=" k">Buildthe static library:</para>65 <para os="j">Now we fix the permissions on the static library:</para> 69 66 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> 84 68 85 69 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.