source: general/genlib/libxml2.xml@ fb79d0a

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since fb79d0a was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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