source: general/genlib/libxml2.xml@ 3175b9e

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since 3175b9e was 3175b9e, checked in by Xi Ruoyao <xry111@…>, 3 months ago

libxml2: Fix two breakages (#19955)

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