source: general/genlib/libxml2.xml@ c78420c

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 xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since c78420c was c78420c, checked in by Bruce Dubbs <bdubbs@…>, 20 months ago

Make libxml2 build with python3

  • Property mode set to 100644
File size: 10.1 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 "54fdcf2404eb5c1ca59ffc82b2edff78">
12 <!ENTITY libxml2-size "2.6 MB">
13 <!ENTITY libxml2-buildsize "96 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 <sect1info>
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 &lfs111_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 Optional Testsuite:
80 <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
81 enables <command>make check</command> to do complete testing.
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
87<!-- do not advertize python2 here, except in the note below
88 <bridgehead renderas="sect4">Optional</bridgehead>
89 <para role="optional">
90 <xref linkend="python2"/>
91 </para>
92-->
93 <bridgehead renderas="sect4">Optional</bridgehead>
94 <para role="optional">
95 <xref linkend="icu"/> (see below) and
96 <xref linkend="valgrind"/> (may be used in the tests)
97 </para>
98
99 <note>
100 <para>
101 The old <application>Python2</application> module can be built after
102 <filename class="libraryfile">libxml2.so</filename> has been installed,
103 see <xref linkend="libxml2py2"/>.
104 </para>
105 </note>
106
107 <para condition="html" role="usernotes">
108 User Notes: <ulink url="&blfs-wiki;/libxml2"/>
109 </para>
110 </sect2>
111
112 <sect2 role="installation">
113 <title>Installation of libxml2</title>
114
115 <para>
116 First, fix a problem recognizing Python-3.10:
117 </para>
118
119<screen><userinput>autoreconf -fiv</userinput></screen>
120
121 <para>
122 Install <application>libxml2</application> by running the following
123 commands:
124 </para>
125
126<screen><userinput>./configure --prefix=/usr \
127 --disable-static \
128 --with-history \
129 PYTHON=/usr/bin/python3 \
130 --docdir=/usr/share/doc/libxml2-&libxml2-version; &amp;&amp;
131make</userinput></screen>
132
133 <para>
134 If you downloaded the testsuite, issue the following command:
135 </para>
136
137<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
138
139 <para>
140 To test the results, issue: <command>make check &gt; check.log</command>.
141 A summary of the results can be obtained with <command>grep -E
142 '^Total|expected' 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 </sect2>
168
169 <sect2 role="commands">
170 <title>Command Explanations</title>
171
172 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
173 href="../../xincludes/static-libraries.xml"/>
174
175 <para>
176 <parameter>--with-history</parameter>: This switch enables
177 <application>Readline</application> support when running
178 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
179 </para>
180
181 <para>
182 <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
183 the libxml2 module with Python3 instead of Python2.
184 </para>
185
186 <para>
187 <option>--with-icu</option>: Add this switch if you have built
188 <xref linkend="icu"/>, for better unicode support.
189 </para>
190
191 </sect2>
192
193 <sect2 role="content">
194 <title>Contents</title>
195
196 <segmentedlist>
197 <segtitle>Installed Programs</segtitle>
198 <segtitle>Installed Libraries</segtitle>
199 <segtitle>Installed Directories</segtitle>
200
201 <seglistitem>
202 <seg>
203 xml2-config,
204 xmlcatalog, and
205 xmllint <!--and the
206 drv_libxml2.py and libxml2.py <application>Python3</application>
207 modules. These are pythin modules, not programs -->
208 </seg>
209 <seg>
210 libxml2.so and
211 libxml2mod.so (<application>Python3</application> module)
212 </seg>
213 <seg>
214 /usr/include/libxml2,
215 /usr/lib/cmake/libxml2,
216 /usr/share/doc/libxml2-&libxml2-version;,
217 /usr/share/doc/libxml2-python-&libxml2-version;, and
218 /usr/share/gtk-doc/html/libxml2
219 </seg>
220 </seglistitem>
221 </segmentedlist>
222
223 <variablelist>
224 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
225 <?dbfo list-presentation="list"?>
226 <?dbhtml list-presentation="table"?>
227
228 <varlistentry id="xml2-config">
229 <term><command>xml2-config</command></term>
230 <listitem>
231 <para>
232 determines the compile and linker flags that should be used to
233 compile and link programs that use
234 <filename class="libraryfile">libxml2</filename>
235 </para>
236 <indexterm zone="libxml2 xml2-config">
237 <primary sortas="b-xml2-config">xml2-config</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry id="xmlcatalog">
243 <term><command>xmlcatalog</command></term>
244 <listitem>
245 <para>
246 is used to monitor and manipulate XML and SGML catalogs
247 </para>
248 <indexterm zone="libxml2 xmlcatalog">
249 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="xmllint">
255 <term><command>xmllint</command></term>
256 <listitem>
257 <para>
258 parses XML files and outputs reports (based upon options) to detect
259 errors in XML coding
260 </para>
261 <indexterm zone="libxml2 xmllint">
262 <primary sortas="b-xmllint">xmllint</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266<!--
267 <varlistentry id="drv_libxml2.py3">
268 <term><command>drv_libxml2.py</command></term>
269 <listitem>
270 <para>
271 is a SAX <application>Python3</application> driver for libxml2.
272 </para>
273 <indexterm zone="libxml2 drv_libxml2.py3">
274 <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="libxml2.py3">
280 <term><command>libxml2.py</command></term>
281 <listitem>
282 <para>
283 is the <application>Python3</application> binding for libxml2.
284 </para>
285 <indexterm zone="libxml2 libxml2.py3">
286 <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290-->
291 <varlistentry id="libxml2-lib">
292 <term><filename class="libraryfile">libxml2.so</filename></term>
293 <listitem>
294 <para>
295 provides functions for programs to parse files that use the XML
296 format
297 </para>
298 <indexterm zone="libxml2 libxml2-lib">
299 <primary sortas="c-libxml2">libxml2.so</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
304 <varlistentry id="libxml2mod3">
305 <term><filename class="libraryfile">libxml2mod.so</filename></term>
306 <listitem>
307 <para>
308 is the interface for <application>Python3</application>
309 to use <filename class="libraryfile">libxml2.so</filename>
310 </para>
311 <indexterm zone="libxml2 libxml2mod3">
312 <primary sortas="c-libxml2mod">libxml2mod.so</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 </variablelist>
318
319 </sect2>
320
321</sect1>
Note: See TracBrowser for help on using the repository browser.