1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
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 "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.gz">
|
---|
9 | <!ENTITY libxml2-download-ftp "ftp://xmlsoft.org/libxml2/libxml2-&libxml2-version;.tar.gz">
|
---|
10 | <!ENTITY libxml2-md5sum "10942a1dc23137a8aa07f0639cbfece5">
|
---|
11 | <!ENTITY libxml2-size "5.4 MB">
|
---|
12 | <!ENTITY libxml2-buildsize "87 MB (add 15 MB for tests)">
|
---|
13 | <!ENTITY libxml2-time "0.2 SBU (add 0.3 SBU for tests)">
|
---|
14 | <!ENTITY testsuite-version "20130923">
|
---|
15 | ]>
|
---|
16 |
|
---|
17 | <sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
|
---|
18 | <?dbhtml filename="libxml2.html"?>
|
---|
19 |
|
---|
20 | <sect1info>
|
---|
21 | <othername>$LastChangedBy$</othername>
|
---|
22 | <date>$Date$</date>
|
---|
23 | </sect1info>
|
---|
24 |
|
---|
25 | <title>libxml2-&libxml2-version;</title>
|
---|
26 |
|
---|
27 | <indexterm zone="libxml2">
|
---|
28 | <primary sortas="a-libxml2">libxml2</primary>
|
---|
29 | </indexterm>
|
---|
30 |
|
---|
31 | <sect2 role="package">
|
---|
32 | <title>Introduction to libxml2</title>
|
---|
33 |
|
---|
34 | <para>
|
---|
35 | The <application>libxml2</application> package contains libraries
|
---|
36 | and utilities used for parsing XML files.
|
---|
37 | </para>
|
---|
38 |
|
---|
39 | &lfs90_checked;
|
---|
40 |
|
---|
41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
42 | <itemizedlist spacing="compact">
|
---|
43 | <listitem>
|
---|
44 | <para>
|
---|
45 | Download (HTTP): <ulink url="&libxml2-download-http;"/>
|
---|
46 | </para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download (FTP): <ulink url="&libxml2-download-ftp;"/>
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download MD5 sum: &libxml2-md5sum;
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Download size: &libxml2-size;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Estimated disk space required: &libxml2-buildsize;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | <listitem>
|
---|
69 | <para>
|
---|
70 | Estimated build time: &libxml2-time;
|
---|
71 | </para>
|
---|
72 | </listitem>
|
---|
73 | </itemizedlist>
|
---|
74 |
|
---|
75 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
76 | <itemizedlist spacing="compact">
|
---|
77 | <listitem>
|
---|
78 | <para>
|
---|
79 | Optional Testsuite:
|
---|
80 | <ulink url="http://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
---|
81 | enables <command>make check</command> to do complete testing.
|
---|
82 | </para>
|
---|
83 | </listitem>
|
---|
84 | <!--
|
---|
85 | <listitem>
|
---|
86 | <para>
|
---|
87 | Recommended patch to prevent a segfault in itstool when using Python3:
|
---|
88 | <ulink url="&patch-root;/libxml2-&libxml2-version;-python3_hack-1.patch"/>
|
---|
89 | </para>
|
---|
90 | </listitem> -->
|
---|
91 | </itemizedlist>
|
---|
92 |
|
---|
93 | <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
---|
94 |
|
---|
95 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
96 | <para role="optional">
|
---|
97 | <xref linkend="python2"/> <!--or <xref linkend="python3"/> (to build and
|
---|
98 | install a <application>Python</application> library module, additionally
|
---|
99 | it is required to run the full suite of tests)-->
|
---|
100 | <!-- As discovered by Bruce, itstool needs this module. -->
|
---|
101 | </para>
|
---|
102 |
|
---|
103 | <note>
|
---|
104 | <para>
|
---|
105 | Some packages which utilize <application>libxml2</application> (such as
|
---|
106 | <application>GNOME Doc Utils</application>) need the
|
---|
107 | <application>Python3</application> module installed to function properly
|
---|
108 | and some packages will not build properly if the
|
---|
109 | <application>Python3</application> module is not available.
|
---|
110 | </para>
|
---|
111 |
|
---|
112 | <para>
|
---|
113 | The old <application>Python2</application> module can be built after
|
---|
114 | <filename class="libraryfile">libxml2.so</filename> has been installed,
|
---|
115 | see <xref linkend="libxml2py2"/>.
|
---|
116 | </para>
|
---|
117 | </note>
|
---|
118 |
|
---|
119 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
120 | <para role="optional">
|
---|
121 | <xref linkend="icu"/> and
|
---|
122 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
123 | </para>
|
---|
124 |
|
---|
125 | <para condition="html" role="usernotes">
|
---|
126 | User Notes: <ulink url="&blfs-wiki;/libxml2"/>
|
---|
127 | </para>
|
---|
128 | </sect2>
|
---|
129 |
|
---|
130 | <sect2 role="installation">
|
---|
131 | <title>Installation of libxml2</title>
|
---|
132 | <!--
|
---|
133 | <para>
|
---|
134 | First apply a patch, which prevents segfaults in the Python module, when
|
---|
135 | built by <xref linkend="python3"/>:
|
---|
136 | </para>
|
---|
137 |
|
---|
138 | <screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-python3_hack-1.patch</userinput></screen>
|
---|
139 |
|
---|
140 | <para>
|
---|
141 | To ensure that the <application>Python</application> module can be
|
---|
142 | built by <xref linkend="python3"/>, run:
|
---|
143 | </para>
|
---|
144 |
|
---|
145 | <screen><userinput>sed -i '/_PyVerify_fd/,+1d' python/types.c</userinput></screen>
|
---|
146 | -->
|
---|
147 | <para>
|
---|
148 | If you are going to run the tests, disable one test that prevents the
|
---|
149 | tests from completing:
|
---|
150 | </para>
|
---|
151 |
|
---|
152 | <screen><userinput>sed -i 's/test.test/#&/' python/tests/tstLastError.py</userinput></screen>
|
---|
153 |
|
---|
154 | <para>
|
---|
155 | Install <application>libxml2</application> by running the following
|
---|
156 | commands:
|
---|
157 | </para>
|
---|
158 |
|
---|
159 | <screen><userinput>./configure --prefix=/usr \
|
---|
160 | --disable-static \
|
---|
161 | --with-history \
|
---|
162 | --with-python=/usr/bin/python3 &&
|
---|
163 | make</userinput></screen>
|
---|
164 |
|
---|
165 | <para>If you downloaded the testsuite, issue the following command:</para>
|
---|
166 |
|
---|
167 | <screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
---|
168 |
|
---|
169 | <para>
|
---|
170 | To test the results, issue: <command>make check > check.log</command>.
|
---|
171 | A summary of the results can be obtained with <command>grep -E
|
---|
172 | '^Total|expected' check.log</command>. If <xref linkend="valgrind"/> is
|
---|
173 | installed and you want to check memory leaks, replace
|
---|
174 | <command>check</command> with <command>check-valgrind</command>.
|
---|
175 | </para>
|
---|
176 |
|
---|
177 | <note>
|
---|
178 | <para>
|
---|
179 | The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
---|
180 | to test parsing of external entities. If the machine where you run the
|
---|
181 | tests serves as a web site, the tests may hang, depending on the
|
---|
182 | content of the file served. It is therefore recommended to shut down
|
---|
183 | the server during the tests, as the <systemitem
|
---|
184 | class="username">root</systemitem> user:
|
---|
185 | </para>
|
---|
186 |
|
---|
187 | <screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
---|
188 | <screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
---|
189 |
|
---|
190 | </note>
|
---|
191 | <para>
|
---|
192 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
196 | </sect2>
|
---|
197 |
|
---|
198 | <sect2 role="commands">
|
---|
199 | <title>Command Explanations</title>
|
---|
200 |
|
---|
201 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
202 | href="../../xincludes/static-libraries.xml"/>
|
---|
203 | <!--
|
---|
204 | <para>
|
---|
205 | <parameter>sed -i '/_PyVerify_fd/,+1d' python/types.c</parameter>: This
|
---|
206 | fixes the <application>Python3</application> code to build with
|
---|
207 | <application>gcc-7</application>.
|
---|
208 | </para>
|
---|
209 | -->
|
---|
210 | <para>
|
---|
211 | <parameter>--with-history</parameter>: This switch enables
|
---|
212 | <application>Readline</application> support when running
|
---|
213 | <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
---|
214 | </para>
|
---|
215 |
|
---|
216 | <para>
|
---|
217 | <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
|
---|
218 | the libxml2 module with Python3 instead of Python2.
|
---|
219 | </para>
|
---|
220 |
|
---|
221 | <para>
|
---|
222 | <option>--with-icu</option>: Add this switch if you have built
|
---|
223 | <xref linkend="icu"/>, for better unicode support.
|
---|
224 | </para>
|
---|
225 |
|
---|
226 | <para>
|
---|
227 | <option>--with-threads</option>: Add this switch to enable multithread
|
---|
228 | support.
|
---|
229 | </para>
|
---|
230 |
|
---|
231 | </sect2>
|
---|
232 |
|
---|
233 | <sect2 role="content">
|
---|
234 | <title>Contents</title>
|
---|
235 |
|
---|
236 | <segmentedlist>
|
---|
237 | <segtitle>Installed Programs</segtitle>
|
---|
238 | <segtitle>Installed Libraries</segtitle>
|
---|
239 | <segtitle>Installed Directories</segtitle>
|
---|
240 |
|
---|
241 | <seglistitem>
|
---|
242 | <seg>
|
---|
243 | xml2-config,
|
---|
244 | xmlcatalog, and
|
---|
245 | xmllint <!--and the
|
---|
246 | drv_libxml2.py and libxml2.py <application>Python3</application>
|
---|
247 | modules. These are pythin modules, not programs -->
|
---|
248 | </seg>
|
---|
249 | <seg>
|
---|
250 | libxml2.so and
|
---|
251 | libxml2mod.so (<application>Python3</application> module)
|
---|
252 | </seg>
|
---|
253 | <seg>
|
---|
254 | /usr/include/libxml2,
|
---|
255 | /usr/lib/cmake/libxml2,
|
---|
256 | /usr/share/doc/libxml2-&libxml2-version;,
|
---|
257 | /usr/share/doc/libxml2-python-&libxml2-version;, and
|
---|
258 | /usr/share/gtk-doc/html/libxml2
|
---|
259 | </seg>
|
---|
260 | </seglistitem>
|
---|
261 | </segmentedlist>
|
---|
262 |
|
---|
263 | <variablelist>
|
---|
264 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
265 | <?dbfo list-presentation="list"?>
|
---|
266 | <?dbhtml list-presentation="table"?>
|
---|
267 |
|
---|
268 | <varlistentry id="xml2-config">
|
---|
269 | <term><command>xml2-config</command></term>
|
---|
270 | <listitem>
|
---|
271 | <para>
|
---|
272 | determines the compile and linker flags that should be used to
|
---|
273 | compile and link programs that use
|
---|
274 | <filename class='libraryfile'>libxml2</filename>.
|
---|
275 | </para>
|
---|
276 | <indexterm zone="libxml2 xml2-config">
|
---|
277 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
278 | </indexterm>
|
---|
279 | </listitem>
|
---|
280 | </varlistentry>
|
---|
281 |
|
---|
282 | <varlistentry id="xmlcatalog">
|
---|
283 | <term><command>xmlcatalog</command></term>
|
---|
284 | <listitem>
|
---|
285 | <para>
|
---|
286 | is used to monitor and manipulate XML and SGML catalogs.
|
---|
287 | </para>
|
---|
288 | <indexterm zone="libxml2 xmlcatalog">
|
---|
289 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
290 | </indexterm>
|
---|
291 | </listitem>
|
---|
292 | </varlistentry>
|
---|
293 |
|
---|
294 | <varlistentry id="xmllint">
|
---|
295 | <term><command>xmllint</command></term>
|
---|
296 | <listitem>
|
---|
297 | <para>
|
---|
298 | parses XML files and outputs reports (based upon options) to detect
|
---|
299 | errors in XML coding.
|
---|
300 | </para>
|
---|
301 | <indexterm zone="libxml2 xmllint">
|
---|
302 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
303 | </indexterm>
|
---|
304 | </listitem>
|
---|
305 | </varlistentry>
|
---|
306 | <!--
|
---|
307 | <varlistentry id="drv_libxml2.py3">
|
---|
308 | <term><command>drv_libxml2.py</command></term>
|
---|
309 | <listitem>
|
---|
310 | <para>
|
---|
311 | is a SAX <application>Python3</application> driver for libxml2.
|
---|
312 | </para>
|
---|
313 | <indexterm zone="libxml2 drv_libxml2.py3">
|
---|
314 | <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
|
---|
315 | </indexterm>
|
---|
316 | </listitem>
|
---|
317 | </varlistentry>
|
---|
318 |
|
---|
319 | <varlistentry id="libxml2.py3">
|
---|
320 | <term><command>libxml2.py</command></term>
|
---|
321 | <listitem>
|
---|
322 | <para>
|
---|
323 | is the <application>Python3</application> binding for libxml2.
|
---|
324 | </para>
|
---|
325 | <indexterm zone="libxml2 libxml2.py3">
|
---|
326 | <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
|
---|
327 | </indexterm>
|
---|
328 | </listitem>
|
---|
329 | </varlistentry>
|
---|
330 | -->
|
---|
331 | <varlistentry id="libxml2-lib">
|
---|
332 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
333 | <listitem>
|
---|
334 | <para>
|
---|
335 | provides functions for programs to parse files that use the XML
|
---|
336 | format.
|
---|
337 | </para>
|
---|
338 | <indexterm zone="libxml2 libxml2-lib">
|
---|
339 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
340 | </indexterm>
|
---|
341 | </listitem>
|
---|
342 | </varlistentry>
|
---|
343 |
|
---|
344 | <varlistentry id="libxml2mod3">
|
---|
345 | <term><filename class="libraryfile">libxml2mod.so</filename></term>
|
---|
346 | <listitem>
|
---|
347 | <para>
|
---|
348 | is the interface for <application>Python3</application>
|
---|
349 | to use <filename class="libraryfile">libxml2.so</filename>.
|
---|
350 | </para>
|
---|
351 | <indexterm zone="libxml2 libxml2mod3">
|
---|
352 | <primary sortas="c-libxml2mod">libxml2mod.so</primary>
|
---|
353 | </indexterm>
|
---|
354 | </listitem>
|
---|
355 | </varlistentry>
|
---|
356 |
|
---|
357 | </variablelist>
|
---|
358 |
|
---|
359 | </sect2>
|
---|
360 |
|
---|
361 | </sect1>
|
---|