1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!-- Also update the download, md5, size entities in libxml2py2.xml -->
|
---|
8 | <!ENTITY libxml2-download-http "https://download.gnome.org/sources/libxml2/2.13/libxml2-&libxml2-version;.tar.xz">
|
---|
9 | <!-- <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.xz">-->
|
---|
10 | <!ENTITY libxml2-download-ftp " ">
|
---|
11 | <!ENTITY libxml2-md5sum "1c5f9cfeee665eb6f1ddc186aba4cf2f">
|
---|
12 | <!ENTITY libxml2-size "2.4 MB">
|
---|
13 | <!ENTITY libxml2-buildsize "111 MB (with tests)">
|
---|
14 | <!ENTITY libxml2-time "0.4 SBU (Using parallelism=4; with tests)">
|
---|
15 | <!ENTITY testsuite-version "20130923">
|
---|
16 | ]>
|
---|
17 |
|
---|
18 | <sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
|
---|
19 | <?dbhtml filename="libxml2.html"?>
|
---|
20 |
|
---|
21 |
|
---|
22 | <title>libxml2-&libxml2-version;</title>
|
---|
23 |
|
---|
24 | <indexterm zone="libxml2">
|
---|
25 | <primary sortas="a-libxml2">libxml2</primary>
|
---|
26 | </indexterm>
|
---|
27 |
|
---|
28 | <sect2 role="package">
|
---|
29 | <title>Introduction to libxml2</title>
|
---|
30 |
|
---|
31 | <para>
|
---|
32 | The <application>libxml2</application> package contains libraries
|
---|
33 | and utilities used for parsing XML files.
|
---|
34 | </para>
|
---|
35 |
|
---|
36 | &lfs122_checked;
|
---|
37 |
|
---|
38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
39 | <itemizedlist spacing="compact">
|
---|
40 | <listitem>
|
---|
41 | <para>
|
---|
42 | Download (HTTP): <ulink url="&libxml2-download-http;"/>
|
---|
43 | </para>
|
---|
44 | </listitem>
|
---|
45 | <listitem>
|
---|
46 | <para>
|
---|
47 | Download (FTP): <ulink url="&libxml2-download-ftp;"/>
|
---|
48 | </para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>
|
---|
52 | Download MD5 sum: &libxml2-md5sum;
|
---|
53 | </para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>
|
---|
57 | Download size: &libxml2-size;
|
---|
58 | </para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>
|
---|
62 | Estimated disk space required: &libxml2-buildsize;
|
---|
63 | </para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>
|
---|
67 | Estimated build time: &libxml2-time;
|
---|
68 | </para>
|
---|
69 | </listitem>
|
---|
70 | </itemizedlist>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
73 | <itemizedlist spacing="compact">
|
---|
74 | <!-- 2.13.4: all changed appied
|
---|
75 | <listitem>
|
---|
76 | <para>
|
---|
77 | Required patch:
|
---|
78 | <ulink url="&patch-root;/libxml2-&libxml2-version;-upstream_fix-2.patch"/>
|
---|
79 | </para>
|
---|
80 | </listitem>
|
---|
81 | -->
|
---|
82 | <listitem>
|
---|
83 | <para>
|
---|
84 | Optional Test Suite:
|
---|
85 | <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
---|
86 | enables <command>make check</command> to do complete testing.
|
---|
87 | </para>
|
---|
88 | </listitem>
|
---|
89 | </itemizedlist>
|
---|
90 |
|
---|
91 | <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
---|
92 |
|
---|
93 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
94 | <para role="recommended">
|
---|
95 | <xref linkend="icu"/>
|
---|
96 | </para>
|
---|
97 |
|
---|
98 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
99 | <para role="optional">
|
---|
100 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
101 | </para>
|
---|
102 | </sect2>
|
---|
103 |
|
---|
104 | <sect2 role="installation">
|
---|
105 | <title>Installation of libxml2</title>
|
---|
106 |
|
---|
107 | <!--
|
---|
108 | <para>
|
---|
109 | At first, fix an issue causing <command>xmlcatalog</command> to emit
|
---|
110 | bogus warnings when a new catalog file is created. The patch will
|
---|
111 | modify the building system, so regenerate the building scripts after
|
---|
112 | applying the patch:
|
---|
113 | </para>
|
---|
114 |
|
---|
115 | <screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-upstream_fix-2.patch</userinput></screen>
|
---|
116 | -->
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | Install <application>libxml2</application> by running the following
|
---|
120 | commands:
|
---|
121 | </para>
|
---|
122 |
|
---|
123 | <screen><userinput>./configure --prefix=/usr \
|
---|
124 | --sysconfdir=/etc \
|
---|
125 | --disable-static \
|
---|
126 | --with-history \
|
---|
127 | --with-icu \
|
---|
128 | PYTHON=/usr/bin/python3 \
|
---|
129 | --docdir=/usr/share/doc/libxml2-&libxml2-version; &&
|
---|
130 | make</userinput></screen>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | If you downloaded the test suite, issue the following command:
|
---|
134 | </para>
|
---|
135 |
|
---|
136 | <screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
---|
137 |
|
---|
138 | <para>
|
---|
139 | To test the results, issue: <command>make check > check.log</command>.
|
---|
140 | This command will print several lines of error messages like
|
---|
141 | <quote><computeroutput>Failed to parse
|
---|
142 | xstc/...</computeroutput></quote> because some test files are missing
|
---|
143 | and these messages can be safely ignored.
|
---|
144 | A summary of the results can be obtained with <command>grep -E
|
---|
145 | '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
|
---|
146 | installed and you want to check for memory leaks, replace
|
---|
147 | <command>check</command> with <command>check-valgrind</command>.
|
---|
148 | </para>
|
---|
149 |
|
---|
150 | <note>
|
---|
151 | <para>
|
---|
152 | The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
---|
153 | to test parsing of external entities. If the machine where you run the
|
---|
154 | tests serves as a web site, the tests may hang, depending on the
|
---|
155 | content of the file served. It is therefore recommended to shut down
|
---|
156 | the server during the tests, as the <systemitem
|
---|
157 | class="username">root</systemitem> user:
|
---|
158 | </para>
|
---|
159 |
|
---|
160 | <screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
---|
161 | <screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
---|
162 |
|
---|
163 | </note>
|
---|
164 |
|
---|
165 | <para>
|
---|
166 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
167 | </para>
|
---|
168 |
|
---|
169 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
170 |
|
---|
171 | <para>
|
---|
172 | Finally, prevent some packages from unnecessarily linking to ICU using
|
---|
173 | the following commands as the &root; user:
|
---|
174 | </para>
|
---|
175 |
|
---|
176 | <screen role="root"><userinput>rm -vf /usr/lib/libxml2.la &&
|
---|
177 | sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
|
---|
178 |
|
---|
179 | </sect2>
|
---|
180 |
|
---|
181 | <sect2 role="commands">
|
---|
182 | <title>Command Explanations</title>
|
---|
183 |
|
---|
184 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
185 | href="../../xincludes/static-libraries.xml"/>
|
---|
186 |
|
---|
187 | <para>
|
---|
188 | <parameter>--with-history</parameter>: This switch enables
|
---|
189 | <application>Readline</application> support when running
|
---|
190 | <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
---|
191 | </para>
|
---|
192 |
|
---|
193 | <para>
|
---|
194 | <parameter>--with-icu</parameter>: This switch enables support for
|
---|
195 | <application>ICU</application>, which provides additional Unicode support.
|
---|
196 | This is needed for some packages in BLFS, such as for QtWebEngine.
|
---|
197 | </para>
|
---|
198 |
|
---|
199 | <para>
|
---|
200 | <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
|
---|
201 | the libxml2 module with Python3 instead of Python2.
|
---|
202 | </para>
|
---|
203 |
|
---|
204 | <!--
|
---|
205 | <para>
|
---|
206 | <option>- -with-icu</option>: Add this switch if you have built
|
---|
207 | <xref linkend="icu"/>, for better unicode support.
|
---|
208 | </para>
|
---|
209 |
|
---|
210 | <note>
|
---|
211 | <para>
|
---|
212 | If the <option>- -with-icu</option> switch is used, the BLFS editors
|
---|
213 | recommend removing unneeded references to the ICU libraries. This
|
---|
214 | will prevent many packages that use libxml2 from unnecessarily linking
|
---|
215 | to the ICU libraries. This, in turn, will prevent the need for
|
---|
216 | rebuilding many packages when upgrading ICU to a new major version.
|
---|
217 | After installing libxml2, as the &root; user, issue:
|
---|
218 | </para>
|
---|
219 |
|
---|
220 | <screen role="nodump"><userinput>rm -vf /usr/lib/libxml2.la &&
|
---|
221 | sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
|
---|
222 | </note>
|
---|
223 | -->
|
---|
224 |
|
---|
225 | </sect2>
|
---|
226 |
|
---|
227 | <sect2 role="content">
|
---|
228 | <title>Contents</title>
|
---|
229 |
|
---|
230 | <segmentedlist>
|
---|
231 | <segtitle>Installed Programs</segtitle>
|
---|
232 | <segtitle>Installed Libraries</segtitle>
|
---|
233 | <segtitle>Installed Directories</segtitle>
|
---|
234 |
|
---|
235 | <seglistitem>
|
---|
236 | <seg>
|
---|
237 | xml2-config,
|
---|
238 | xmlcatalog, and
|
---|
239 | xmllint
|
---|
240 | </seg>
|
---|
241 | <seg>
|
---|
242 | libxml2.so
|
---|
243 | </seg>
|
---|
244 | <seg>
|
---|
245 | /usr/include/libxml2,
|
---|
246 | /usr/lib/cmake/libxml2,
|
---|
247 | /usr/share/doc/libxml2-&libxml2-version;, and
|
---|
248 | /usr/share/gtk-doc/html/libxml2
|
---|
249 | </seg>
|
---|
250 | </seglistitem>
|
---|
251 | </segmentedlist>
|
---|
252 |
|
---|
253 | <variablelist>
|
---|
254 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
255 | <?dbfo list-presentation="list"?>
|
---|
256 | <?dbhtml list-presentation="table"?>
|
---|
257 |
|
---|
258 | <varlistentry id="xml2-config">
|
---|
259 | <term><command>xml2-config</command></term>
|
---|
260 | <listitem>
|
---|
261 | <para>
|
---|
262 | determines the compile and linker flags that should be used to
|
---|
263 | compile and link programs that use
|
---|
264 | <filename class="libraryfile">libxml2</filename>
|
---|
265 | </para>
|
---|
266 | <indexterm zone="libxml2 xml2-config">
|
---|
267 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
268 | </indexterm>
|
---|
269 | </listitem>
|
---|
270 | </varlistentry>
|
---|
271 |
|
---|
272 | <varlistentry id="xmlcatalog">
|
---|
273 | <term><command>xmlcatalog</command></term>
|
---|
274 | <listitem>
|
---|
275 | <para>
|
---|
276 | is used to monitor and manipulate XML and SGML catalogs
|
---|
277 | </para>
|
---|
278 | <indexterm zone="libxml2 xmlcatalog">
|
---|
279 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
280 | </indexterm>
|
---|
281 | </listitem>
|
---|
282 | </varlistentry>
|
---|
283 |
|
---|
284 | <varlistentry id="xmllint">
|
---|
285 | <term><command>xmllint</command></term>
|
---|
286 | <listitem>
|
---|
287 | <para>
|
---|
288 | parses XML files and outputs reports (based upon options) to detect
|
---|
289 | errors in XML coding
|
---|
290 | </para>
|
---|
291 | <indexterm zone="libxml2 xmllint">
|
---|
292 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
293 | </indexterm>
|
---|
294 | </listitem>
|
---|
295 | </varlistentry>
|
---|
296 |
|
---|
297 | <varlistentry id="libxml2-lib">
|
---|
298 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
299 | <listitem>
|
---|
300 | <para>
|
---|
301 | provides functions for programs to parse files that use the XML
|
---|
302 | format
|
---|
303 | </para>
|
---|
304 | <indexterm zone="libxml2 libxml2-lib">
|
---|
305 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
306 | </indexterm>
|
---|
307 | </listitem>
|
---|
308 | </varlistentry>
|
---|
309 |
|
---|
310 | </variablelist>
|
---|
311 |
|
---|
312 | </sect2>
|
---|
313 |
|
---|
314 | </sect1>
|
---|