source: general/genlib/libxml2.xml@ f6061807

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since f6061807 was f6061807, checked in by Xi Ruoyao <xry111@…>, 11 months ago

libxml2: Note how to remove unneeded references to ICU libraries for --with-icu

Or too many packages can link to ICU libraries w/o any real necessity
and cause upgrading ICU very nasty.

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