2004-06-13 06:56:28 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-06-13 06:56:28 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2017-11-23 11:21:36 +08:00
|
|
|
<!-- Also updatethe download, md5, size entities in libxml2py2.xml -->
|
2012-09-19 19:47:53 +08:00
|
|
|
<!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.gz">
|
|
|
|
<!ENTITY libxml2-download-ftp "ftp://xmlsoft.org/libxml2/libxml2-&libxml2-version;.tar.gz">
|
2018-03-16 06:44:22 +08:00
|
|
|
<!ENTITY libxml2-md5sum "b786e353e2aa1b872d70d5d1ca0c740d">
|
2017-09-09 14:33:37 +08:00
|
|
|
<!ENTITY libxml2-size "5.2 MB">
|
2018-03-16 06:44:22 +08:00
|
|
|
<!ENTITY libxml2-buildsize "83 MB (add 15 MB for tests)">
|
|
|
|
<!ENTITY libxml2-time "0.2 SBU (add 0.3 SBU for tests)">
|
2013-09-27 07:09:08 +08:00
|
|
|
<!ENTITY testsuite-version "20130923">
|
2004-06-13 06:56:28 +08:00
|
|
|
]>
|
|
|
|
|
2002-07-08 04:28:42 +08:00
|
|
|
<sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
|
2005-05-01 21:30:51 +08:00
|
|
|
<?dbhtml filename="libxml2.html"?>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-10-06 01:33:06 +08:00
|
|
|
<title>libxml2-&libxml2-version;</title>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<indexterm zone="libxml2">
|
2012-09-19 19:47:53 +08:00
|
|
|
<primary sortas="a-libxml2">libxml2</primary>
|
2005-05-01 21:30:51 +08:00
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
2005-10-06 01:33:06 +08:00
|
|
|
<title>Introduction to libxml2</title>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
2012-09-19 19:47:53 +08:00
|
|
|
The <application>libxml2</application> package contains libraries
|
|
|
|
and utilities used for parsing XML files.
|
2012-05-30 23:39:58 +08:00
|
|
|
</para>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2018-02-18 07:35:13 +08:00
|
|
|
&lfs82_checked;
|
2009-08-05 20:01:54 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&libxml2-download-http;"/>
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&libxml2-download-ftp;"/>
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &libxml2-md5sum;
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Download size: &libxml2-size;
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &libxml2-buildsize;
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &libxml2-time;
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2010-11-05 08:02:08 +08:00
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
2012-09-19 19:47:53 +08:00
|
|
|
<itemizedlist spacing="compact">
|
2008-12-24 07:58:13 +08:00
|
|
|
<listitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
Optional Testsuite:
|
2013-09-27 07:09:08 +08:00
|
|
|
<ulink url="http://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
2012-05-30 23:39:58 +08:00
|
|
|
enables <command>make check</command> to do complete testing.
|
|
|
|
</para>
|
2008-12-24 07:58:13 +08:00
|
|
|
</listitem>
|
2017-11-24 17:15:03 +08:00
|
|
|
|
2016-05-15 12:19:39 +08:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-11-24 17:15:03 +08:00
|
|
|
Recommended patch to prevent a segfault in itstool when using Python3:
|
|
|
|
<ulink url="&patch-root;/libxml2-&libxml2-version;-python3_hack-1.patch"/>
|
2016-05-15 12:19:39 +08:00
|
|
|
</para>
|
2017-11-24 17:15:03 +08:00
|
|
|
</listitem>
|
2010-11-05 08:02:08 +08:00
|
|
|
</itemizedlist>
|
2008-12-24 07:58:13 +08:00
|
|
|
|
2005-10-06 01:33:06 +08:00
|
|
|
<bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2017-10-16 02:23:25 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<xref linkend="python2"/> <!--or <xref linkend="python3"/> (to build and
|
2017-07-19 21:27:02 +08:00
|
|
|
install a <application>Python</application> library module, additionally
|
2017-10-16 02:23:25 +08:00
|
|
|
it is required to run the full suite of tests)-->
|
2017-05-24 01:44:27 +08:00
|
|
|
<!-- As discovered by Bruce, itstool needs this module. -->
|
2012-05-30 23:39:58 +08:00
|
|
|
</para>
|
2006-12-07 03:04:07 +08:00
|
|
|
|
2005-11-26 21:57:43 +08:00
|
|
|
<note>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
Some packages which utilize <application>libxml2</application> (such as
|
|
|
|
<application>GNOME Doc Utils</application>) need the
|
2017-11-23 11:21:36 +08:00
|
|
|
<application>Python3</application> module installed to function properly
|
2014-08-19 18:08:04 +08:00
|
|
|
and some packages will not build properly if the
|
2017-11-23 11:21:36 +08:00
|
|
|
<application>Python3</application> module is not available.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The old <application>Python2</application> module can be built after
|
|
|
|
<filename class="libraryfile">libxml2.so</filename> has been installed,
|
|
|
|
see <xref linkend="libxml2py2"/>.
|
2012-05-30 23:39:58 +08:00
|
|
|
</para>
|
2005-11-26 21:57:43 +08:00
|
|
|
</note>
|
|
|
|
|
2017-07-10 15:13:16 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
2015-11-22 21:33:16 +08:00
|
|
|
<para role="optional">
|
2017-07-10 15:59:31 +08:00
|
|
|
<xref linkend="icu"/> and
|
2015-11-22 21:33:16 +08:00
|
|
|
<xref linkend="valgrind"/> (may be used in the tests)
|
|
|
|
</para>
|
|
|
|
|
2012-05-30 23:39:58 +08:00
|
|
|
<para condition="html" role="usernotes">
|
|
|
|
User Notes: <ulink url="&blfs-wiki;/libxml2"/>
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
</sect2>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<sect2 role="installation">
|
2005-10-06 01:33:06 +08:00
|
|
|
<title>Installation of libxml2</title>
|
2005-05-01 21:30:51 +08:00
|
|
|
|
2017-11-24 17:15:03 +08:00
|
|
|
<para>
|
|
|
|
First apply a patch, which prevents segfaults in the Python module, when
|
|
|
|
built by <xref linkend="python3"/>:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-python3_hack-1.patch</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To ensure that the <application>Python</application> module can be
|
2017-11-23 11:21:36 +08:00
|
|
|
built by <xref linkend="python3"/>, run:
|
2017-07-19 21:27:02 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>sed -i '/_PyVerify_fd/,+1d' python/types.c</userinput></screen>
|
2017-10-18 04:06:47 +08:00
|
|
|
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
Install <application>libxml2</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
|
2017-10-16 06:19:33 +08:00
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
2017-10-16 02:23:25 +08:00
|
|
|
--disable-static \
|
|
|
|
--with-history \
|
|
|
|
--with-python=/usr/bin/python3 &&
|
2005-05-01 21:30:51 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2014-10-17 22:04:16 +08:00
|
|
|
<para>If you downloaded the testsuite, issue the following command:</para>
|
|
|
|
|
|
|
|
<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
|
|
|
|
2012-09-19 19:47:53 +08:00
|
|
|
<para>
|
2015-11-24 02:07:30 +08:00
|
|
|
To test the results, issue: <command>make check > check.log</command>.
|
|
|
|
A summary of the results can be obtained with <command>grep -E
|
|
|
|
'^Total|expected' check.log</command>. If <xref linkend="valgrind"/> is
|
|
|
|
installed and you want to check memory leaks, replace
|
|
|
|
<command>check</command> with <command>check-valgrind</command>.
|
2012-09-19 19:47:53 +08:00
|
|
|
</para>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2017-09-09 14:33:37 +08:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
|
|
|
to test parsing of external entities. If the machine where you run the
|
|
|
|
tests serves as a web site, the tests may hang, depending on the
|
|
|
|
content of the file served. It is therefore recommended to shut down
|
|
|
|
the server during the tests, as the <systemitem
|
|
|
|
class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
|
|
|
<screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
|
|
|
|
|
|
|
</note>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
</sect2>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2012-05-30 23:39:58 +08:00
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
href="../../xincludes/static-libraries.xml"/>
|
2008-12-24 07:58:13 +08:00
|
|
|
|
2017-11-23 11:21:36 +08:00
|
|
|
<para>
|
|
|
|
<parameter>sed -i '/_PyVerify_fd/,+1d' python/types.c</parameter>: This
|
|
|
|
fixes the <application>Python3</application> code to build with
|
|
|
|
<application>gcc-7</application>.
|
|
|
|
</para>
|
|
|
|
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
2015-01-18 22:57:10 +08:00
|
|
|
<parameter>--with-history</parameter>: This switch enables
|
2012-05-30 23:39:58 +08:00
|
|
|
<application>Readline</application> support when running
|
|
|
|
<command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
|
|
|
</para>
|
2012-09-19 19:47:53 +08:00
|
|
|
|
2015-01-18 22:57:10 +08:00
|
|
|
<para>
|
2017-11-09 18:48:19 +08:00
|
|
|
<parameter>--with-python=/usr/bin/python3</parameter>: Allows to build
|
|
|
|
the libxml2 module with Python3 instead of Python2.
|
2015-01-18 22:57:10 +08:00
|
|
|
</para>
|
|
|
|
|
2017-07-19 21:27:02 +08:00
|
|
|
<para>
|
|
|
|
<option>--with-icu</option>: Add this switch if you have built
|
|
|
|
<xref linkend="icu"/>, for better unicode support.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<option>--with-threads</option>: Add this switch to enable multithread
|
|
|
|
support.
|
|
|
|
</para>
|
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
</sect2>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<seglistitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<seg>
|
2017-11-23 11:21:36 +08:00
|
|
|
xml2-config, xmlcatalog, xmllint and the
|
|
|
|
drv_libxml2.py and libxml2.py <application>Python3</application>
|
|
|
|
modules.
|
2012-05-30 23:39:58 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
libxml2.so and optionally, the libxml2mod.so
|
2017-11-23 11:21:36 +08:00
|
|
|
<application>Python3</application> module
|
2012-05-30 23:39:58 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
/usr/include/libxml2,
|
2015-11-22 21:33:16 +08:00
|
|
|
/usr/lib/cmake/libxml2,
|
2012-05-30 23:39:58 +08:00
|
|
|
/usr/share/doc/libxml2-&libxml2-version;,
|
2015-11-22 21:33:16 +08:00
|
|
|
/usr/share/doc/libxml2-python-&libxml2-version;, and
|
2012-05-30 23:39:58 +08:00
|
|
|
/usr/share/gtk-doc/html/libxml2
|
|
|
|
</seg>
|
2005-05-01 21:30:51 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<varlistentry id="xml2-config">
|
|
|
|
<term><command>xml2-config</command></term>
|
|
|
|
<listitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
determines the compile and linker flags that should be used to
|
|
|
|
compile and link programs that use
|
|
|
|
<filename class='libraryfile'>libxml2</filename>.
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
<indexterm zone="libxml2 xml2-config">
|
|
|
|
<primary sortas="b-xml2-config">xml2-config</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<varlistentry id="xmlcatalog">
|
|
|
|
<term><command>xmlcatalog</command></term>
|
|
|
|
<listitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
is used to monitor and manipulate XML and SGML catalogs.
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
<indexterm zone="libxml2 xmlcatalog">
|
|
|
|
<primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<varlistentry id="xmllint">
|
|
|
|
<term><command>xmllint</command></term>
|
|
|
|
<listitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
parses XML files and outputs reports (based upon options) to detect
|
|
|
|
errors in XML coding.
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
<indexterm zone="libxml2 xmllint">
|
|
|
|
<primary sortas="b-xmllint">xmllint</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:32:59 +08:00
|
|
|
|
2017-11-23 11:21:36 +08:00
|
|
|
<varlistentry id="drv_libxml2.py3">
|
|
|
|
<term><command>drv_libxml2.py</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is a SAX <application>Python3</application> driver for libxml2.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="libxml2 drv_libxml2.py3">
|
2018-03-11 23:26:15 +08:00
|
|
|
<primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
|
2017-11-23 11:21:36 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="libxml2.py3">
|
|
|
|
<term><command>libxml2.py</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is the <application>Python3</application> binding for libxml2.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="libxml2 libxml2.py3">
|
2018-03-11 23:26:15 +08:00
|
|
|
<primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
|
2017-11-23 11:21:36 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
<varlistentry id="libxml2-lib">
|
2012-09-19 19:47:53 +08:00
|
|
|
<term><filename class="libraryfile">libxml2.so</filename></term>
|
2005-05-01 21:30:51 +08:00
|
|
|
<listitem>
|
2012-05-30 23:39:58 +08:00
|
|
|
<para>
|
|
|
|
provides functions for programs to parse files that use the XML
|
|
|
|
format.
|
|
|
|
</para>
|
2005-05-01 21:30:51 +08:00
|
|
|
<indexterm zone="libxml2 libxml2-lib">
|
2012-05-30 23:39:58 +08:00
|
|
|
<primary sortas="c-libxml2">libxml2.so</primary>
|
2005-05-01 21:30:51 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-09-19 19:47:53 +08:00
|
|
|
|
2017-11-23 11:21:36 +08:00
|
|
|
<varlistentry id="libxml2mod3">
|
|
|
|
<term><filename class="libraryfile">libxml2mod.so</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is the interface for <application>Python3</application>
|
|
|
|
to use <filename class="libraryfile">libxml2.so</filename>.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="libxml2 libxml2mod3">
|
|
|
|
<primary sortas="c-libxml2mod">libxml2mod.so</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
</variablelist>
|
2012-09-19 19:47:53 +08:00
|
|
|
|
2005-05-01 21:30:51 +08:00
|
|
|
</sect2>
|
2012-09-19 19:47:53 +08:00
|
|
|
|
2002-07-08 04:28:42 +08:00
|
|
|
</sect1>
|