source: general/genlib/libxml2.xml@ f04d065f

12.2 lazarus trunk xry111/for-12.3
Last change on this file since f04d065f was d0c749c, checked in by Xi Ruoyao <xry111@…>, 5 weeks ago

libxml2: Patch to fix bogus xmlcatalog warning

  • Property mode set to 100644
File size: 9.9 KB
Line 
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 "aeb92dc58cea91c95a10751327193a11">
12 <!ENTITY libxml2-size "2.5 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 <listitem>
75 <para>
76 Required patch:
77 <ulink url="&patch-root;/libxml2-&libxml2-version;-upstream_fix-1.patch"/>
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Optional Test Suite:
83 <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
84 enables <command>make check</command> to do complete testing.
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Recommended</bridgehead>
92 <para role="recommended">
93 <xref linkend="icu"/>
94 </para>
95
96 <bridgehead renderas="sect4">Optional</bridgehead>
97 <para role="optional">
98 <xref linkend="valgrind"/> (may be used in the tests)
99 </para>
100 </sect2>
101
102 <sect2 role="installation">
103 <title>Installation of libxml2</title>
104
105 <para>
106 At first, fix an issue causing <command>xmlcatalog</command> to emit
107 bogus warnings when a new catalog file is created. The patch will
108 modify the building system, so regenerate the building scripts after
109 applying the patch:
110 </para>
111
112 <screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-upstream_fix-1.patch &amp;&amp;
113autoreconf</userinput></screen>
114
115 <para>
116 Install <application>libxml2</application> by running the following
117 commands:
118 </para>
119
120<screen><userinput>./configure --prefix=/usr \
121 --sysconfdir=/etc \
122 --disable-static \
123 --with-history \
124 --with-icu \
125 PYTHON=/usr/bin/python3 \
126 --docdir=/usr/share/doc/libxml2-&libxml2-version; &amp;&amp;
127make</userinput></screen>
128
129 <para>
130 If you downloaded the test suite, issue the following command:
131 </para>
132
133<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
134
135 <para>
136 To test the results, issue: <command>make check &gt; check.log</command>.
137 This command will print several lines of error messages like
138 <quote><computeroutput>Failed to parse
139 xstc/...</computeroutput></quote> because some test files are missing
140 and these messages can be safely ignored.
141 A summary of the results can be obtained with <command>grep -E
142 '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
143 installed and you want to check for memory leaks, replace
144 <command>check</command> with <command>check-valgrind</command>.
145 </para>
146
147 <note>
148 <para>
149 The tests use <ulink url="http://localhost/">http://localhost/</ulink>
150 to test parsing of external entities. If the machine where you run the
151 tests serves as a web site, the tests may hang, depending on the
152 content of the file served. It is therefore recommended to shut down
153 the server during the tests, as the <systemitem
154 class="username">root</systemitem> user:
155 </para>
156
157<screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
158<screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
159
160 </note>
161
162 <para>
163 Now, as the <systemitem class="username">root</systemitem> user:
164 </para>
165
166<screen role="root"><userinput>make install</userinput></screen>
167
168 <para>
169 Finally, prevent some packages from unnecessarily linking to ICU using
170 the following commands as the &root; user:
171 </para>
172
173<screen role="root"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
174sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
175
176 </sect2>
177
178 <sect2 role="commands">
179 <title>Command Explanations</title>
180
181 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
182 href="../../xincludes/static-libraries.xml"/>
183
184 <para>
185 <parameter>--with-history</parameter>: This switch enables
186 <application>Readline</application> support when running
187 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
188 </para>
189
190 <para>
191 <parameter>--with-icu</parameter>: This switch enables support for
192 <application>ICU</application>, which provides additional Unicode support.
193 This is needed for some packages in BLFS, such as for QtWebEngine.
194 </para>
195
196 <para>
197 <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
198 the libxml2 module with Python3 instead of Python2.
199 </para>
200
201<!--
202 <para>
203 <option>- -with-icu</option>: Add this switch if you have built
204 <xref linkend="icu"/>, for better unicode support.
205 </para>
206
207 <note>
208 <para>
209 If the <option>- -with-icu</option> switch is used, the BLFS editors
210 recommend removing unneeded references to the ICU libraries. This
211 will prevent many packages that use libxml2 from unnecessarily linking
212 to the ICU libraries. This, in turn, will prevent the need for
213 rebuilding many packages when upgrading ICU to a new major version.
214 After installing libxml2, as the &root; user, issue:
215 </para>
216
217<screen role="nodump"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
218sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
219 </note>
220-->
221
222 </sect2>
223
224 <sect2 role="content">
225 <title>Contents</title>
226
227 <segmentedlist>
228 <segtitle>Installed Programs</segtitle>
229 <segtitle>Installed Libraries</segtitle>
230 <segtitle>Installed Directories</segtitle>
231
232 <seglistitem>
233 <seg>
234 xml2-config,
235 xmlcatalog, and
236 xmllint
237 </seg>
238 <seg>
239 libxml2.so
240 </seg>
241 <seg>
242 /usr/include/libxml2,
243 /usr/lib/cmake/libxml2,
244 /usr/share/doc/libxml2-&libxml2-version;, and
245 /usr/share/gtk-doc/html/libxml2
246 </seg>
247 </seglistitem>
248 </segmentedlist>
249
250 <variablelist>
251 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
252 <?dbfo list-presentation="list"?>
253 <?dbhtml list-presentation="table"?>
254
255 <varlistentry id="xml2-config">
256 <term><command>xml2-config</command></term>
257 <listitem>
258 <para>
259 determines the compile and linker flags that should be used to
260 compile and link programs that use
261 <filename class="libraryfile">libxml2</filename>
262 </para>
263 <indexterm zone="libxml2 xml2-config">
264 <primary sortas="b-xml2-config">xml2-config</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="xmlcatalog">
270 <term><command>xmlcatalog</command></term>
271 <listitem>
272 <para>
273 is used to monitor and manipulate XML and SGML catalogs
274 </para>
275 <indexterm zone="libxml2 xmlcatalog">
276 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="xmllint">
282 <term><command>xmllint</command></term>
283 <listitem>
284 <para>
285 parses XML files and outputs reports (based upon options) to detect
286 errors in XML coding
287 </para>
288 <indexterm zone="libxml2 xmllint">
289 <primary sortas="b-xmllint">xmllint</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="libxml2-lib">
295 <term><filename class="libraryfile">libxml2.so</filename></term>
296 <listitem>
297 <para>
298 provides functions for programs to parse files that use the XML
299 format
300 </para>
301 <indexterm zone="libxml2 libxml2-lib">
302 <primary sortas="c-libxml2">libxml2.so</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 </variablelist>
308
309 </sect2>
310
311</sect1>
Note: See TracBrowser for help on using the repository browser.