source: general/genlib/libxml2.xml@ 0b312a7

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 0b312a7 was 0b312a7, checked in by Pierre Labastie <pieere@…>, 3 years ago

Remove reference to python2 in libxml2 (except in a note), and do some cleaning

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24343 af4574ff-66df-0310-9fd7-8a98e5e911e0

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