source: general/genlib/libxml2.xml@ bfbc72a

10.1 11.0 ken/refactor-virt lazarus qt5new trunk upgradedb xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since bfbc72a was bfbc72a, checked in by Douglas R. Reno <renodr@…>, 10 months ago

Tags
GDB: Mention the TUI test suite failing

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24240 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 12.0 KB
Line 
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 &lfs101_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 Required patch:
80 <ulink url="&patch-root;/libxml2-&libxml2-version;-security_fixes-1.patch"/>
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Optional Testsuite:
86 <ulink url="http://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
87 enables <command>make check</command> to do complete testing.
88 </para>
89 </listitem>
90 </itemizedlist>
91
92 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
93
94 <bridgehead renderas="sect4">Optional</bridgehead>
95 <para role="optional">
96 <xref linkend="python2"/> <!--or <xref linkend="python3"/> (to build and
97 install a <application>Python</application> library module, additionally
98 it is required to run the full suite of tests)-->
99 <!-- As discovered by Bruce, itstool needs this module. -->
100 </para>
101
102 <note>
103 <para>
104 Some packages which utilize <application>libxml2</application> (such as
105 <application>GNOME Doc Utils</application>) need the
106 <application>Python3</application> module installed to function properly
107 and some packages will not build properly if the
108 <application>Python3</application> module is not available.
109 </para>
110
111 <para>
112 The old <application>Python2</application> module can be built after
113 <filename class="libraryfile">libxml2.so</filename> has been installed,
114 see <xref linkend="libxml2py2"/>.
115 </para>
116 </note>
117
118 <bridgehead renderas="sect4">Optional</bridgehead>
119 <para role="optional">
120 <xref linkend="icu"/> (see below) and
121 <xref linkend="valgrind"/> (may be used in the tests)
122 </para>
123
124 <para condition="html" role="usernotes">
125 User Notes: <ulink url="&blfs-wiki;/libxml2"/>
126 </para>
127 </sect2>
128
129 <sect2 role="installation">
130 <title>Installation of libxml2</title>
131
132 <para>
133 Apply a patch to fix various errors:
134 </para>
135
136<screen><userinput remap="pre">patch -p1 -i ../libxml2-&libxml2-version;-security_fixes-1.patch</userinput></screen>
137
138 <para>
139 First fix a problem generating the Python3 module with Python-3.9.0 and later:
140 </para>
141
142<screen><userinput>sed -i '/if Py/{s/Py/(Py/;s/)/))/}' python/{types.c,libxml.c}</userinput></screen>
143
144<!--<para>
145 To ensure that the <application>Python</application> module can be
146 built by <xref linkend="python3"/>, run:
147 </para>
148
149<screen><userinput>sed -i '/_PyVerify_fd/,+1d' python/types.c</userinput></screen>-->
150
151 <para>
152 If you are going to run the tests, disable one test that causes the Python
153 tests to terminate early with an error:
154 </para>
155
156<screen><userinput>sed -i 's/test.test/#&amp;/' python/tests/tstLastError.py</userinput></screen>
157
158 <para>
159 If, and only if, you are using <xref linkend="icu"/>, fix a
160 build breakage caused by that version by running the following command:
161 </para>
162
163<screen><userinput>sed -i 's/ TRUE/ true/' encoding.c</userinput></screen>
164
165 <para>
166 Install <application>libxml2</application> by running the following
167 commands:
168 </para>
169
170<screen><userinput>./configure --prefix=/usr \
171 --disable-static \
172 --with-history \
173 --with-python=/usr/bin/python3 &amp;&amp;
174make</userinput></screen>
175
176 <para>
177 If you downloaded the testsuite, issue the following command:
178 </para>
179
180<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
181
182 <para>
183 To test the results, issue: <command>make check &gt; check.log</command>.
184 A summary of the results can be obtained with <command>grep -E
185 '^Total|expected' check.log</command>. If <xref linkend="valgrind"/> is
186 installed and you want to check memory leaks, replace
187 <command>check</command> with <command>check-valgrind</command>.
188 </para>
189
190 <note>
191 <para>
192 The tests use <ulink url="http://localhost/">http://localhost/</ulink>
193 to test parsing of external entities. If the machine where you run the
194 tests serves as a web site, the tests may hang, depending on the
195 content of the file served. It is therefore recommended to shut down
196 the server during the tests, as the <systemitem
197 class="username">root</systemitem> user:
198 </para>
199
200<screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
201<screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
202
203 </note>
204 <para>
205 Now, as the <systemitem class="username">root</systemitem> user:
206 </para>
207
208<screen role="root"><userinput>make install</userinput></screen>
209 </sect2>
210
211 <sect2 role="commands">
212 <title>Command Explanations</title>
213
214 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
215 href="../../xincludes/static-libraries.xml"/>
216<!--
217 <para>
218 <parameter>sed -i '/_PyVerify_fd/,+1d' python/types.c</parameter>: This
219 fixes the <application>Python3</application> code to build with
220 <application>gcc-7</application>.
221 </para>
222-->
223 <para>
224 <parameter>--with-history</parameter>: This switch enables
225 <application>Readline</application> support when running
226 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
227 </para>
228
229 <para>
230 <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
231 the libxml2 module with Python3 instead of Python2.
232 </para>
233
234 <para>
235 <option>--with-icu</option>: Add this switch if you have built
236 <xref linkend="icu"/>, for better unicode support.
237 </para>
238
239 <para>
240 <option>--with-threads</option>: Add this switch to enable multithread
241 support.
242 </para>
243
244 </sect2>
245
246 <sect2 role="content">
247 <title>Contents</title>
248
249 <segmentedlist>
250 <segtitle>Installed Programs</segtitle>
251 <segtitle>Installed Libraries</segtitle>
252 <segtitle>Installed Directories</segtitle>
253
254 <seglistitem>
255 <seg>
256 xml2-config,
257 xmlcatalog, and
258 xmllint <!--and the
259 drv_libxml2.py and libxml2.py <application>Python3</application>
260 modules. These are pythin modules, not programs -->
261 </seg>
262 <seg>
263 libxml2.so and
264 libxml2mod.so (<application>Python3</application> module)
265 </seg>
266 <seg>
267 /usr/include/libxml2,
268 /usr/lib/cmake/libxml2,
269 /usr/share/doc/libxml2-&libxml2-version;,
270 /usr/share/doc/libxml2-python-&libxml2-version;, and
271 /usr/share/gtk-doc/html/libxml2
272 </seg>
273 </seglistitem>
274 </segmentedlist>
275
276 <variablelist>
277 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
278 <?dbfo list-presentation="list"?>
279 <?dbhtml list-presentation="table"?>
280
281 <varlistentry id="xml2-config">
282 <term><command>xml2-config</command></term>
283 <listitem>
284 <para>
285 determines the compile and linker flags that should be used to
286 compile and link programs that use
287 <filename class="libraryfile">libxml2</filename>
288 </para>
289 <indexterm zone="libxml2 xml2-config">
290 <primary sortas="b-xml2-config">xml2-config</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="xmlcatalog">
296 <term><command>xmlcatalog</command></term>
297 <listitem>
298 <para>
299 is used to monitor and manipulate XML and SGML catalogs
300 </para>
301 <indexterm zone="libxml2 xmlcatalog">
302 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="xmllint">
308 <term><command>xmllint</command></term>
309 <listitem>
310 <para>
311 parses XML files and outputs reports (based upon options) to detect
312 errors in XML coding
313 </para>
314 <indexterm zone="libxml2 xmllint">
315 <primary sortas="b-xmllint">xmllint</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319<!--
320 <varlistentry id="drv_libxml2.py3">
321 <term><command>drv_libxml2.py</command></term>
322 <listitem>
323 <para>
324 is a SAX <application>Python3</application> driver for libxml2.
325 </para>
326 <indexterm zone="libxml2 drv_libxml2.py3">
327 <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="libxml2.py3">
333 <term><command>libxml2.py</command></term>
334 <listitem>
335 <para>
336 is the <application>Python3</application> binding for libxml2.
337 </para>
338 <indexterm zone="libxml2 libxml2.py3">
339 <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343-->
344 <varlistentry id="libxml2-lib">
345 <term><filename class="libraryfile">libxml2.so</filename></term>
346 <listitem>
347 <para>
348 provides functions for programs to parse files that use the XML
349 format
350 </para>
351 <indexterm zone="libxml2 libxml2-lib">
352 <primary sortas="c-libxml2">libxml2.so</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
357 <varlistentry id="libxml2mod3">
358 <term><filename class="libraryfile">libxml2mod.so</filename></term>
359 <listitem>
360 <para>
361 is the interface for <application>Python3</application>
362 to use <filename class="libraryfile">libxml2.so</filename>
363 </para>
364 <indexterm zone="libxml2 libxml2mod3">
365 <primary sortas="c-libxml2mod">libxml2mod.so</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 </variablelist>
371
372 </sect2>
373
374</sect1>
Note: See TracBrowser for help on using the repository browser.